Code Monkey home page Code Monkey logo

illusion's Introduction

Illusion - Dynamic Audio Visualization

Illusion monitors sound from any source to modify and display a set of images in real time. The frequency spectrum and amplitude of the recorded sound are analyzed in order to shift the colors of the image.

Usage:

Build and run

In the Illusion directory, make and run the project:

make illusion
./illusion

If build fails, ensure you have all the required libraries installed.

Selecting a Recording Source

Illusion monitors sound on a system using PulseAudio. A sound source may be selected using the PulseAudio control GUI:

To open the GUI:
> pavucontrol

Select a recording source using the "record from" drop down menu.

Setting an Image

Set what images Illusion uses by adding them into the Illusion/Images/ folder.

Libraries Used:

  • PulseAudio: libpulse-dev
  • SDL 2 and SDL Image: libsdl2-dev, libsdl2-image-dev

illusion's People

Contributors

sjsimps avatar

Watchers

Jackson Prange avatar  avatar

illusion's Issues

Fails to compile with error: cannot convert ‘uint8_t*’ {aka ‘unsigned char*’} to ‘uint32_t*’

Hi!

I tried compiling Illusion on Linux today but it doesn't compile:

# g++ -dumpversion
11

# make
g++ -O2 -Wall -std=c++11 src/pulseaudio_recorder.cpp  src/small_fft.cpp src/visualizer.cpp src/image_manipulator.cpp src/beat_detector.cpp src/main.cpp -L/usr/local/lib -lSDL2 -lSDL2_image -lpulse-simple -lpulse -lpthread -o illusion
src/image_manipulator.cpp: In member function ‘void ImageManipulator::set_image(uint32_t*, int, int)’:
src/image_manipulator.cpp:34:21: error: cannot convert ‘uint8_t*’ {aka ‘unsigned char*’} to ‘uint32_t*’ {aka ‘unsigned int*’} in assignment
   34 |         m_overlay = new uint8_t[num_pixels*3];
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~
      |                     |
      |                     uint8_t* {aka unsigned char*}
In file included from /usr/include/string.h:535,
                 from /usr/include/SDL2/SDL_stdinc.h:66,
                 from /usr/include/SDL2/SDL_main.h:25,
                 from /usr/include/SDL2/SDL.h:32,
                 from src/../include/visualizer.h:5,
                 from src/main.cpp:19:
In function ‘void* memcpy(void*, const void*, size_t)’,
    inlined from ‘int main(int, char**)’ at src/main.cpp:247:19:
/usr/include/bits/string_fortified.h:29:33: warning: ‘void* __builtin_memcpy(void*, const void*, long unsigned int)’ accessing 57344 bytes at offsets 0 and 8188 overlaps 49156 bytes at offset 8188 [-Wrestrict]
   29 |   return __builtin___memcpy_chk (__dest, __src, __len,
      |          ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
   30 |                                  __glibc_objsize0 (__dest));
      |                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~
make: *** [Makefile:28: illusion] Error 1

Best, Sebastian

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.