delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/03/09/04:26:40

From: ao950 AT FreeNet DOT Carleton DOT CA (Paul Derbyshire)
Newsgroups: comp.os.msdos.djgpp
Subject: Allegro MIDI looping
Date: 9 Mar 1997 07:02:23 GMT
Organization: The National Capital FreeNet
Lines: 28
Message-ID: <5ftn9v$ks1@freenet-news.carleton.ca>
Reply-To: ao950 AT FreeNet DOT Carleton DOT CA (Paul Derbyshire)
NNTP-Posting-Host: freenet3.carleton.ca
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp


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.
If stop_midi is called during the trailer, the trailer is stopped and the
main_midi does not get run. (It is pre-empted).

Purpose: This will enable making a piece of music that loops to a point
after the beginning, by making it in two MIDI files. Example from another
p[latform: Super Mario Bros plays a very familiar theme tune for the first
level of the original game. There is a sequence of seven notes at the
start of the music that introduces it but doesn't recur when the rest of
it loops. Being able to do this type of thing in Allegro would be nice.

(It can be done in a way right now, by running the trailer and then
polling for midi_pos becoming -1. But that is clumsy and prone to errors
or speed limitations.)

--
    .*.  Where feelings are concerned, answers are rarely simple [GeneDeWeese]
 -()  <  When I go to the theater, I always go straight to the "bag and mix"
    `*'  bulk candy section...because variety is the spice of life... [me]
Paul Derbyshire ao950 AT freenet DOT carleton DOT ca, http://chat.carleton.ca/~pderbysh

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019