View Issue Details

IDProjectCategoryView StatusLast Update
0006025ardourbugspublic2020-04-19 20:16
Reporterflorianb Assigned Toflorianb  
PrioritynormalSeveritymajorReproducibilityrandom
Status closedResolutionfixed 
Summary0006025: MIDI data randomly lost between MidiBuffer and JACKAudioBackend::midi_event_put
DescriptionSome MIDI data from Ardour is getting randomly lost after MidiIO debug. The data never reaches the function JACKAudioBackend::midi_event_put.
 
Curiously, this happens very often on MTC, extremely rarely on MMC, and never on MIDI Clock.
It also happens often for MIDI track controllers such as sustain pedal.
The MTC seems sent when position is changed with the mouse in Ardour's window, but not when changed from an MCU wheel (randomly dropped)
 
Increasing the jack buffer to a non-reasonable value of 2048 for such powerful machine helps a lot.
Probability of MTC event loss using MCU wheel with 512*2 jack buffer is about 50%.
Additional InformationArdour git 3.5-3515 g3e702c5 downloaded on 20141112
Occurs in recent previous versions as well.
Jack 1.9.10
Slackware64 14.1
Linux 3.14.12-rt9
-
Core i3-4150 3.65MHz
16GB DDR3 2500MHz
SSD Samsung
RME RayDay.
-
Debated on IRC on 2014-11-13 at night between FlorianBd and rgareus.
TagsNo tags attached.

Activities

robertnyles

2014-11-14 14:54

reporter   ~0015971

That could be the reason ardour doesn't record most of my sustain pedal. I would like to help with informations I could give.

florianb

2014-11-14 15:26

reporter   ~0015972

robertnyles: for you and anyone else passing by here, can you:
 
- start ardour in terminal with --debug MTC
- disable MMC and MIDI Clock in preferences, but send MTC
- start jack_midi_dump and connect it in jack to Ardour's MTC output
 
Then, if you have a Mackie Control, move the wheel to relocate the cursor, and observe if jack_midi_dump always receives what the MTC debug claims to send.
 
For me it seems to work when relocating the cursor by clicking on the top bar of Ardour, but not from an MCU.
 
Maybe you can setup some similar test to dump the pedal data...
You could create a test midi track with some very cyclic pedal data, then look at the dump connected to the appropriate output.

florianb

2014-11-14 16:00

reporter   ~0015973

Ideally you can modify
libs/backends/jack/jack_portengine.cc
in the source like this:
http://pastebin.com/BJHG4uY7
then recompile Ardour and it will print every single data sent to jack.
 
That's how I know that the data never reaches the JACKAudioBackend::midi_event_put function.

robertnyles

2014-11-14 19:06

reporter   ~0015974

Last edited: 2014-11-14 19:08

I used your settings and recorded a test with sustain pedal.

ardour --debug MTC says:
//
Ardour3.5.403 (kompiliert mit Version 3.5-403-gec2cb31 und GCC Version4.8.3 20140911 (Red Hat 4.8.3-7))
//
Kann die SIGPIPE Fehlerbehandlung nicht installieren
//
drop flushed event on the floor, time 0 to early for 1 + 0
drop flushed event on the floor, time 0 to early for 1 + 0
drop flushed event on the floor, time 0 to early for 1 + 0
drop flushed event on the floor, time 0 to early for 1 + 0
drop flushed event on the floor, time 0 to early for 1 + 0
0x7fc78c102660 note 48/0 was already on, now at 2
0x7fc78c102660 note 36/0 was already on, now at 2
0x7fc78c102660 note 48/0 was already on, now at 3
0x7fc78c102660 note 36/0 was already on, now at 3
drop flushed event on the floor, time 0 to early for 1 + 0
drop flushed event on the floor, time 0 to early for 1 + 0
drop flushed event on the floor, time 0 to early for 1 + 0
drop flushed event on the floor, time 0 to early for 1 + 0
drop flushed event on the floor, time 0 to early for 1 + 0

But the record is correct with these settings. The midi dump seems to get all events from my piano. That are much more than I'd expected.

With my usual settings only the record was missing the pedal data sometimes. While playing the synth gets everything.

2014-11-14 19:47

 

ardour-bug6025-debug-log.txt (2,221 bytes)   
# output of --debug MidiIO,MTC
# Difference between debug log when data was lost, and not lost.

##### LOST : #####
DEBUG::MidiIO: midibuffer 0x3354940 push event @ 85 sz 3 0xb0 0x3c 0x1 
DEBUG::MTC: Full MTC TC 214400
DEBUG::MidiIO: midibuffer 0x4d2b3d0 push event @ 0 sz 10 0xf0 0x7f 0x7f 0x1 0x1 0x60 0x0 0x2 0x6 0xf7 
DEBUG::MidiIO: midibuffer 0x3341fa0 push event @ 0 sz 3 0x90 0x56 0x0 
DEBUG::MidiIO: midibuffer 0x3341fa0 push event @ 0 sz 3 0x90 0x5e 0x0 
DEBUG::MidiIO: midibuffer 0x3341fa0 push event @ 0 sz 3 0x90 0x5d 0x7f 
DEBUG::MidiIO: midibuffer 0x3341fa0 push event @ 0 sz 3 0x90 0x5b 0x0 
DEBUG::MidiIO: midibuffer 0x3341fa0 push event @ 0 sz 3 0x90 0x5c 0x0 
DEBUG::MTC: Full MTC TC 214400
DEBUG::MidiIO: midibuffer 0x4d2b3d0 push event @ 0 sz 10 0xf0 0x7f 0x7f 0x1 0x1 0x60 0x0 0x2 0x6 0xf7 
DEBUG::MidiIO: midibuffer 0x3341fa0 push event @ 0 sz 3 0xb0 0x40 0x37 
DEBUG::MidiIO: midibuffer 0x3341fa0 push event @ 0 sz 3 0xb0 0x41 0x39 
DEBUG::MidiIO: midibuffer 0x3341fa0 push event @ 0 sz 3 0xb0 0x42 0x37 
# NOTE: there a missing line here comparing to the following working case.
# -> jack_midi_dump DID NOT RECEIVE ANYTHING.

##### NOT LOST : #####
DEBUG::MidiIO: midibuffer 0x3354940 push event @ 21 sz 3 0xb0 0x3c 0x1 
DEBUG::MTC: Full MTC TC 220800
DEBUG::MidiIO: midibuffer 0x4d2b3d0 push event @ 0 sz 10 0xf0 0x7f 0x7f 0x1 0x1 0x60 0x0 0x2 0x8 0xf7 
DEBUG::MidiIO: midibuffer 0x3341fa0 push event @ 0 sz 3 0x90 0x56 0x0 
DEBUG::MidiIO: midibuffer 0x3341fa0 push event @ 0 sz 3 0x90 0x5e 0x0 
DEBUG::MidiIO: midibuffer 0x3341fa0 push event @ 0 sz 3 0x90 0x5d 0x7f 
DEBUG::MidiIO: midibuffer 0x3341fa0 push event @ 0 sz 3 0x90 0x5b 0x0 
DEBUG::MidiIO: midibuffer 0x3341fa0 push event @ 0 sz 3 0x90 0x5c 0x0 
DEBUG::MTC: Full MTC TC 220800
DEBUG::MidiIO: midibuffer 0x4d2b3d0 push event @ 0 sz 10 0xf0 0x7f 0x7f 0x1 0x1 0x60 0x0 0x2 0x8 0xf7 
DEBUG::MidiIO: midibuffer 0x3341fa0 push event @ 0 sz 3 0xb0 0x40 0x34 
DEBUG::MidiIO: midibuffer 0x3341fa0 push event @ 0 sz 3 0xb0 0x41 0x32 
DEBUG::MidiIO: midibuffer 0x3341fa0 push event @ 0 sz 3 0xb0 0x42 0x31 
DEBUG::MidiIO: midibuffer 0x3341fa0 push event @ 0 sz 3 0xb0 0x43 0x31 
# -> jack_midi_dump received:
# f0 7f 7f 01 01 60 00 02 08 f7


ardour-bug6025-debug-log.txt (2,221 bytes)   

robertnyles

2014-11-14 20:34

reporter   ~0015976

Suddenly while playing back all sustain data was ignored until stop. And I had no dump... Everything worked fine for hours. I changed settings and tried to decrease the buffer to 128/3. When the bug occurs so rarely it's very difficult to get some data.
Do you get a MIDI-off when you stop playback? I don't. That bug should have been fixed. Maybe it correlates.
http://tracker.ardour.org/view.php?id=2139

florianb

2014-11-16 21:22

reporter   ~0015987

robertnyles: how many cpu do you use in ardour's preferences? I was using only one and I can ALMOST never reproduce the issue when using "all processors" (2)

florianb

2014-11-20 21:33

reporter   ~0015995

This and other midi data related issues were fixed by Drobilla on 2014-11-20 in 3.5-3624-g4bc0d1c.
Please re-open this ticket if it's not the case.

florianb

2014-11-20 21:33

reporter   ~0015996

This and other midi data related issues were fixed by Drobilla on 2014-11-20 in 3.5-3624-g4bc0d1c.
Please re-open this ticket if it's not the case.

florianb

2014-11-20 21:36

reporter   ~0015997

I guess "resolved" is better than "closed"

system

2020-04-19 20:16

developer   ~0023340

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
2014-11-14 04:21 florianb New Issue
2014-11-14 14:54 robertnyles Note Added: 0015971
2014-11-14 15:26 florianb Note Added: 0015972
2014-11-14 16:00 florianb Note Added: 0015973
2014-11-14 19:06 robertnyles Note Added: 0015974
2014-11-14 19:08 robertnyles Note Edited: 0015974
2014-11-14 19:47 florianb File Added: ardour-bug6025-debug-log.txt
2014-11-14 20:34 robertnyles Note Added: 0015976
2014-11-16 21:22 florianb Note Added: 0015987
2014-11-20 21:33 florianb Note Added: 0015995
2014-11-20 21:33 florianb Note Added: 0015996
2014-11-20 21:33 florianb Status new => resolved
2014-11-20 21:33 florianb Resolution open => fixed
2014-11-20 21:33 florianb Assigned To => florianb
2014-11-20 21:33 florianb Status resolved => closed
2014-11-20 21:36 florianb Note Added: 0015997
2014-11-20 21:36 florianb Status closed => feedback
2014-11-20 21:36 florianb Resolution fixed => reopened
2014-11-20 21:36 florianb Status feedback => resolved
2014-11-20 21:36 florianb Resolution reopened => fixed
2020-04-19 20:16 system Note Added: 0023340
2020-04-19 20:16 system Status resolved => closed