From mailserv@gaia.ucs.orst.edu Fri Oct 21 14:11:38 1994
Precedence: Bulk
Date: Fri Oct 21 12:09:07 PDT 1994
From: gus-sdk-request@gaia.ucs.orst.edu (GUS Programmer's Server)
Reply-To: gus-sdk@gaia.ucs.orst.edu (GUS Programmer's Digest)
Subject: GUS Programmer's Digest V13 #12

GUS Programmer's Digest     Fri, 21 Oct 94 12:09 PST     Volume 13: Issue  12 

Today's Topics:
       -*ANNOUNCEMENT*- gaia.ucs.orst.edu downtime Sat 10/22/94
                         Continuous Recording
                   GUS Programmer's Digest V13 #11
                    MIDI engine source & UltraMID

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, 20 Oct 1994 18:23:24 -0700 (PDT)
From: Vince - IE - Experimental Mail Server Admin Acct <mailserv@ucs.orst.edu>
Subject: -*ANNOUNCEMENT*- gaia.ucs.orst.edu downtime Sat 10/22/94

	This is just to let everyone know that there will be a delay for
all the GUS Digests for Saturday October 22, 1994 as the server will be
unavailable in the morning.  Sorry for any inconvenience.

---------- Text of forwarded message ----------
Date: Wed, 19 Oct 1994 16:22:24 PDT
From: Kean Stump <kean@cerridwen.ucs.orst.edu>
Subject: gaia.ucs.orst.edu downtime Sat 10/22/94

We are changing out the boot disk on gaia Saturday morning, starting at 7:30.
Expected downtime will be 4 hours.  Gopher, ftp and news service will be 
unavailable during this time.  ccmail traffic to the Internet will be routed
through a different mail relay so service will not be interrupted.

Kean

Kean Stump                                             Information Services
kean@ucs.orst.edu                                      Oregon State University
OSU doesn't pay me to have official opinions.          (503)-737-4740


                              Cheers,
          		       Vince
E-mail:
vince@kbrown.oldcampus.yale.edu,\|/ Sys Adm - CircleStar Technologies,Inc. 
  root@berkeley.circlestar.com,(o o) San Francisco, California USA
  _________________________oOO__(_)__OOo_____________________________
 |  There are many forms of science but only physics is the quantum  |
 |                    leap of the 21st Century.  	             |
  \_________________________________________________________________/
	uPoy@physics.ucla.edu	     UCLA Physics
	 			     Los Angeles, California USA
	    
GUS Digest Adminstrator
Advanced Gravis UltraSound Card - The ultimate in soundcard technology 

------------------------------

Date: Fri, 21 Oct 94 11:16:24 EDT
From: "c.   james" <cjames@julian.uwo.ca>
Subject: Continuous Recording

>Date: 20 Oct 94 09:23:00 MET
>From: "VISX80::GRECNER" <GRECNER%VISX80.decnet@musx53.zfe.siemens.de>
>Subject: Continuous recording


Roughly:


     {-------------------|-------------------} DMA BUFFER

Fill whole buffer
Program record counter (might be MAX only? for half buffer length)
Put DMA in auto-init mode, go etc
Handle Irq (occurs at half way) set flag1 to fill first half
Fill first half on flag1
Handle Irq (occurs now at end) set flag2 to fill second half
Fill second half on apropriate flag2

etc.

To stop, need to re-program DMA to one-shot mode with apropriate count
or just read the card's counter buffer and terminate when sufficient
samples have been transferred.

You can also do this without using interrupts by just polling counters,
but thus means you're stuck for doing anything else at the same time.

Okay, can someone tell me how to use the GF1 to get "seemless" playback.
I followed all the SDK instructions - roll-over etc. The results were fine
if the signals are fairly harmonically rich (i.e. speech) but I tried a
sine wave and I get a click! I did that filler stuff with putting the
previous word before the start of the voice's buffer and after the end
(because of the linear interpolation) - still a click, but as I say not
noticeable with music or speech. Saying that it must be possible since
playfile did fine! There's a very slight gap when the GF1 loops
back to the beginning (on a scope). I gave up and went with the Codec in
the end, but it would be kinda cool to get it going with the DRAM and GF1
(if you want a tone the buffer only needs to be one cycle long! Although
I used 2048, 4096 etc points).

Chris James

------------------------------

Date: Fri, 21 Oct 1994 11:20:37 +0000 (GMT)
From: kj@raunvis.hi.is (Kristjan Jonsson)
Subject: Re: GUS Programmer's Digest V13 #11

> Date: 20 Oct 94 09:23:00 MET
> From: "VISX80::GRECNER" <GRECNER%VISX80.decnet@musx53.zfe.siemens.de>
> Subject: Continuous recording
> 
> >I see that the actual recording is taking place via DMA directly into the  
> >PC's memory (rather than the GUS RAM).  Is it possible to set the recording  
> >to loop inside of a (for example) 20K block, sending an IRQ when a rollover  
> >point (10K, say) is reached?  It makes sense that this would be possible, but  
> >I don't see from the SDK docs how to set it up.
> 
> You have to implement your own double buffer. You start a transfer to one
> buffer, after it's full, the DMA will signal an interrupt. Now you have
> to programm DMA again to another buffer and go on. You have to be fast
> to miss no sample. On a 20Mhz machine, you have cca. 450 cycles to do it
> at 44.1kHz. This is the same technique Sound Blaster programmers have
> to use for both recording and playback, and the same you'll have to use
> when programming CODEC on the GUS MAX. Maybe there is some small DMA buffer

Actually you can program the CODEC to interrupt after a specific number
of bytes have been recorded (less than the size of the DMA buffer) and thus
use the method first described to implement double buffering. It is documented
in the latest SDK (v2.11) and doesn't work for plain GUS since it doesn't have
the CODEC.

-- 
--- Kristjan Jonsson --- kj@raunvis.hi.is ---

------------------------------

Date: Fri, 21 Oct 1994 14:32:58 BST
From: Chris Barrett <se2cb@de-montfort.ac.uk>
Subject: Re: MIDI engine source & UltraMID

>> Hi GUS proggers.
>> 
>> I am attempting to write some MIDI software (player, sequencer type stuff), and
>> I have all the info I need on the MIDI format, and the .PAT file format.
>> 
>> What I have not yet come across is any source code which handles the playing of
>> patches (including all that enveloping and vibrato stuff). 
>> 
>> There's plenty of source for playing MODs, but does anybody out there have or
>> knows of any freely available source to do such a thing?
>> 
>> I'd luv to hear from ya...
>
>There's no freely available MIDI engine source, but have you considered
>using Ultramid as your MIDI driver?  It does all that you're asking for,
>but it's a TSR-type driver for DOS.  Ultramid programming docs can be 
>found on Epas.
>
>Phat.

I forgot to mention that I AM currently using UltraMID! I suppose it will do
for now, it does it's job pretty well, but you still have to load it it before
using any programs that use it. 
I also want to be able to load patches into memory that may not neccessarily be 
listed in the .INI file (ie custom patch support). 
Can I get UltraMID to do this?

Shame there's no MIDI engine source out there, hey Gravis, feeling generous?
How about just putting that PlayMidi source in the SDK (nudge nudge, wink wink)!

--
Chris A. Barrett
De Montfort University, Leicester, UK
se2cb@dmu.ac.uk
"Electronic mail - the best thing since electronic bread."

------------------------------

End of GUS Programmer's Digest V13 #12
**************************************

To post to tomorrow's digest:                    <gus-sdk@mail.orst.edu>
To (un)subscribe or get help:            <gus-sdk-request@mail.orst.edu>
To contact a human (last resort):          <gus-sdk-owner@mail.orst.edu>

                       FTP Sites                     Archive Directories
                       ---------                     -------------------
Main N.American Site:  archive.orst.edu              pub/packages/gravis
                       wuarchive.wustl.edu           systems/ibmpc/ultrasound
Main Asian Site:       nctuccca.edu.tw               PC/ultrasound
Main European Site:    src.doc.ic.ac.uk              packages/ultrasound
Main Australian Site:  ftp.mpx.com.au                /ultrasound/general
                                                     /ultrasound/submit
South African Site:    ftp.sun.ac.za                 /pub/packages/ultrasound
Submissions:           archive.epas.utoronto.ca      pub/pc/ultrasound/submit
Newly Validated Files: archive.epas.utoronto.ca      pub/pc/ultrasound

Mirrors:               garbo.uwasa.fi                mirror/ultrasound
                       ftp.st.nepean.uws.edu.au      pc/ultrasound
                       ftp.luth.se                   pub/msdos/ultrasound

                       Gopher Sites                  Menu directory
                       ------------                  --------------
Main Site:             src.doc.ic.ac.uk              packages/ultrasound

                       WWW Pages
                       ---------
Main Site:             http://www.cs.utah.edu/~debry/gus.html

Main European Site:    http://src.doc.ic.ac.uk/packages/ultrasound/
Main Australian Site:  http://ftp.mpx.com.au/archive/ultrasound/general/
                       http://ftp.mpx.com.au/archive/ultrasound/submit/
                       http://ftp.mpx.com.au/gravis.html
                       
Mirrors:               http://www.st.nepean.uws.edu.au/pub/pc/ultrasound/

MailServer For Archive Access: Email to <mail-server@nike.rz.uni-konstanz.de>
                               Email to <ftpmail@doc.ic.ac.uk>

New Submit Files Mailing List: Email to <listproc@uni-konstanz.de>
                         with content "subscribe epas-list <your-name-here>"

Hints:
      - Get the FAQ from the FTP sites or the request server.
      - Mail to <gus-sdk-request@mail.orst.edu> for info about other GUS
	related mailing lists (general use, musician's, etc.).


