From: gfoot AT mc31 DOT merton DOT ox DOT ac DOT uk (George Foot) Newsgroups: comp.os.msdos.djgpp Subject: Re: Allegro MIDI looping Date: 9 Mar 1997 11:55:30 GMT Organization: Oxford University Lines: 38 Distribution: world Message-ID: <5fu8fi$r96@news.ox.ac.uk> References: <5ftn9v$ks1 AT freenet-news DOT carleton DOT ca> NNTP-Posting-Host: mc31.merton.ox.ac.uk To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Shawn Hargreaves (Shawn AT talula DOT demon DOT co DOT uk) wrote: : Paul Derbyshire writes: : >I have an idea for an additional MIDI option: a function like this: : > : >void trail_midi (MIDI *trailer, MIDI *main_midi) : > : >Plays the midi structure trailer, then loops main_midi until a stop_midi : >is sent or sound_exit or allegro_exit or exit is called. : This is a good idea, but I think a bit too limited in the form you : describe. If it's worth doing, it's worth doing in a properly generic : manner. I think a better approach would be to 'annotate' a single MIDI : file with information about the loop points, possibly as a seperate data : structure, or maybe better by using custom controller messages embedded : in the MIDI stream. This would allow a simple intro+loop like you : describe, but would also permit more complicated control flow (eg. play : bars 1-8, repeat bars 9-16 four times, play through to bar 64, and jump : back to bar 9). I implemented a similar system in a MIDI file generator I wrote once - I put in generic text events, containing a key phrase and a number, to mark various points in a file, and others meaning 'go to mark x' with a count of how many times to loop it. An alternative system would be to mark areas and have a separate file containing the information about which sections to play and when. BTW what is a sequence? (IIRC SMF file type 2... a sequence and a set of tracks). If it means what I think it means, this could be the exact solution. : Thanks for the suggestion: it's going on the todo list... ... along with how many other things? ;) -- George Foot Merton College, Oxford.