Stuck Notes

#1

I’m getting ready to build a Zynthian, trying to decide if I want to order the complete kit…

So, I burned the zynthian_gorgona_omega_rbpi3_kitv2-2018-04-03.img to SD, booted it on Model 3b with a cheap 3.5 touchscreen, plugged Audioengine A2+ speakers into USB, used web to set wiring to dummies and audio to USB. I’ve used Arturia Minilab and Keylab controllers on USB.

Aside from the X axis of touchscreen being inverted, it works pretty well.

Except, with either controller, I frequently get stuck notes. Same thing happens when I use a different USB DAC.

If this is normal, I won’t spend $300 for zynthian.

Is this caused by using USB for audio and MIDI?

0 Likes

#2

Hello @tele_player,

if you use the search function for usb audio
you get a lot of information regarding usb audio.
In short, internal soundcards are recommended because the usb audio interface in the Raspberry Pi is a bit weird. You want low latency for audio so usb audio is not the way you will choose.
I don’t know if your specific problem with stuck notes is due to the USB MIDI implementation, but some people on this forum who are more experienced than me might chime in.
Please keep asking questions here in the forum, we are a very active community glad to help.

Thank you and God bless, Marius

0 Likes

#3

Thanks for replying. I understand that USB audio is not recommended, I’m just experimenting before committing money.

I suppose I could ask this differently:

Using all the recommended hardware in complete kit, are stuck notes sometimes, rarely, or never? Same on DIN as USB MIDI?

Thanks!

0 Likes

#4

Hi @tele_player. Stuck notes can be due to a variety of reasons but a properly built Zynth with approved parts does not suffer from these.

Poor MIDI interface design / components can lead to MIDI messages being lost. This is not what you are experiencing because you are using USB MIDI. (I found that the unorthodox MIDI interface used in Zynthian works much better than the more traditional interface I had previously built.)

Poor USB interface. Zynthian uses standard Linux USB class compliant drivers for MIDI USB devices so if the device works well with other operating systems without bespoke drivers it should work fine with Zynthian. Some cheap USB MIDI interfaces omit the opto-coupling which tends to work on very few devices. You don’t seem to be suffering this issue because you are using a class compliant USB device (Arturia Minilab).

If the Raspberry Pi is struggling to compute synthesis output then it may start to behave erratically. Zynthian includes many synthesis engines, some of which are resource hungry and can driver the RPi to resource exhaustion. (We are looking to minimise or eradicate this but don’t want to limit the device’s versatility.) If you are using a particularly resource hungry configuration of synthesis engines then it is plausible you are suffering such behaviour. Let us know what Layers, etc. you have configured when this occurs.

If the Linux kernel is hanging due to hardware issues then it could result in failure to service other services including MIDI, synthesis, etc. A poorly designed audio driver or audio interface could result in such behaviour. I am not familiar with the Audioengine A2+ speakers so don’t know if they would cause such an issue but it is plausible. They look to be class compliant USB audio devices so should work okay!

The bottom line is that it is certainly not normal for zynthian to hang notes and if this is occurring with a particular configuration we would like to resolve it (which may mean documenting a constraint).

0 Likes

#5

I have USB MIDI controllers, when I used the Behringer U222 USB audio interface and would frequently get stuck notes, especially on Dexed. Using HiFiBerry I get none.

0 Likes

#6

Interesting…

Both the Keylab and Minilab are usb class compliant MIDI, and work very well with other synths, for example Garage Band on Mac, Axoloti Core.

The Audioengine A2+ and D1 DAC are both Class Compliant audio devices, using different chips, both work perfectly on my MacBooks.

The stuck notes have occurred with all engines I’ve tried like DEXED, pianoteq, , and CPU utilization is usually quite low.

Also interesting, my setup has very acceptable latency, keyboard response is very playable.

0 Likes

#7

Solved.

I googled a bit for raspberry pi stuck midi (or some variation of that), and found much discussion about Rpi unusual USB ports, and various problems encountered.

Found a suggestion to add this to the Linux kernel command line (/boot/cmdline.txt):
dwc_otg.speed=1

This limits the speed of the USB port to full speed (12Mbits).

I just played several different engines, etc, for maybe 1/2 hour, without any stuck notes, and with completely acceptable latency, even though I’m using USB audio.

This is very encouraging.

4 Likes

#8

It is encouraging! excellent find. It’s not quite a panacea though as it can effectively prevent USB2 devices from working. Also if you want to use USB storage with the audio recorder I imagaine it will be very slow.

0 Likes

#9

Perhaps we could add an option in the Webconf to set on/off this otg.speed limitation when needed… Someone wanting to add an issue in the webconf repo? :wink:

0 Likes

#10

Just had an interesting little succession of events which demonstrates the potential.
Zynthian-amp2.local ( configured with Hifiberry Amp+ ) plugged in Blue yeti USB Microphone (see previous posts…), selected generic USB in webconf, rebooted.
Came up cleanly into output to Yeti headphones :slight_smile: and allowed audio to be heard coming in via Gain 2x2 Effect Engine.


Tried a record and it was working but as soon as I said Wyleu . . . . it bombed …:mage: .

All quite impressively personalised . . . :smiley:

0 Likes

#11

Update:

Yesterday, all was working well.

This morning, booted Zynthian, started getting stuck notes.
Looked at /boot/cmdline.txt, and I see that ‘dwc_otg.speed=1’ isn’t there.

Something I did must have caused cmdline.txt to be rewritten.

0 Likes

#12

Those files are overwritten with updates or certain save operations in the webconf.
You have two options. There is a switch in the scripts. (NOUPDATE or the like).
But I wouldn’t recommend it, because you want to get updates as well.
I have some changes as well and put them into a shell script which I execute via ssh, when I have to.

0 Likes

#13

Thanks, that’s what I suspected.

0 Likes

#14

Tried this tonight, and it worked for me!

M-Audio Oxygen 25 USB keyboard.
Custom Zynth (HiFiBerry DAC+, 7" RPiF display, dummies)

1 Like

#15

We will add an option to the webconf tool for limiting the USB speed.

1 Like