Hi all, I have no experience with midi, but have some music as follows (output from a silly script I wrote):
Track 1: [A4 for 1 second], [B4 for 1 second], [C4 for 3 seconds], [A4 for 0.25 seconds], etc.
Track 2: [F4 for 0.25 seconds], [A4 for 1 second], [B4 for 1 second], [F4 for 2 seconds], etc.
Track 3: [C3 for 1 second], [B5 for 3 seconds], [G5 for 0.50 seconds], [G4 for 1 second], etc.
The notes (“A4”, “G5”, etc.) are also coded as frequencies - imagine above but with note names replaced with frequencies (A4 = 440 metric).
My question is, is this enough to make a midi file? If so, how would I format it as such?
What specifically are you attempting to accomplish?
You need to read up on SMF, at a minimum, in my opinion, if you are trying to generate an actual midi file from scratch. I’m not sure why you’d do that though when you can use to midi sequencer that will generate the output for you for free.
Hi konputa, thanks for the quick response. I wrote a program in R to generate songs using various algorithms, and I want to get those songs out of R and into midi. In R, the notes are coded simply [note_frequency,note_duration], but I can code them however is necessary to make a midi. But it sounds like building a midi from scratch is much more complicated than I thought. So maybe I should aim to output a file importable to a midi editor? Do you know of any midi editors that can take imports of song/note information?