Question

I have a Sequence player in which I simply open(), set the tempo, and start a Midi file where the Midi file is actually the bulk of my project (parsing a string file into a music piece)

Now in all the complexity of my code, I can't figure out how to change the instrument per voice:

The midi files can have multiple voices which my sequencer takes as being multiple notes to play at once. So if I have:

Voice: 1
notes
Voice: 2
more notes

Then my sequencer will play those two parts simultaneously. Maybe splitting the two to play different instruments isn't doable but at least how do I change the Instrument for the entire sequence?

Was it helpful?

Solution

"Voices" refer to how much polyphony the synth can handle.

If you wish to play a different synth, the easiest thing is probably to change the "channel" number, assuming you have different channels assigned to the different instruments that you wish to hear.

http://docs.oracle.com/javase/tutorial/sound/MIDI-synth.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top