Ultimate Amiga

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: MVolume How to Get the Valor?  (Read 3927 times)

0 Members and 1 Guest are viewing this topic.

Amiten

  • A600
  • *
  • Karma: 1
  • Offline Offline
  • Gender: Male
  • Posts: 128
  • Amos Coder Since 1990
    • Amiten Software
MVolume How to Get the Valor?
« on: July 17, 2013, 09:32:00 AM »

Hello,

I want to know when the system have no sound by the inbuilt Mvolume command in amos.

any idea how to know when the system is mute or volume 0  and assign to a variable?

i try with this but get an error


m=Mvolume
do
if m=0 then print "no sound"
loop

Thanks
« Last Edit: July 17, 2013, 09:36:49 AM by Amiten »
Logged
AMIGA is a Style of Life

Amiten

  • A600
  • *
  • Karma: 1
  • Offline Offline
  • Gender: Male
  • Posts: 128
  • Amos Coder Since 1990
    • Amiten Software
Re: MVolume How to Get the Valor?
« Reply #1 on: July 17, 2013, 11:08:51 PM »

Any Help??
Logged
AMIGA is a Style of Life

SamuraiCrow

  • compile-time wierdo
  • Forum Mod
  • A1200
  • *****
  • Karma: 5
  • Offline Offline
  • Gender: Male
  • Posts: 946
  • Compile-time wierdo
Re: MVolume How to Get the Valor?
« Reply #2 on: July 18, 2013, 09:22:02 AM »

The Amiga has 4 volume controls; one per voice.  To read the current amplitude of a voice you can use the vumeter function.  You cannot use Mvolume as a variable though because it is a command.  It merely sets the music volume.
Logged

Amiten

  • A600
  • *
  • Karma: 1
  • Offline Offline
  • Gender: Male
  • Posts: 128
  • Amos Coder Since 1990
    • Amiten Software
Re: MVolume How to Get the Valor?
« Reply #3 on: July 18, 2013, 10:40:27 AM »

 :-X :-X :-X :-X :-X :-X

   V0=Vumeter(0)
   V1=Vumeter(1)
   V2=Vumeter(2)
   V3=Vumeter(3)

thanks samuraiCrow you are my hero  ;D ;D
Logged
AMIGA is a Style of Life

Amiten

  • A600
  • *
  • Karma: 1
  • Offline Offline
  • Gender: Male
  • Posts: 128
  • Amos Coder Since 1990
    • Amiten Software
Re: MVolume How to Get the Valor?
« Reply #4 on: July 18, 2013, 01:42:06 PM »

Vumeter only gets the volume from a .med .mod .abk music file but no for the sound samples played by the sam play command  :(

if we do that
sam loop on
sam play 1
Do
V0=Vumeter(0)
locate 10,10:print V0
loop

the valor of V0 always get "0" :(

so any idea how to get the volume valor on a single sound sample??
Logged
AMIGA is a Style of Life

Hungry Horace

  • Amorphous Blue-Blob Man
  • Site Admin
  • A4000T
  • ******
  • Karma: 307
  • Offline Offline
  • Gender: Male
  • Posts: 3,364
  • Don't forget... Ameboid's need love too!
    • AUW
Re: MVolume How to Get the Valor?
« Reply #5 on: July 18, 2013, 04:35:35 PM »

Amcaf extension has some extra sound commands, maybe look through the online manual for that?
Logged
Quote from: KillerGorilla
because winuae is made of code and your amiga is made of stuff

Pages: [1]   Go Up
 

TinyPortal 2.2.2 © 2005-2022