If you wish to change the tempo into a midi file here are the steps to do it.
new MidiEventCollection(1, 120); //--->the midi collection
/// Add this line to your midi collection.
TempoEvent(Micro_second_calculator_for_quater_note(bpm),0),0); //---->the tempo event
à(bpm),0),0) = bpm is the speed of the song in
Beats Per Minute
à(bpm),0),0) = 0 is the delta time where the tempo
à(bpm),0),1) = 1 is the track number that will kept
/// Method to calculate the number of microseconds for a quater note for a precise BPM.
static int Micro_second_calculator_for_quater_note (double bpm) //---->the static method
//one micro second = 0,000001 second
//So, multiplication by 1000000 (1 million)
const int microsecond= 1000000;
int answer = 0;
temp = temp / bpm;
temp = temp * microsecond;
answer = (int)temp;
Distorsion13 says: tada!