// Set the Metronome Volume based on a midi knob value
// Arguments:
//		1 : Metronome volume value. Volume is set to 1 if not specified
//		
//
// Author: LoopToGo


//print nbArgs = $nbArgs 
//print arg1 = $arg1 arg2 = $arg2 arg3 = $arg3 arg4 = $arg4 arg5 = $arg5

if $nbArgs > 4
	variable volume $arg5/127
else
	if $arg1
		variable volume $arg1
	else
		variable volume 1.0
	endIf
endIf

setMetronomeAllSongsVolume $volume 

