I have put together a pretty simple vi that plays a .WAV file when you press a push-button on the arduino board; similar to a DJ Sampler. I have essentially just modified an example vi from one of the libraries (something like play sound file.vi) and added inputs from the arduino and made conditional loops that play a sound when the pin output from the board is 0 and play nothing when the when the pin output is 1. How I have the current vi has 2 channels and allows for the user to easily define the file path of a particular .WAV file and even change the file path while running the vi. I had to add a time delay of 0.1 seconds so that I had time to physically remove my finger from the push-button before the input from the board was read by the program again.
The set-up:
I have attached the vi and a .JPEG of the block diagram for those folks interested. My choice for using pins 3 and 4 for the push buttons was somewhat arbitrary.
The schematic of how i wired the push-buttons is best illustrated by an example layout published by ARDX that can be found here (page 2 of the .pdf): http://ardx.org/src/circ/CIRC00-sheet-ADAF.pdf
Any old .WAV files will do but I have found a nice library of free Dubstep samples here: http://bedroomproducersblog.com/2011/05/21/free-dubstep-samples-by-ghosthack-part-two/
Things to look into/fix (advice and suggestions are welcome!):
Number of channels/simplifying the code - right now there are only two channels because I only had two push buttons at my disposal. I plan to add more and it is easy enough to add another channel to the block diagram but I am hoping to streamline the code a little more.
Making the sampler a stand-alone executable application - I have toyed around with this some but I think it would be great if I could build an application out of this and run it on a system without LabView. I am not sure if this is possible with the arduino interface though.
Very nice, glad to see some music projects with this interface. And dubstep related no less
I agree more channels would be awesome and maybe some interesting "triggering" options.
nice work
se ve muy bien tu vi. pero ya le cargue musica y Nada que se Escucha le puse la ONU boton por el Canal 2 Y OTRO POR EL 4 de mi Arduino y nada en solitario me Aparece La Tacha Roja Que Me dados Que No