What's new

Mono Script

jdawg

Active Member
I have found a mono script on the search of this forum from a generous user.

on init
declare ui_button $mono
declare $last_id
make_persistent($mono)
end on

on note
if ($mono = 1)
note_off($last_id)
end if
$last_id := $EVENT_ID { this note will be the last one next time around }
end on


I was just wondering how this could be edited to be able to control the fade out / fade in of the transition, and possibly even the pitch slide? I guess the volume may be of the easiest option.
 
Here you have a modified version of the script you've pasted. It will fade out the last note and fade in the new note.

Code:
on init
	declare ui_button $mono
	declare $last_id
	make_persistent($mono)
	read_persistent_var($mono)

	declare $fadeout_value := 250000	{edit this value for the fade out}
	declare $fadein_value := 250000	 {edit this value for the fade in}
end on

on note
	if($mono = 1)
		fade_out($last_id,$fadeout_value,-1)
		fade_in($EVENT_ID,$fadein_value)
	end if

	$last_id := $EVENT_ID
end on
 
Top Bottom