Adding User Input

To add user input to my visualisation tool I am using ControlP5. The source code can be found here: http://www.sojamo.de/libraries/controlP5/.

Using controlP5 I have added a slider to control the volume of the program.

To make sure it controlled the volume properly I used the map() function to ensure it mapped to the setGain() function properly, since a value of 0.0 is 100% volume.

After adding something to control the volume, I then used a scrollable list and populated it with all of the files within the data directory which is within the sketch’s directory. I also moved some of the sketch’s functionality to start working when a user has chosen a song to visualise.

Leave a comment

Design a site like this with WordPress.com
Get started