ahlstromcj / sequencer64

A major reboot of Seq24. Current release 0.97.0 (2021-05-13), native JACK MIDI, Song recording, playlists, and a Windows/Qt version. For fresher code, see the Seq66 project. Note that trigger and mute-group-in-MIDI-file formats have evolved! Back up your work!
GNU Affero General Public License v3.0
237 stars 28 forks source link

[Bug] MIDI output sending incorrect messages #161

Open TDeagan opened 6 years ago

TDeagan commented 6 years ago

Sigh, so sorry to be bringing up so much foo, I'm just so deep into trying to get Seq64 working in my flame effect project that stuff keeps surfacing.

Problem Description: Incorrect MIDI messages are occasionally substituted for desired messages.

System: Seq64rt (--disable-shared) running on (known problematic, see #160,) Raspberry Pi 3 with Raspian/Pixel (Debian Stretch) --alsa switch in place

Replication Detail: I have a very simple MIDI file that consists of a series of 8 sequential notes (notes 3C - 43) that are sent in sequence. When running, it occasionally substitutes an incorrect message (in the example below a NoteOn where a NoteOff should be,) for a desired message. I can recreate this behavior with a variety of note sequences. I'm splitting the output of the MIDI port and routing one side back into the machine where I am capturing the resulting input with amidi (results below.)

This was originally noticed when the 8 LEDs on the target MIDI device (representing a configurable set of 8 notes, in this case 3C-43) seemed to be blinking out of order when running various sequences. In performances, these LED indicate open or closed valves which are releasing high pressure propane vapor to create carefully timed fireballs (so, as you may guess, I'm anxious about inadvertantly sending them the wrong messages.)

The problem occurs randomly, approximately every 8-12 cycles of the sequence. I have not captured any

Normal Sequence: 90 3C 64 80 3C 40 90 3D 64 80 3D 40 90 3E 64 80 3E 40 90 3F 64 80 3F 40 90 40 64 80 40 40 90 41 64 80 41 40 90 42 64 80 42 40 90 43 64 80 43 40

Broken Sequence: 90 3C 64 80 3C 40 90 3D 64 80 3D 40 90 3E 64 80 3E 40 90 3F 64 80 3F 40 90 40 64 80 40 40 90 41 64 80 41 40 90 42 64 90 40 64 - Note40 NoteOn msg in place of the missing Note42 NoteOff msg (80 42 40) 90 43 64 80 43 40

ahlstromcj commented 6 years ago

Can you attach the file or email it to me? Also, is this the ALSA or JACK engine? Thanks for the report! So much to do! :-D

-------- Tim Deagan 13:05 Sun 09 Sep --------

Sigh, so sorry to be bringing up so much foo, I'm just so deep into trying to get Seq64 working in my flame effect project that stuff keeps surfacing.

Problem Description: Incorrect MIDI messages are occasionally substituted for desired messages.

Replication Detail: I have a very simple MIDI file that consists of a series of 8 sequential notes (notes 3C - 43) that are sent in sequence. When running, it occasionally substitutes an incorrect message (in the example below a NoteOn where a NoteOff should be,) for a desired message. I can recreate this behavior with a variety of note sequences. I'm splitting the output of the MIDI port and routing one side back into the machine where I am capturing the resulting input with amidi (results below.)

This was originally noticed when the 8 LEDs on the target MIDI device (representing a configurable set of 8 notes, in this case 3C-43) seemed to be blinking out of order when running various sequences. In performances, these LED indicate open or closed valves which are releasing high pressure propane vapor to create carefully timed fireballs (so, as you may guess, I'm anxious about inadvertantly sending them the wrong messages.)

The problem occurs randomly, approximately every 8-12 cycles of the sequence. I have not captured any

Normal Sequence: 90 3C 64 80 3C 40 90 3D 64 80 3D 40 90 3E 64 80 3E 40 90 3F 64 80 3F 40 90 40 64 80 40 40 90 41 64 80 41 40 90 42 64 80 42 40 90 43 64 80 43 40

Broken Sequence: 90 3C 64 80 3C 40 90 3D 64 80 3D 40 90 3E 64 80 3E 40 90 3F 64 80 3F 40 90 40 64 80 40 40 90 41 64 80 41 40 90 42 64 90 40 64 - Note40 NoteOn msg in place of the missing Note42 NoteOff msg (80 42 40) 90 43 64 80 43 40

— You are receiving this because you are subscribed to this thread. Reply to this email directly, [1]view it on GitHub, or [2]mute the thread.

References

Visible links

  1. https://github.com/ahlstromcj/sequencer64/issues/161
  2. https://github.com/notifications/unsubscribe-auth/AHnVqADIO_pWCw6djk4eDT6-RJ4pMQhSks5uZXR1gaJpZM4Wgbfe

-- Bridge ahead. Pay troll.

TDeagan commented 6 years ago

test.mid.gz

this is the full file I'm using, the problem occurs with any of the clips.

ahlstromcj commented 6 years ago

Thanks! Saved. Had too much wine and ready to sleep. Will check it mañana.

On Mon, Sep 10, 2018, 19:23 Tim Deagan notifications@github.com wrote:

test.mid.gz https://github.com/ahlstromcj/sequencer64/files/2368743/test.mid.gz

this is the full file I'm using, the problem occurs with any of the clips.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ahlstromcj/sequencer64/issues/161#issuecomment-420093312, or mute the thread https://github.com/notifications/unsubscribe-auth/AHnVqNVTfV2w5C0yhBVH7IzCz309kxnMks5uZvRfgaJpZM4Wgbfe .

ahlstromcj commented 6 years ago

So far I cannot duplicate it running seq64 (debug version) using ALSA into kmidimon. Ran the "left/right" pattern for a few minutes and examined the events with a text editor. I am wondering if the Pi is getting stressed. I will probably try running the experiment again, perhaps on the 32 bit laptop I have for that purpose. But may have to put that off until after Hurricane Florence (Night-in-Gale :-D).

TDeagan commented 6 years ago

I have no trouble suspecting the Pi. Watching 'top' while it's running doesn't show any bottlenecking on the CPU or memory, but it could be a threads or other more obscure problem.

As the son of a Navy hurricane forecaster, I vote to let Florence take priority!!! Be safe.

ahlstromcj commented 6 years ago

I did get seq64 built on a single-core Acer laptop with 4Gb RAM running 32-bit Debian Stable. The build took forever on that machine! I installed kmidimon and ran the left/right track for awhile while bootstrapping again to put on a load, captured the events, and found no issue. Probably one of these days I ought to get a Pi and troubleshoot on it.