MiniDexed icon indicating copy to clipboard operation
MiniDexed copied to clipboard

With MidiDumpEnabled=1, only outputs MIDI dump to HDMI, every 31/32 input events

Open nhemsley opened this issue 1 year ago • 8 comments

Strange one. I think this worked a couple of days ago on the same build.

It appears the midi keypresses are being output to ~~hdmi~~ stdio every 31/32 presses.

Sound works fine though, no latency.

Any ideas? Reformat?

Running on Raspberry PI 4 B

Edit: This is MiniDexed_2024-09-08-6c56960. I will reformat and try with the latest.

Edit: Reformatted, tried with MiniDexed_2024-09-29-8c18e60. Still the same problem.

nhemsley avatar Oct 01 '24 05:10 nhemsley

Probably caused by this:

https://github.com/smuehlst/circle-stdlib/issues/35

nhemsley avatar Oct 01 '24 08:10 nhemsley

@smuehlst do you know what's going on? Thanks

probonopd avatar Nov 15 '24 18:11 probonopd

@probonopd Could you explain what MIDI dump to HDMI actually does? Is it in any way related to stdio? The problem with https://github.com/smuehlst/circle-stdlib/issues/35 was that stdout was no longer line-buffered. @nhemsley Why do you think that https://github.com/smuehlst/circle-stdlib/issues/35 is related to this problem?

smuehlst avatar Nov 16 '24 00:11 smuehlst

Further evidence that https://github.com/smuehlst/circle-stdlib/issues/35 is unrelated:

  • MiniDexed is using circle-stdlib v15.12 if I'm interpreting the submodule information correctly.
  • The problem described in https://github.com/smuehlst/circle-stdlib/issues/35 was introduced in circle-stdlib v16.3 and it was fixed in circle-stdlib v16.4.

smuehlst avatar Nov 16 '24 00:11 smuehlst

@smuehlst, It is printf debugging of the midi codes coming in.

See here: https://github.com/probonopd/MiniDexed/blob/8c18e60e5133a56e7208c4ff051cc2ec80e0aaa1/src/mididevice.cpp#L141-L179

putting a manual flush in the code linked fixes this, but it's perhaps better to upgrade to the version that fixes the line buffering bug.

nhemsley avatar Nov 16 '24 00:11 nhemsley

@nhemsley could you please test the build at https://github.com/probonopd/MiniDexed/pull/758#issuecomment-2480491725? Thanks.

probonopd avatar Nov 16 '24 09:11 probonopd

I gave that a try, but the PI goes into a reboot cycle. I'll build locally and try that in a few hours.

nhemsley avatar Nov 17 '24 02:11 nhemsley

Apologies for the delay, building locally presented challenges, as its been a while, then life got in the way.

nhemsley avatar Dec 04 '24 06:12 nhemsley