Pd Midi Error?

Hey evryone,

I have successfully integrated a Midi Input to my Daisy Seed and i can send midi notes from ableton to my Pd Synthesizer running on the daisy. I have 12 Analog controls (simple potentiometeres) connected, as well as two switches and two leds via the digital inputs.

Now my problem: when i use the midi-input, after a short period of time (sometimes after 10 seconds, sometimes after 1minute) the whole system “crashes” and the daisy outputs a really loud high pitch frequency (like a 1K Hz Saw wave maybe). This does clearly not come from the patch (at least i think so), as it immediately overruns any other function of the controls, switches and leds.

When i disconnect the power source and reconnect it, or if i press the reset button, the patch starts working as expected. But only until this issue comes up again after 20 or 30 seconds. Also, even if the patch stops working due to the error, i can still hear some clicks from the daisy output when the midi is received.

Could this be caused due to some kind of data overflow?

Here you can see my midi-in circuit, connected to the UART4 Rx (Pin 12) of the Daisy. The optocoupler i use is the 6N138 which should be fast enough for midi data (i suppose, as it is recommended in the official Midi documentation).

In Pd, i receive the midi note via the notein object and then i process the data further. When i send the midi from ableton directly to plug data i never had any issue like that. Here you can see how i used the midi data to trigger my Amp Envelope.


Thanks for your help!

I am assuming you are on plugdata v0.9.1?

We have implemented several MIDI fixes for Daisy in the development version recently!
This should resolve the vast majority of MIDI related crashes.

It would be great if you can test the latest nightly and updated toolchain to confirm that it works for you → plugdata - Download

Hey, thanks a lot for your help! I installed the new version and it seems to run a lot smoother. The issue still occurs but i think i managed to pin it down to the envelope settings. When the note length is set too long this must cause some sort of overflow. I’ll work on that in the patch.

Thanks again!

Nice!

With “the issue still occurs” you mean that the Daisy is still crashing after some time?

Yes exactly. It’s now giving me the impression that it is caused primarily by the amp envelope settings in my patch. If the envelope values are set to longer sustain and decay times, the functionality collapses with the mentioned effects.

Envelopes should certainly not crash the device.

Do you mind sharing your patch?
(ideally it’s a minimal version that just showcases the problem)

sure! here is a screenshot of the minimized patch as well as the zipped patch. I multiplied the sustain value by 1000 to get values between 0ms and 1second for pluckier or longer notes. When i turn up the analog control to roughly 70% the error occurs. I tried multiplying the sustain value by a smaller number and that solves the problem…
EnvelopeTest-1.0.pd.zip (975 Bytes)

Hmm, this is very odd. I will give this a try on one of my systems when I have time (perhaps over the weekend).

However do note that this is not a “sustain” as you can’t do a sustained enveloped like this (it assumes that you have separate note on and note off events, not a simple trigger event).

1 Like

Okay thanks a lot for your support! I will look deeper into envelopes and try out a different way. I just tried adding 5 polyphonic voices to the patch above and that also caused a crash and polyphonic midi was not playable at all so far…