[comp.sys.next] Controlling volume of audio presentations

murphy@gibbs.physics.purdue.edu (William J. Murphy) (05/13/91)

I am considering writing a simple program which tracks the perception
threshold of an audio stimulus.  To do this, I want to implement the
Bekesy paradigm using the setvolume method in the sound kit.  To setvolume,
one supplies a floating point value between 0.0 and 1.0.  My question
is this, what are the granularity of the volume settings?  Typically,
one needs a dynamic range of -30 dB SPL to 90 dB SPL to characterize
normal thresholds and most hearing impaired.  

So, how fine of a control can be achieved with the NeXT's volume control?


Bill Murphy
murphy@physics.purdue.edu

West Lafayette, IN:  Where progress takes a back seat to tradition.

wiml@milton.u.washington.edu (William Lewis) (05/14/91)

In article <5091@dirac.physics.purdue.edu> murphy@gibbs.physics.purdue.edu (William J. Murphy) writes:
>So, how fine of a control can be achieved with the NeXT's volume control?

  The volume is an integer from zero to 43. The 0.0 to 1.0 value passed
to other routines gets mapped into this range. I'm not at all sure
what sort of relation this 0-to-43 has to, say, decibels. I think you
can set the volume (right & left) directly using one of the SND*()
calls -- SNDSetVolume(), probably.


-- 
 wiml@milton.acs.washington.edu       Seattle, Washington   
     (William Lewis)   |  47 41' 15" N   122 42' 58" W  
 "Just remember, wherever you go ... you're stuck there."

smb@data.com (Steven M. Boker) (05/14/91)

In article <1991May14.002110.27936@milton.u.washington.edu> wiml@milton.u.washington.edu (William Lewis) writes:
>In article <5091@dirac.physics.purdue.edu> murphy@gibbs.physics.purdue.edu (William J. Murphy) writes:
>>So, how fine of a control can be achieved with the NeXT's volume control?
>
>  The volume is an integer from zero to 43. The 0.0 to 1.0 value passed
>to other routines gets mapped into this range. I'm not at all sure
>what sort of relation this 0-to-43 has to, say, decibels. I think you
>can set the volume (right & left) directly using one of the SND*()
>calls -- SNDSetVolume(), probably.
>
I think that you have a little more control than just the volume setting.
By using the DSP you can have 16 bit interpolation between those 43 volume
settings.  Of course there is, no doubt, some overlap.  Has anyone stuck
a scope on the line outs and calibrated the output?  Seems like it would
be a fairly simple task to get a linear or log scaling set up.

Steve

-- 
 #====#====#====#====#====#====#====#====#====#====#====#====#====#====#====#
 #  Steve Boker           #             "Two's bifurcation                  #
 #  smb@data.com          #             but three's chaotic"                #
 #====#====#====#====#====#====#====#====#====#====#====#====#====#====#====#