raspberry-pialsajacksupercollider

Raspberry Pi 3 A+ distorted/screeching audio when using ALSA + Jackd2 through on-board headphone jack


I am trying to set up Supercollider on my Raspberry Pi 3 A+ on Raspbian Lite using this guide. Jackd2 and Supercollider both compile fine, and there are no errors when I try to run Supercollider or the jack_simple_client test. However, regardless of different sample rates, buffer sizes, number of periods etc. used in booting the jack server the audio always comes out heavily distorted, with loud high pitched squealing and low popping noises.

Using the speaker-test command from ALSA creates a clean, non distorted test tone. Previously trying pyo as a DSP module would also suffer from the same issue if I used Jack, but would work fine otherwise. This leads me to believe that there is some issue in the communication between jack and ALSA. Power supply is likely not the problem as well. My installed jack version is 1.9.17 and ALSA is k5.4.83-v7+. I am new to working with Linux audio/Jack, so any help is much appreciated!


Solution

  • Things I would try:

    1. Try jack2

    2. Get a fresh SD card, and use the version of jack that comes with raspbian and then either try building again or just trying to also get SuperCollider via apt.

    sudo apt-get install cmake libasound2-dev libsamplerate0-dev libsndfile1-dev libavahi-client-dev libicu-dev libreadline-dev libfftw3-dev libxt-dev libcwiid1 libcwiid-dev subversion libqt4-dev libqtwebkit-dev libjack-jackd2-dev
    
    1. Check how it sounds out of the HDMI port or a USB audio adaptor or a hat. The headphone jack tends to sound terrible anyway on raspberry pis, so if something else works, that's you answer.