johngovan

i'd like to control 1 of the 6 piezos note using a pot so when 1 turn the pot int the left i got a note 42 (snare) and in the middle is note 43(Bass) and in the right note 44(cymbals). something like that.

//*******************************************************************************************************************// Main Program//*******************************************************************************************************************

At the start of each loop read the pot.Then when it comes to playing the MIDI note, test to see if it is note 6 using an if statement.If it is then use a map function to change the range of the pot reading into the range of MIDI note numbers you want and send that to the MIDI_TX function instead.

boolean SwitchPin =3; // Digital pin you are using for switch (don't use 0 or 1)int Piezotrigger = 0; // Array element (the piezo connector you are using) // Numbered from from left to right on the Drum Kitint BassDrum = 60; // the MIDI note for the Bass drum soundint Snare = 61; // the MIDI note for the snare sound

//*******************************************************************************************************************// Main Program//*******************************************************************************************************************

boolean SwitchPin =3; // Digital pin you are using for switch (don't use 0 or 1)int Piezotrigger = 0; // Array element (the piezo connector you are using) // Numbered from from left to right on the Drum Kitint BassDrum = 60; // the MIDI note for the Bass drum soundint Snare = 61; // the MIDI note for the snare sound

//*******************************************************************************************************************// Main Program//*******************************************************************************************************************

So if the only thing that makes you think you code is not working is the sound it produces then check your synth.Also run a MIDI monitor on your main computer and see what numbers are being produced, is it 60 & 61 or is it some other numbers?