Discussion:
[Java] How change MIDI file?
(too old to reply)
Borneq
2015-07-11 08:37:00 UTC
Permalink
I see http://www.jsresources.org/examples/CreateSequence.java.html
but:
What is velocity? beats per minute? why not 120 but 64? why ticks means
not 1.3 millisecond interval but 0.5 second? How place shorter note? How
read instruments from file? My sample code

Synthesizer synthesizer;
synthesizer = MidiSystem.getSynthesizer();
synthesizer.open();
MidiChannel chan = synthesizer.getChannels()[0];
chan.programChange(1152, 14);

reads MidiChannel from system (global?) not from file.
Martin Neitzel
2015-07-11 21:02:35 UTC
Permalink
Post by Borneq
What is velocity? beats per minute?
No. MIDI is in many respects modelling how music is done in a piano,
and "velocity" refers to the speed a piano key is hit with. It
effectly is the parameter for loudness.
Post by Borneq
why not 120 but 64?
Because 64 is smack in the middle of the (7-bit) value range.

You should probably take a look at the MIDI spec (it's not that
long) to get an overview for all MIDI terms and their meaning.

Martin

Loading...