GUS Programmer's Digest Fri Jun 11 00:07 Volume 2: Issue 9 Today's Topics: GUS Programmer's Digest V2 #7 Standard Info: - Meta-info about the GUS can be found at the end of the Digest. - Before you ask a question, please READ THE FAQ. ---------------------------------------------------------------------- Date: Thu, 10 Jun 93 15:43:26 +0200 From: d91-sme@nada.kth.se Subject: Re: GUS Programmer's Digest V2 #7 Message-ID: <9306101343.AA07057@dront.nada.kth.se> >>Is the problem this: you want to play a large sample that doesn't >>fit into the GUS memory? >> >>Ok, let's write a picture: >> >> A piece of GUS memory: >> ----------------------------------------------- >> ^ ^ ^ >> A B C >> >>A = Start of Buffer #1 >>B = Start of Buffer #2 >>C = End of the buffers >> >>1. Fill A-C with sample data. >>2. Play the sound from A to C, looping. >>3. IRQ at B. >>4. Fill A-B with new sample data. >>5. IRQ at C. >>6. Fill B-C with new sample data. >>7. Go to 3. >> >>Exactly how you create the IRQ's is actually uninteresting. Anyhow, >>you will not have any pops or anything with this algorithm. >How do you create an IRQ in the middle of a buffer? I thought you >could only generate an IRQ at the end of a buffer. Any help on this >would be appreciated. There are several ways to create an IRQ on the PC. Just anykind of IRQ will do for this algorithm. You could use the timer IRQ on the GUS if you wish. Or timer IRQ on the PC. Note that it's not that important to be precisely at B. Just check the voice "Current Address" when the IRQ occurs, and call that location "B". And about the kind of IRQ that you were thinking of - let me reprint part of page 85 in the SDK manual: --------->--------->--------->---------->---------->| ^--------------<----------<--| Begin Start End As I see it, an GUS IRQ can occur when the "Current Address" equals the "End Location". I wonder what would happen if you did the following: --------->--------->--------->---------->----------> ^ ^ ^ Begin End Start First of all - an IRQ will be made in the middle of the buffer, which is just what we want. Then - will the GUS trigger an IRQ at Start? I don't think so, and therefore we could change the addresses WHILE STILL PLAYING FROM "End" TOWARDS "Start": --------->--------->--------->---------->----------> ^ ^ ^ Begin & End Start That would make the GUS interrupt at the end of the buffer. Then you change back to the above address settings. The question is - how will the voice act when you fiddle around with all the addresses like this, while the voice is playing a sample? I don't know. Maybe it will only act when the "Current Address" is at Begin, Start or End location, and then go on until it reaches another interesting location. There are much research to be done here... :-) /Smedis (Niklas Smedberg, d91-sme@nada.kth.se) ------------------------------ End of GUS Programmer's Digest V2 #9 ************************************ To post to tomorrow's digest: To (un)subscribe or get help: To contact a human (last resort): FTP sites: archive.epas.utoronto.ca pub/pc/ultrasound wuarchive.wustl.edu systems/msdos/ultrasound Hints: - Get the FAQ from the FTP sites or the request server. - Mail to for info about other GUS related mailing lists (UNIX, OS/2, GUS-MIDI, etc.)