Apparently-To: john.smith@gravis.com


GUS Programmer's Digest     Tue, 30 Nov 93  4:49         Volume 6: Issue  17  

Today's Topics:
                    GUS Programmer's Digest V6 #16
                            Volume Control
                        window driver plans..

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: Mon, 29 Nov 1993 09:10:28 -0500 (EST)
From: Phat H Tran <ptran@sciborg.uwaterloo.ca>
Subject: Re: GUS Programmer's Digest V6 #16

> Date: Mon, 29 Nov 1993 01:15:22 -0500
> From: Greg Chung <gchung@pegasus.rutgers.edu>
> Subject: ARGH!  More UltraClicking
> 
> Now:  I'm playing back a .MOD, so I've got at least four voices playing
> multiple samples.  No big deal here.  But!  I've got start-clicks, end-clicks,
> and loop-clicks.  My looping addresses seem to be set up in the right places,
> so I assume that loop-clicks are due to bad sampling.  If I do some 'fudging'
> of the digital data at the loop-point, I might be able to soften the click.
> Any thoughts?
>

You have to pad the end loop point with a few sample points from the 
beginning of the looped region to avoid looping clicks because the voices
do use the samples beyond the end loop address when they interpolate.
i.e.


            *---------------|123-----------|123
                            Start          End

            123 = copied sample points

You only need to do this padding if the end loop point falls on the end
of the sample.
 
> As far as starting clicks:  I have the volume set to a low level.  I then
> begin a ramp up to the regular volume.  While the ramp is going, I start the
> voice.  I've experimented with different ramp rates but haven't found any
> one best speed for all samples.

Try setting up the ramp and voice, but start the voice before starting the
ramp.  I would also think that one should use the highest ramping rate and
only fiddle with the ramping increment to avoid the zipping effect that occurs
with the lower ramp update rates.

> Ending clicks:  I set the sample to play almost up to the end of the sample
> (sample length - 32 bytes) and generate an interrupt.  At the interrupt, I
> begin a volume ramp down and finish playing the rest of the sample.  This gets
> rid of a lot of clicks, but not quite all of them.
>

Padding the end of the samples as described should also get rid of the end 
clicks.  Also, you needn't ramp down before the voice ends.  It would be
easier and just as click-free to ramp down after the voice stops.
 
> As far as house-keeping goes:  at the end of a sample, I StopVoice and set the
> volume very low.  I'm not actually relocating the voice to a zero-location
> because at very low volume it really shouldn't matter, should it?  My only
> thought is that when moving a voice location (eg Priming) a click might be
> generated depending on the contents of the previous location?

If the volume is zero, then I assume that that voice will add zero to the
sum, regardless of what value it's pointing to, so relocating it shouldn't
cause any clicks.

Disclaimer:  I'm not really a programmer. :)

Phat.

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

Date: Mon, 29 Nov 1993 11:01:15 -0500
From: davidm@marcam.com (David MacMahon)
Subject: Re: Volume Control

>From: at802@yfn.ysu.edu (Neal T. Leverenz)
>I would like to know if it is possible to adjust the volume on the input and
>output of ports on the GUS card. I know it is possible in the latest rev. of
>the GUS because the latest windows mixer supports volume changes on these
>ports.
[stuff deleted]

I believe the "volume changes" of which you speak are available only with 
the (soon to be released) 16-bit daughter card which will has a "full 
mixer".  I am not aware of any way to adjust the input or output of the 
standard GUS via software.  The volume of the output can, of course, be 
adjusted by adjusting the volume of all running voices, but I think you are 
asking about a master volume control.

Dave

David MacMahon
Systems Administrator
davidm@marcam.com

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

Date: Mon, 29 Nov 1993 18:47:43 +0100
From: anuj@fwi.uva.nl (Anuj Dev)
Subject: window driver plans..

I'm thinking about writing a windows driver for the gus, because
as a musician I'm not very pleased with the current one: no layers,
the famous 64k limit, no sys-ex implementation etc.

Since handling gus interrupts under windows is easy without writing 
a VxD (virtual device driver), see windowsdos dev. journal june 93,
the only problem I will encounter is how the mmsystem.dll comunicates
with the device driver. I know this is done via a callback function
xxxMessage() where xxx stands for mid,mod,wav,aux, i.e. the requested
functionality of the driver.

Does anyone have an example of handling these messages in the driver?
(please don't point me to the windows ddk, i know it's in there but...)

And..some time ago a few people setup a possible sys-ex spec for
the gus. Is it still around or am I getting delerious?


Thanks
Anuj Dev 

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

End of GUS Programmer's Digest V6 #17
*************************************

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

FTP sites:           archive.epas.utoronto.ca              /pub/pc/ultrasound
                     wuarchive.wustl.edu            /systems/msdos/ultrasound
                     archive.orst.edu                    /pub/packages/gravis
                     theoris.rz.uni-konstanz.de                /pub/sound/gus
FTP mail server:     mail-server@nike.rz.uni-konstanz.de

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



