-
Notifications
You must be signed in to change notification settings - Fork 241
Description
What it actually does, which is wrong:
set v0:volume to x. literally never makes a difference no matter what you pick for x. The volume only matters when a note is played, and playing a note changes the volume to match the note volume.
This is because Voice.BeginProceduralSound() just sets Voice.Volume to the passed-in note's volume, and doesn't remember the previous Voice.Volume value.
Even if you never mentioned the volume in calling the constructor function NOTE(), it gets a defaulted parameter of 1f which still causes this effect.
What it was supposed to do, but doesn't:
If the voice volume is 50% and the note's volume is 80%, then the note will play at 40% volume (50% of 80%). The note volume is supposed to be multiplied by the note's volume, not override it.
Fixing this would require a voice to remember two volumes. The voice needs to know both the volume of the current note and it's own volume as two separate values, or else it can't remember what volume it had before.