Creating a MIDI file for Finale or Sibelius

claba's icon

I have a patch that generates a random series of sixteenth note vales (1 = sixteenth note, 2 = eighth note, etc.), and a random series of pitches. I'm trying to find a way to export these values as a midi file that can be opened in finale or sibelius. Help!!

Roman Thilenius's icon

[seq] or [detonate]. in any case, you have to record the events in realtime before you can export.

claba's icon

Thank Roman. I'm a bit of a newb with MIDI in Max. If I have a coll object with a series of values that look like this:

for rhythm (# of sixteenth notes in duration)
0, 5;
1, 6;
2, 7;
3, 7;
4, 3;
5, 3;
6, 6;

What would be the best way to record them into [seq] or [detonate] so that when I bring the midi file over to finale or sibelius, I'm going to have the right rhythmic values? Or if I wanted to do randomized pitches instead, to just have a quarter note value for each pitch?

Christopher Dobrian's icon

>> [seq] or [detonate]. in any case, you have to record the events in realtime before you can export.

Not true for [detonate], in which you can record in nonrealtime.
See this example.

Roman Thilenius's icon

0, 5;
1, 6;
i dont see any duration values there yet ...

Christopher Dobrian's icon
Max Patch
Copy patch and select New From Clipboard in Max.

If I understand you correctly, you want to have a table of successive durations (more specifically a coll containing number of 16ths between notes) and convert that into a series of MIDI notes. So, based on your beat tempo (beats per minute) you need to calculate the amount of time each 16th-note pulse takes (milliseconds per 16th-note) and multiply that by each of your stored durations to get the correct milliseconds to wait till the next note. Here's a patch that plays your rhythm and stores it in a seq object (which you can then write to a MIDI file).

claba's icon

Thanks for the replies.

Roman--the durations were in # of sixteenth notes between attacks, as Christopher understood. The first number (in [0, 5] for example) is just the index # in the coll object. So the duration value would be the second number, or in this case 5 sixteenth notes.

Thanks for the patch Christopher. I ended up coming up with a solution that records in realtime, though yours is definitely more elegant. The realtime recording isn't a huge issue since the person I'm writing it for wants to hear it before exporting, but it would be nice to have a non-realtime solution somewhere down the line. I don't completely understand the detonate object yet, but will have to look into it some more.

thanks again.

Hafiz Atif's icon

hi CLABA
will you please help me in the same problem