Music duration

René Micout rmicout at online.fr
Tue Feb 17 08:01:52 EST 2009


>
Bonjour Kurt,
I hardly work this week-end (see my exercices in PDF file joined >  
off-list...).
I have many questions > ?
The most important are lines 22, 30, 38 46 about note data, by  
example line 22 :
903C648400803C0000
I think 03C is the pitch (!?) and 64844008 is the duration (!?)
Where is the velocity ?
Thank you very much for these lessons :-)
Theses functionalities are very interesting for making MIDI files but  
my problem is especially making MIDI messages (!?)
by sending parameters from Revolution to QT synthesizer (is it  
correct ?)
Bons souvenirs de Paris
René

> Le 12 févr. 09 à 01:02, Kurt Kaufman a écrit :
>
>> "...I know your work and I appreciate it, but.... but...
>> It is a little bit complex for me :-(
>> I dont understand binaryEncode(etc...)
>> and also the bridge between Revolution (code) and Midi..."
>>
>> René,
>>
>> I know it looks complicated.  I think it would take me a while to  
>> figure it out again, even though I commented the scripts fairly  
>> heavily!
>> But once you understand what makes up a MIDI file, which parts are  
>> constant (always the same in every MIDI file of that type), and  
>> which parts are variable (different in each music track), you see  
>> that it is not that complex.  If you look at the MIDI format  
>> document, you'll see the various parts described in the order in  
>> which they appear.
>>
>> At least MIDI files are generally not very big, so if you want to  
>> open them up using a Hex editor, you're not scanning a tremendous  
>> amount of data.  To that end I would use MIDI Builder to create a  
>> MIDI file with a single note, and then take a look using HexEdit:
>>
>> http://sourceforge.net/project/showfiles.php?group_id=9366
>> (there's a French version, too)
>>
>> Now compare what's in the MIDI format document with what you see  
>> in the HexEdit.
>>
>> Rev's binaryEncode function is called after all of the various  
>> parts of the data have been set up, as most of the MIDI data  
>> cannot be represented by ascii (it's not printable, for the most  
>> part).  But the binaryEncode function is automatic;  you just have  
>> to give the function its data and the proper parameters, and Rev  
>> does the rest. Rev makes it easy: You can simply add the  
>> successive bytes of encoded data "after" what's already there.   
>> The file can be created in a fraction of a second and played  
>> almost immediately.  Rev's QT player object handles most of the  
>> work, you just have to send it data that it understands.
>>
>> Hope this helps,
>> Kurt
>>
>> further info:
>> http://crystal.apana.org.au/ghansper/midi_introduction/ 
>> midi_file_format.html
>> http://www.harmony-central.com/MIDI/Doc/doc.html



More information about the use-livecode mailing list