Windows MIDI conversion question
J. Landman Gay
jacque at hyperactivesw.com
Fri Aug 20 00:34:19 EDT 2004
On 8/18/04 4:21 PM, Erik Hansen wrote:
> --- "Ken Norris (dialup)"
> <pixelbird at interisland.net> wrote:
>
>
>>>>we (I) desperately need Shakobox for
>>
>>Windows.
>>
>> somehow figure out timing for playback,
>
>
> ay, there's the rub.
>
>
>>What is it, exactly, that you want to do? Why
>>can't you just create MIDI
>>files with one of the softwares available for
>>Windows and incorporate them
>>into your stacks?
>
>
> my graphics need to be precisely coordinated
> with the music. at least to the measure, if not
> the beat. tempo can change within a composition.
> this is dance choreography which is in lockstep
> with the music.
>
> right now i am getting an extra 17 milliseconds
> for each repeat in the pendingmessages
>
> on andale
> ...
> put 0 into counter
> repeat with 1 = pStart to pEnd
> put (counter * 1000) into tSpeed
> send "setDancers i" to me in tSpeed
> milliseconds
> add 1 to counter
> end repeat
> ...
> end andale
>
> exact sound and motion coordination is
> an absolute must. nightmares about moving
> to director... Scott Rossi said something about
> using Flash within RR, but hopefully it can all
> be done here.
It would be tedious and you'd have to use MIDI or another sound format
in a player object, but the only other thing I can think of is to create
a lookup table that has pairs of time stamps and graphics. You'd have to
do each piece of music individually, which is the tedious part. You'd
note the place in the music where each graphic needs to change and store
a table where the first number is the time in the movie and the second
is the graphics number, something like this:
0,1
155,2
423,3
and so forth. Then create a handler that sends itself a message every
few milliseconds. The handler would check the currentTime of the movie
and if it matches an entry in the table, it sets the dancer to the
graphic indicated by the second item in the line.
local myTable -- contains the numbers list
on andale
get the currentTime of player "myMusic"
put lineoffset(cr&it,cr&myTable) into theMatch
if theMatch > 0 then
setDancers (item 2 of line theMatch of cr&myTable)
end if
send "andale" to me in 100 milliseconds
end andale
The carriage returns are to make sure that only numbers at the
beginnings of the lines match. The above is untested, so you may need to
tweak it. You'd also have to write something that stops the messaging
when the player stops.
Alternately, you could try the Shakobox for Windows file that Judy
posted. The link still works and I was able to grab the file, but I
haven't had time to test it yet.
--
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the use-livecode
mailing list