Go Back   Cockos Incorporated Forums > Projects > Deprecated REAPER issue tracker > Closed Issue

Solo leaves orphaned MIDI notes hanging for ever! Issue Tools
issueid=894 08-08-2009 03:37 PM
Human being with feelings
Solo leaves orphaned MIDI notes hanging for ever!


create a song with a few midi tracks, record some long (4 beats) notes on each track for this test..

With your song playing Solo a track, other long notes continue to be played (IE no note off sent)..

I seen a few mentions of it here, none of them are solution they are workarounds. And I I don't want to be reaching for "F3" key every time I solo ;-)

IMHO: The behaviour should be to send "all notes off" to all active channels on solo activate, except the solo'ed channels, of course.

Issue Details
Issue Type Closed Issue
Project Deprecated REAPER issue tracker
Category MIDI recording and playback
Status Fixed
Priority 5 - Medium
Affected Version 3.06
Closed Version 4.32
Yes votes 39
No votes 2
Assigned Users (none)
Tags external MIDI, hanging notes, MIDI, mute, solo

09-21-2009 09:04 AM
edit: oops
09-21-2009 09:19 AM
Human being with feelings
Hi Justin.

I'm not using any reaper plugins for this..


I am routing straight to MIDI hardware (via USB and firewire)
USB to Korg Radias and the Firewire->M-Audio 1814->Roland XP-10..

The firewire output device has -8.9 offset. The USB Radias has no offset.

Orphaned note-on's happen on both devices. any long note playing at the time you press solo will be orphaned (poor little orphans).. if you solo when stopped then no problem.

I can reproduce it 100% of the time using the scenario in my original post.

Full Environment
Dell XPS M1530 (T9300 & 4GB), Dual Mon
Windows 7 32bit
M-Audio 1814 on firewire, 1 MIDI port
Korg Radias on USB, 2*MIDI ports (internal instrument\keyboard and external MIDI in/out/thru)
Yamaha FB-01
oh, and of course.. My Sticky Fingers
09-21-2009 09:21 AM
The issue is when routing multiple MIDI tracks to the same destination. We're thinking about the best way to handle this.
09-21-2009 09:36 AM
Human being with feelings
It will be multiple MIDI tracks to Multiple outputs

eg I get hanging notes on the midi device connected via the firewire and on the USB
09-21-2009 11:16 AM
Edit: got it, thanks. We'll look into fixing.
09-21-2009 12:30 PM
Human being with feelings
11-15-2009 07:06 AM
Human being with feelings
what about when you seek play ?
should reaper send note off per note on or all notes off, before it changes playback position ?
08-15-2011 12:02 PM
Human being with feelings
Implementation ideas:

This can be implemented in two ways:

- Fix 1: 'Brute Force'
On Mute (or indirect Mute-by-Solo), send 'All Notes Off' event, but since these are tied to a MIDI channel, it would be needed to send 16 of these events, one for each MIDI channel.
Now, this would work, there would be no more hanging notes on Mute/Solo actions, but the drawback is that with multitimbral instruments, the Mute action will affect the whole instrument, so it would appear that the whole instrument is muted for a short moment, and after a while all other tracks/channels/timbres would continue to play normally. So, it would work but it's a brute force approach, not so elegant.

- Fix 2: 'Note On Buffer'
Keep an ongoing buffer(s) of all started notes per item (or track). As soon as Note-On event is played, put info about it in the buffer. The info needed is the MIDI channel and Note Number (pitch). As soon as Note-Off event is played, remove the info about the matching Note-On from the buffer. On Mute, cycle through all items in the buffer and send a Note-Off event for each one.
This solution would work perfectly and would not have any side effects. MIDI mutes and solos would work as one would expect.

Here's a simple inspirational code:

our %midi_note_buffer;

sub on_Note_On
	my $channel = shift;
	my $note_nr = shift;
	my $buffer_key = $channel . "|" . $note_nr;
	$midi_note_buffer{$buffer_key} = 1;

sub on_Note_Off
	my $channel = shift;
	my $note_nr = shift;
	my $buffer_key = $channel . "|" . $note_nr;
	$midi_note_buffer{$buffer_key} = undef;

sub on_Mute
	my @buffer_key_decode;
	my $channel;
	my $note_nr;
	foreach my $buffer_key(%midi_note_buffer)
		@buffer_key_decode = split(/\|/, $buffer_key);
		$channel = $buffer_key_decode[0];
		$note_nr = $buffer_key_decode[1];
		Send_Note_Off_Event($channel, $note_nr);
		$midi_note_buffer{$buffer_key} = undef;
05-17-2013 03:55 PM
Human being with feelings
This problem has been back for a while. Currently on V4.41pre5.

Issue Tools
Subscribe to this issue

All times are GMT -7. The time now is 02:12 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.