View Issue Details

IDProjectCategoryView StatusLast Update
0006340ardourbugspublic2020-04-19 20:17
Reportersaren Assigned Topaul  
PrioritynormalSeverityminorReproducibilitysometimes
Status closedResolutionfixed 
Product Version4.0 
Summary0006340: MIDI note off issues
DescriptionRandom (but infrequent, often just one) notes in a MIDI track appear to be sent a note off without a note on, resulting in the note not being heard.

Also, note offs don't always appear to get sent, even if the track is set to send to one channel instead of all channels.
Additional InformationThis bug found while using jackdbus. Other jack-aware programs don't seem to have this issue, but those programs may have their own ways of handling events.
TagsNo tags attached.

Activities

saren

2015-05-23 14:29

reporter   ~0016715

Also, I notice that when I click on a piano key in the piano roll, note on/off behaves perfectly. Maybe whatever code is used here should be used when playing notes?

rghvdberg

2015-07-21 21:51

reporter   ~0016919

Last edited: 2015-07-22 14:58

I have this issue too in 4.1.
I looked at the output of the midi channel and it seems that midi on and midi off sometimes weren't in the correct order.

Something like :
1. note 64 on
2. note 64 on
3. note 64 off
4. note 64 off

event number 3 should have come as event 2

very annoying bug

x42

2015-07-30 22:03

administrator   ~0016979

When you click on a key in the piano roll the event is always sent at time "0" in the cycle.

This could be due to an older version of jack2 which has (had) a bug re-ordering events:
https://github.com/jackaudio/jack2/commit/314e5f7d09a7 ?

rghvdberg

2015-08-04 22:04

reporter   ~0016988

my jack is

jackd --version
jackdmp 1.9.11
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2014 Grame.
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
jackdmp version 1.9.11 tmpdir /dev/shm protocol 8

I re-recorded the tracks via jacksync to qtractor, cleaned them up (shortened the hanging notes), exported the track and imported it in a fresh session in ardour. Gone were the hanging notes ...

I did a lot of midi region consolidation maybe there has something gone wrong ?

tartina

2015-09-08 21:50

reporter   ~0017168

I have this issue with 4.2.
I'm using a MIDI track to control zita-at1, and some note off events are missing, this is reported also by zita-at1 (the MIDI button is orange at the end of the MIDI region, should be gray). I checked with jack_midi_dump several MIDI regions and sometimes I miss 3 off events on a total of about 25 notes.

drobilla

2015-09-11 19:05

developer   ~0017183

Are the note 64's in the above example actually overlapping, or not overlapping but are sent that way? The latter seems unlikely, but perhaps if there are region edges involved or something along those lines.

Please attach said output of jack_midi_dump, or the region's MIDI file, or an entire session. We need more concrete information to see what is actually going on here and fix it.

tartina

2015-09-12 10:54

reporter   ~0017185

Last edited: 2015-09-13 14:18

I made a test midi session copying a small midi region I use to control zita-at1.
There are 25 on events and only 21 off events. If you listen to the midi region with an organ style sound, you can get the stale notes.
This region was made drawing by hand, no external keyboards were used. There was some editing of the duration and start of the notes.
I attach the session file and the output of jack_midi_dump without starting and ending controller events.
I used Ardour 4.2 as shipped with Fedora 21 x86_64, jack is 1.9.10
Using midiio debug option I got these errors:

DEBUG::MidiIO: midibuffer 0x6cc9340 push event @ 408 sz 3 0x80 0x40 0x40
DEBUG::MidiIO: midibuffer 0x6cc9340 push event @ 397 sz 3 0x80 0x42 0x40
DEBUG::MidiIO: midibuffer 0x3ccddf0 push event @ 408 sz 3 0x80 0x40 0x40
DEBUG::MidiIO: midibuffer 0x3ccddf0 push event @ 397 sz 3 0x80 0x42 0x40
DEBUG::MidiIO: MidiPort 0x6cc9340 pop event @ 408 sz 3 0x80 0x40 0x40
DEBUG::MidiIO: MidiPort 0x5038a90 pop event @ 397 sz 3 0x80 0x42 0x40
write failed, drop flushed note off on the floor, time 397 > 0

DEBUG::MidiIO: midibuffer 0x6cc9340 push event @ 737 sz 3 0x80 0x44 0x40
DEBUG::MidiIO: midibuffer 0x6cc9340 push event @ 726 sz 3 0x80 0x40 0x40
DEBUG::MidiIO: midibuffer 0x6cc9340 push event @ 795 sz 3 0x80 0x45 0x40
DEBUG::MidiIO: midibuffer 0x3ccddf0 push event @ 737 sz 3 0x80 0x44 0x40
DEBUG::MidiIO: midibuffer 0x3ccddf0 push event @ 726 sz 3 0x80 0x40 0x40
DEBUG::MidiIO: midibuffer 0x3ccddf0 push event @ 795 sz 3 0x80 0x45 0x40
DEBUG::MidiIO: MidiPort 0x6cc9340 pop event @ 737 sz 3 0x80 0x44 0x40
DEBUG::MidiIO: MidiPort 0x6cc9340 pop event @ 726 sz 3 0x80 0x40 0x40
write failed, drop flushed note off on the floor, time 726 > 0

DEBUG::MidiIO: midibuffer 0x6cc9340 push event @ 907 sz 3 0x80 0x47 0x40
DEBUG::MidiIO: midibuffer 0x6cc9340 push event @ 907 sz 3 0x80 0x3d 0x40
DEBUG::MidiIO: midibuffer 0x6cc9340 push event @ 896 sz 3 0x80 0x44 0x40
DEBUG::MidiIO: midibuffer 0x3ccddf0 push event @ 907 sz 3 0x80 0x47 0x40
DEBUG::MidiIO: midibuffer 0x3ccddf0 push event @ 907 sz 3 0x80 0x3d 0x40
DEBUG::MidiIO: midibuffer 0x3ccddf0 push event @ 896 sz 3 0x80 0x44 0x40
DEBUG::MidiIO: MidiPort 0x6cc9340 pop event @ 907 sz 3 0x80 0x47 0x40
DEBUG::MidiIO: MidiPort 0x6cc9340 pop event @ 907 sz 3 0x80 0x3d 0x40
DEBUG::MidiIO: MidiPort 0x6cc9340 pop event @ 896 sz 3 0x80 0x44 0x40
write failed, drop flushed note off on the floor, time 896 > 0

DEBUG::MidiIO: midibuffer 0x6cc9340 push event @ 735 sz 3 0x80 0x44 0x40
DEBUG::MidiIO: midibuffer 0x6cc9340 push event @ 724 sz 3 0x80 0x42 0x40
DEBUG::MidiIO: midibuffer 0x3ccddf0 push event @ 735 sz 3 0x80 0x44 0x40
DEBUG::MidiIO: midibuffer 0x3ccddf0 push event @ 724 sz 3 0x80 0x42 0x40
DEBUG::MidiIO: MidiPort 0x6cc9340 pop event @ 735 sz 3 0x80 0x44 0x40
DEBUG::MidiIO: MidiPort 0x6cc9340 pop event @ 724 sz 3 0x80 0x42 0x40
write failed, drop flushed note off on the floor, time 724 > 0

2015-09-12 10:55

 

miditest.tar.bz2 (6,130 bytes)

2015-09-12 10:55

 

miditest_dump.txt (2,990 bytes)   
1108070: 90 44 41 note on  (channel  0): pitch  68, velocity  65
1196270: 90 40 40 note on  (channel  0): pitch  64, velocity  64
1196270: 90 42 40 note on  (channel  0): pitch  66, velocity  64
1306520: 80 40 40 note off (channel  0): pitch  64, velocity  64
1350654: 90 40 40 note on  (channel  0): pitch  64, velocity  64
1372704: 90 45 40 note on  (channel  0): pitch  69, velocity  64
1482954: 80 44 40 note off (channel  0): pitch  68, velocity  64
1483000: 80 45 40 note off (channel  0): pitch  69, velocity  64
1494037: 90 47 3e note on  (channel  0): pitch  71, velocity  62
1582237: 90 3d 41 note on  (channel  0): pitch  61, velocity  65
1593262: 90 44 41 note on  (channel  0): pitch  68, velocity  65
1714537: 80 47 40 note off (channel  0): pitch  71, velocity  64
1714537: 80 3d 40 note off (channel  0): pitch  61, velocity  64
1725608: 90 45 41 note on  (channel  0): pitch  69, velocity  65
1725608: 90 42 41 note on  (channel  0): pitch  66, velocity  65
1725608: 90 44 41 note on  (channel  0): pitch  68, velocity  65
1808249: 90 40 41 note on  (channel  0): pitch  64, velocity  65
1824787: 80 45 40 note off (channel  0): pitch  69, velocity  64
1824787: 80 42 40 note off (channel  0): pitch  66, velocity  64
1830299: 80 40 40 note off (channel  0): pitch  64, velocity  64
1852349: 90 40 41 note on  (channel  0): pitch  64, velocity  65
1924058: 90 42 41 note on  (channel  0): pitch  66, velocity  65
2056358: 80 44 40 note off (channel  0): pitch  68, velocity  64
2067440: 90 3d 41 note on  (channel  0): pitch  61, velocity  65
2067440: 90 47 41 note on  (channel  0): pitch  71, velocity  65
2122485: 80 40 40 note off (channel  0): pitch  64, velocity  64
2122565: 90 3f 41 note on  (channel  0): pitch  63, velocity  65
2166665: 80 3f 40 note off (channel  0): pitch  63, velocity  64
2232804: 80 3d 40 note off (channel  0): pitch  61, velocity  64
2243829: 80 47 40 note off (channel  0): pitch  71, velocity  64
2243840: 90 44 41 note on  (channel  0): pitch  68, velocity  65
2243840: 90 40 41 note on  (channel  0): pitch  64, velocity  65
2243840: 90 42 41 note on  (channel  0): pitch  66, velocity  65
2541400: 80 44 00 note off (channel  0): pitch  68, velocity   0
2552425: 80 42 00 note off (channel  0): pitch  66, velocity   0
2585500: 90 44 41 note on  (channel  0): pitch  68, velocity  65
2596525: 80 40 00 note off (channel  0): pitch  64, velocity   0
2640625: 90 42 41 note on  (channel  0): pitch  66, velocity  65
2651650: 80 44 40 note off (channel  0): pitch  68, velocity  64
2717789: 80 42 40 note off (channel  0): pitch  66, velocity  64
2739850: 90 44 41 note on  (channel  0): pitch  68, velocity  65
2772925: 90 42 41 note on  (channel  0): pitch  66, velocity  65
2800603: 90 40 41 note on  (channel  0): pitch  64, velocity  65
2806000: 80 44 40 note off (channel  0): pitch  68, velocity  64
2817014: 80 42 40 note off (channel  0): pitch  66, velocity  64
2894304: 80 40 40 note off (channel  0): pitch  64, velocity  64
miditest_dump.txt (2,990 bytes)   

x42

2015-09-14 00:04

administrator   ~0017189

Last edited: 2015-09-14 00:10

The Vox-at-4-1.mid file in miditest.tar.bz2 is correctly ordered

midicomp Vox-at-4-1.mid | grep -v Spec

...
230460 On ch=1 n=64 v=64
249660 On ch=1 n=69 v=64
345650 Off ch=1 n=64 v=64
345660 Off ch=1 n=68 v=64
345720 Off ch=1 n=69 v=64
355330 On ch=1 n=71 v=62
...


and matches Ardour's SMFSource::load_model() debug-print line 681

...
SMF Vox-at-4-1.mid load model delta 38460, time 230460, size 3 buf 0x90 0x40 0x40 , type 0
SMF Vox-at-4-1.mid load model delta 19200, time 249660, size 3 buf 0x90 0x45 0x40 , type 0
SMF Vox-at-4-1.mid load model delta 95990, time 345650, size 3 buf 0x80 0x40 0x40 , type 0
SMF Vox-at-4-1.mid load model delta 10, time 345660, size 3 buf 0x80 0x44 0x40 , type 0
SMF Vox-at-4-1.mid load model delta 60, time 345720, size 3 buf 0x80 0x45 0x40 , type 0
SMF Vox-at-4-1.mid load model delta 9610, time 355330, size 3 buf 0x90 0x47 0x3e , type 0
...

but the resulting Evoral::Sequence -- add a "_model->dump(cerr);" at the end SMFSource::load_model() -- has a wrong order:

...
Event 0003854 type = 222 @ 12.0031 90 40 40
Event 0003855 type = 222 @ 13.0031 90 45 40
Event 0003856 type = 173 @ 18.0031 80 44 40
Event 0003857 type = 173 @ 18.0026 80 40 40 # <<<<
Event 0003858 type = 173 @ 18.0063 80 45 40
Event 0003859 type = 222 @ 18.5068 90 47 3e
...


PS. use 137.81 BPM @ 44.1K inArdour for the sample timestamps to match the midi event time.

x42

2015-09-14 02:59

administrator   ~0017190

The issue with Vox-at-4-1.mid from miditest.tar.bz2 is fixed in 4.2-255-ge63c3d0
( for an explanation see the git log: https://github.com/Ardour/ardour/commit/e63c3d0 )

Hard to say if it is the same as the originally reported issue. Please test.

tartina

2015-09-14 06:55

reporter   ~0017191

Last edited: 2015-09-14 08:16

Great Robin, I was inspecting priority_queeu too, but I couldn't find why the Comparator was wrong. Great catch.
I will do more testing ASAP also with the original session, but I'm confident this bug is gone.

tartina

2015-09-14 22:07

reporter   ~0017196

I made some other testing with my original session and I can confirm this bug is solved, but as I am not the original reporter I can not mark it solved. I hope the original reporter can test the patched version and mark it closed.

paul

2015-09-15 17:26

administrator   ~0017202

see notes.

x42

2015-09-15 19:06

administrator   ~0017204

The issue was reported by saren not tartina.
I'm not sure if it's the same or if tartina just hijacked this report :)

@saren It'd be great if you could confirm that this is indeed solved for you as well.

todays' git Ardour 4.2-272-gfc74894 has another note-off fix.

system

2020-04-19 20:17

developer   ~0023464

Issue has been closed automatically, by Trigger Close Plugin.
Feel free to re-open with additional information if you think the issue is not resolved.

Issue History

Date Modified Username Field Change
2015-05-23 02:17 saren New Issue
2015-05-23 14:29 saren Note Added: 0016715
2015-07-21 21:51 rghvdberg Note Added: 0016919
2015-07-22 14:51 rghvdberg Note Edited: 0016919
2015-07-22 14:58 rghvdberg Note Edited: 0016919
2015-07-30 22:03 x42 Note Added: 0016979
2015-08-04 22:04 rghvdberg Note Added: 0016988
2015-09-08 21:50 tartina Note Added: 0017168
2015-09-11 19:05 drobilla Note Added: 0017183
2015-09-12 10:54 tartina Note Added: 0017185
2015-09-12 10:55 tartina File Added: miditest.tar.bz2
2015-09-12 10:55 tartina File Added: miditest_dump.txt
2015-09-12 15:18 tartina Note Edited: 0017185
2015-09-12 15:21 tartina Note Edited: 0017185
2015-09-13 09:29 tartina Note Edited: 0017185
2015-09-13 14:15 tartina Note Edited: 0017185
2015-09-13 14:17 tartina Note Edited: 0017185
2015-09-13 14:18 tartina Note Edited: 0017185
2015-09-14 00:04 x42 Note Added: 0017189
2015-09-14 00:04 x42 Note Edited: 0017189
2015-09-14 00:07 x42 Note Edited: 0017189
2015-09-14 00:10 x42 Note Edited: 0017189
2015-09-14 00:10 x42 Note Edited: 0017189
2015-09-14 02:59 x42 Note Added: 0017190
2015-09-14 03:00 x42 Status new => feedback
2015-09-14 06:55 tartina Note Added: 0017191
2015-09-14 08:16 tartina Note Edited: 0017191
2015-09-14 22:07 tartina Note Added: 0017196
2015-09-15 17:26 paul Note Added: 0017202
2015-09-15 17:26 paul Status feedback => resolved
2015-09-15 17:26 paul Resolution open => fixed
2015-09-15 17:26 paul Assigned To => paul
2015-09-15 19:06 x42 Note Added: 0017204
2020-04-19 20:17 system Note Added: 0023464
2020-04-19 20:17 system Status resolved => closed