MidiEditor icon indicating copy to clipboard operation
MidiEditor copied to clipboard

When pausing and playing after a control change, the previous value is used.

Open easyaspi314 opened this issue 8 years ago • 1 comments

Last bug and I'll shut up.

Let's say you stop playback after a control change. Let's use volume for simplicity.

If you stop playback after the volume change and start at a part where there is no change in volume, that previous volume will play until another volume change event is encountered.

Let's say I have three volume control events. One at tick 0 that is 127, one at tick 96 that is 64, and one at tick 192 that is 10. If I put the cursor at tick 20, play the song and pause at tick 200, then play (assuming there is a note at tick 24), the note will play at volume 10 until tick 64, where it will jump to 64.

I get this with both VirtualMIDISynth and Microsoft GS Wavetable Synth.

easyaspi314 avatar Jun 07 '17 15:06 easyaspi314

I noticed this here

ControlChangeEvent *ctrl =
	dynamic_cast<ControlChangeEvent*>(event);
if(ctrl){
	// insert all ControlChanges on first position
	// playerMap->insert(msOfTick(cursorTick())-1, ctrl);
}

Uncommenting // playerMap->insert(msOfTick(cursorTick())-1, ctrl); seems to fix this, but I am really curious why this was commented out.

easyaspi314 avatar Aug 01 '17 15:08 easyaspi314