CONTROL_CHANGES that work for csc220 assn3. https://anotherproducer.com/online-tools-for-musicians/midi-cc-list/ 7 adjusts volume 0..127 and is already in use in program. 8 is stereo balance, also in use in class Professor. (0 is left, 64 middle of speakers, 127 is right). 1 is modulation wheel. 93 is chorus. Those are the only ones that sound in the current OpenJDK Java library. Use them (Professor already does), but pick your own instrument (PROGRAM_CHANGE) that works well with your selected CONTROL_CHANGEs from the above list. If you feel like putting in the effort, try playing two or more notes at a time. Make sure NOTE_OFF is called for each note. An alternative to NOTE_OFF for each NOTE_ON is CONTROL_CHANGE 123 that turns off all notes. Test to be sure. See below. ADDED AFTER SOME EXPERIMENTS: Professor's move() function never used NOTE_OFF. It could get away with that because the handout Professor is using a percussive PROGRAM_CHANGE that dies away without NOTE_OFF. When I changed my instrument to 16 which is a sustaining organ, it never quieted down. Therefore, I CHANGED THIS PART OF HANDOUT PROFESSOR'S move(): if (colliders.size() > 0) { sendMIDI(ShortMessage.PROGRAM_CHANGE, channel, instrument, 0); sendMIDI(ShortMessage.PROGRAM_CHANGE, channel, instrument, 0); int volumeAdjust = 7 ; sendMIDI(ShortMessage.CONTROL_CHANGE, channel, volumeAdjust, 127); int balanceControl = 8 ; int balanceLocation = int(constrain(map(myx, 0, width, 0, 127),0,127)); // 64 is centered in stereo field sendMIDI(ShortMessage.CONTROL_CHANGE, channel, balanceControl, balanceLocation); sendMIDI(ShortMessage.NOTE_ON, channel, mypitch, 127); // See http://midi.teragonaudio.com/tech/midispec.htm } TO THIS: if (colliders.size() > 0) { sendMIDI(ShortMessage.PROGRAM_CHANGE, channel, instrument, 0); // sendMIDI(ShortMessage.PROGRAM_CHANGE, channel, instrument, 0); int volumeAdjust = 7 ; sendMIDI(ShortMessage.CONTROL_CHANGE, channel, volumeAdjust, 48); int balanceControl = 8 ; int balanceLocation = int(constrain(map(myx, 0, width, 0, 127),0,127)); // 64 is centered in stereo field sendMIDI(ShortMessage.CONTROL_CHANGE, channel, balanceControl, balanceLocation); sendMIDI(ShortMessage.NOTE_ON, channel, mypitch, 48); sendMIDI(ShortMessage.NOTE_ON, channel, mypitch+4, 48); sendMIDI(ShortMessage.NOTE_ON, channel, mypitch+5, 48); sendMIDI(ShortMessage.NOTE_ON, channel, mypitch+7, 48); lastNoteOn = getMilliseconds(); // See http://midi.teragonaudio.com/tech/midispec.htm } else if ((getMilliseconds() - lastNoteOn) > 5000) { // note has been playing 5 secs sendMIDI(ShortMessage.CONTROL_CHANGE, channel, 123, 0); // all notes off! lastNoteOn = getMilliseconds(); } That required adding another data field in the object's fields in the class declarations. This is not a local variable inside a function. long lastNoteOn = 0 ; STUDENT REQUIREMENT 3b and 3c are now deprecated because with the current javax.sound.midi library there are no additional CONTROL_CHANGE effects not already in use. Instead, experiment with multiple NOTE_ON at the same time on different pitches, and/or multiple instrument voice on different channels. See channels note below. // 3b. Add a CONTROL_CHANGE MIDI effect that you can hear, see // http://midi.teragonaudio.com/tech/midispec.htm and experiment with ConcentricCirclesInterval sketch. // Take a listen to modulation wheel (controller 1) and chorus (controller 93) Note that unlike the // instrument numbers, these start at 0, i.e., mod wheel is 1, bank select is 0. Make it a mapped // function of y location relative to [0, height-1] or another avatar varying variable. // 3c. Add a second CONTROL_CHANGE MIDI effect that you can hear. Make it a mapped function // of z location relative to minimumZ and maximumZ or anotehr avara varying variable. Handout says this which now changes: // Your Avatar MUST use channel 10 (I am using 0 and 1 and reserving the others), // a range of instruments away from my 106 and its neighbors... You may also use channel 11 or 12 or both for different instruments. If you use them in a single avatar object, just plug values 10 or 11 or 12 into the channel parameter for PROGRAM_CHANGE, CONTROL_CHANGE, NOTE_ON, NOTE_OFF messages. Or you could have different avatar objects play different instruments on different channels. When I test assignments I will 1) listen for audible changes on instrument(s) different than mine, and 2) make sure the implosion of spheres is perceptible.