Audio Sound Volume

Audio Sound Volume

Post by Paul G. Willia » Sat, 26 Mar 1994 02:21:54



Is there anothor way to set the audio output sound volume (from a simple sh
script) besides using the following command apanel -nodisplay -outlevels
<level>?  (When invoking a script that executes this command from a crontab
file entry I always get a message that the display server could not be
found.)  Perhaps someone knows where the outlevels variable is stored and
how to access it without apanel???
 
 
 

Audio Sound Volume

Post by Doug Co » Sat, 26 Mar 1994 03:55:28



> Is there anothor way to set the audio output sound volume (from a simple sh
> script) besides using the following command apanel -nodisplay -outlevels
> <level>?  (When invoking a script that executes this command from a crontab
> file entry I always get a message that the display server could not be
> found.)  Perhaps someone knows where the outlevels variable is stored and
> how to access it without apanel???

It looks like for some reason apanel has a bug that makes it want to "know" the
X display, even if it's told to "not display." I'm guessing this is for reading
Xdefaults or something, which might apply even if the program was invoked -nodisplay.

In any case, it looks like you can fool it. Try:

apanel -nodisplay -display :0 -outlevels 0

Silly, huh? Even weirder is that if you switch the order of -nodisplay and -display,
it brings the display up. With the ordering above, it won't. I've filed a bug against
the program.

Hope this helps!

        -Doug


"Ruin them. Wreck their lives. Then build them cubicles to end their days
in. Hushabye. Lullaby. Die, dog. Little dog, die." -James Joyce

 
 
 

Audio Sound Volume

Post by RANDOLPH J. HERBER, HER.. » Sat, 26 Mar 1994 06:12:10



> Newsgroups: comp.sys.sgi.apps
> Subject: Audio Sound Volume
> Followup-To: comp.sys.sgi.apps
> Date: Thu, 24 Mar 1994 12:21:54 -0500

> Is there anothor way to set the audio output sound volume (from a simple sh
> script) besides using the following command apanel -nodisplay -outlevels
> <level>?  (When invoking a script that executes this command from a crontab
> file entry I always get a message that the display server could not be
> found.)  Perhaps someone knows where the outlevels variable is stored and
> how to access it without apanel???

APANEL(1)                      Silicon Graphics                      APANEL(1)

NAME
     apanel - audio control panel for input & output levels, rates and sources

SYNOPSIS
     apanel [ -display displayname ] [ -nodisplay ] [ -nofork ]
                                       ^^^^^^^^^^
            [ -dbscale ] [ -monitor ] [ -meter ] [ -mute ] [ -rate rate ]
            [ -inrate rate ] [ -outrate rate ] [ -inlevels level ]
            [ -outlevels level ] [ -source source ]


(Speaking for myself and not for US, US DOE, FNAL nor URA.)
(Product, trade, or service marks herein belong to their respective owners.)

 
 
 

Audio Sound Volume

Post by Guenter Wunn » Sat, 26 Mar 1994 09:29:36



>It looks like for some reason apanel has a bug that makes it want to "know"
>the X display, even if it's told to "not display." I'm guessing this is for
>reading Xdefaults or something, which might apply even if the program was
>invoked -nodisplay.
>In any case, it looks like you can fool it. Try:
>apanel -nodisplay -display :0 -outlevels 0

Another workaround is the program "volume" which is supplied with the IRIS
SpaceTour of IRIX 4.0.5. It can be found in ~tour/bin/volume , supposed you
have the SpaceTour installed. Invoking the program with no arguments returns
the current volume. Invoking it with -d (for down) or -u (for up) decreases
or increases the volume. Invoking it with an integer between 0 and 255
sets the volume to this value.
Hope this helps,
        Lukas.

*******************************************************************************




*******************************************************************************
*   I knew a boy called Jack, he shit all over the railway track. The train   *
*   passed by, the shit flew high, and hit the conductor square in the eye.   *
*******************************************************************************

 
 
 

Audio Sound Volume

Post by Bill Mar » Sun, 27 Mar 1994 02:05:04


: Another workaround is the program "volume" which is supplied with the IRIS
: SpaceTour of IRIX 4.0.5. It can be found in ~tour/bin/volume ...

There is (another?) volume program in:

~4Dgifts/examples/libaudio/volume

..if you installed 4Dgifts.  You can build it... also you could just goo
look at the calls it uses to set the volume.

-bill

 
 
 

Audio Sound Volume

Post by K. D. Krau » Fri, 01 Apr 1994 00:02:33




>    ...

>In any case, it looks like you can fool it. Try:

>apanel -nodisplay -display :0 -outlevels 0

>    ...

>Hope this helps!

>    -Doug



Doug:

There are eardrums around the world that appreciate your solution!  8-)
It helped around here alot!

Just thought I'd mention another "feature" with apanel levels.  When one
issues the command:

        apanel -nodisplay -display :0 -outlevels 4

The specified output level (integer in the range of 0-255 and 4 in the
example above) results in a "volume" scale that is *NOT* linear but a
natural logarithmic function.

I determined that an *rough* approximation to this function is:

        ln(outlevel^2) - 0.8    (for values of outlevel > 0)

that is:

        audio_panel_volume (0-10) ~= (natural_log(output_level_squared) - .8)

Thus a "reasonable" range of values for "outlevels" is about 2-20 though
one's mileage may vary depending upon the types of "tunes" one's experiencing!

        - k.d.

--

      __o
    _`\<,_
   (*)/ (*) K.D. Krauss
==============================^====================  Sterling Software  ==
==   NASA Lewis Research Center   MS 142-5    Cleveland, OH 44135  USA  ==

==========================================================================