Midi and Revolution

Fred Moyer fmoyer at aol.com
Sat Dec 16 11:13:55 EST 2006


This is for anyone who knows about midi:

1) I need a midi file to trigger events in Revolution. Is putting the  
midi file into a player and then using callbacks the only way? If so,  
is there some formula where I can tell exactly what callback number  
is associated with what note? I am trying to figure it out using  
tempo in the midi file and timescale in the player. So if tempo is 60  
beats per minute and the timescale of the player is 600, then at the  
end of the 60th beat, a minute should have passed and therefore the  
callback number would be 600 * 60 or 36000, but it isn't working out  
that perfectly. Maybe tempo in midi or callbacks in Revolution are  
not entirely exact?

2) Running midi in a player burns up the cpu. Just having a tiny 20K  
midi file in the player and not even playing spikes up Revolution's  
use of the cpu to 35% in Activity Monitor, the Apple applications in  
the Utilities folder. Then playing the midi file is also more  
intensive on the cpu than playing a sound file. The app that I am  
writing will be used with a laptop, often on battery power, so this  
is a crucial issue. What is the cpu doing with a dormant midi file  
that is so difficult and crucial so as to use 35% of the cpu? Is this  
a Quicktime bug, Revolution bug?

3) Is it always a midi FILE that has to play? One thing I need is a  
click that plays endlessly at a specific tempo. I am creating the  
click by making a midi file that uses one of the Drum instruments.  
But of course the file runs out eventually and I have to loop it and  
there is inevitably a jerk. Is there any way to not use a file at all  
and just play a note over and over at a certain tempo? (I know I  
could just skip midi altogether and play a tiny sound file over and  
over, but I'd like to stick to midi for some other reasons.)

4) I know very little about midi. Is there anyone out there who could  
help me with my project?

Thanks
Fred Moyer



More information about the use-livecode mailing list