Fuze Arena Logo
  • Forum
  • Creations
    Catalogue Showcase
  • Help

setVolume()

Purpose

Change the audio volume

Description

Set the volume level for the specified audio channel

Syntax

setVolume( channel, volume )

Arguments

channel audio channel from 0 to 15

volume volume from 0 to 1

Example

handle = loadAudio( "David Silvera/music_evil_presence" )
vol = 0.5
pan = 0.5
speed = 1

playAudio( 0, handle, vol, pan, speed, -1 )
loop
    clear()
    c = controls( 0 )
    printAt( 0, 0, "Use up arrow to increase volume" )
    if c.up then
        vol += 0.01
    endIf
    printAt( 0, 1, "Use down arrow to decrease volume" )
    if c.down then
        vol -= 0.01
    endIf
    vol = clamp( vol, 0, 1 )
    setVolume( 0, vol )
    printAt( 0, 2, "Volume: ", vol )
    update()
repeat

Associated Commands

audioLength(), getChannelStatus(), loadAudio(), note2Freq(), playAudio(), playNote(), setClipper(), setFilter(), setPan(), startChannel(), stopChannel()

logo

©2019 FUZE Technologies Ltd. FUZE is a registered trademark of FUZE Technologies Ltd. All rights reserved.

Useful links

  • Fuze Main Site
  • Fuze Arena on Twitter
  • Fuze Arena on Youtube
  • Download Buyer

Contact Information

  • FUZE Technologies Ltd
    15 Clearfields Farm
    Wotton Underwood
    Aylesbury, Buckinghamshire
    ​England, HP18 0RS

  • +44 (0) 1844 239 432

  • contact@fuze.co.uk

© Copyright FUZE Technologies Ltd. All rights reserved.