User avatar
AutoStatic
Posts: 326
Joined: Tue Jan 01, 2013 10:27 pm
Contact: Website

Re: RPi and real-time, low-latency audio

Thu May 15, 2014 5:08 am

walla wrote:

Code: Select all

cannot use real-time scheduling (FIFO at priority 99) [for thread -1246063504, from thread -1246063504] (1: Operation not permitted)
  • sudo dpkg-reconfigure jackd2 (or jackd1 if you have that installed)
  • Select Yes when asked to enable realtime process priority
  • sudo usermod -a -G audio youruser youruser is probably pi.
Then try my JACK command again.
RPi and real-time, low-latency audio: http://wiki.linuxaudio.org/wiki/raspberrypi
RPi audio repository: http://rpi.autostatic.com/
RPi and audio blog: https://autostatic.com/tag/raspberrypi/

walla
Posts: 5
Joined: Wed May 14, 2014 11:05 am

Re: RPi and real-time, low-latency audio

Thu May 15, 2014 2:53 pm

Thanks, I did it, but it didn't help. I also rebooted the pi to see if that would change something, but I still can't get alsa running with 3 periods.
I executed groups pi, and the user is definitely in the audio group.
The file that got created by reconfiguring jackd (/etc/security/limits.d/audio.conf) looks like this:

Code: Select all

# Provided by the jackd package.
#
# Changes to this file will be preserved.
#
# If you want to enable/disable realtime permissions, run
#
#    dpkg-reconfigure -p high jackd

@audio   -  rtprio     95
@audio   -  memlock    unlimited
#@audio   -  nice      -19
Do you have any idea why it still doesn't work? Sorry, I really have no idea what to do when it comes to linux errors...

Thank you!
Walle

User avatar
AutoStatic
Posts: 326
Joined: Tue Jan 01, 2013 10:27 pm
Contact: Website

Re: RPi and real-time, low-latency audio

Thu May 15, 2014 8:48 pm

Are you using Jack1 or Jack2? If it's Jack1 try lowering the rtprio to 84 instead of 89. It seems Jack1's watchdog thread gets in the way.
RPi and real-time, low-latency audio: http://wiki.linuxaudio.org/wiki/raspberrypi
RPi audio repository: http://rpi.autostatic.com/
RPi and audio blog: https://autostatic.com/tag/raspberrypi/

walla
Posts: 5
Joined: Wed May 14, 2014 11:05 am

Re: RPi and real-time, low-latency audio

Fri May 16, 2014 1:38 pm

I indeed use jack1. With the -P84 parameter I can finally execute your command. Don't know yet if it runs more stable. But I do get new messages now, of that kind:

Code: Select all

delay of 4227.000 usecs exceeds estimated spare time of 4199.000; restart
They happen quite often, seemingly more often when I generate / record audio, but also when jack idles. And I still can't get any undistorted audio through jack and py-jack. Is there a simple way to generate some audio like a sine wave without Python, maybe directly from the shell input? A way that would work on a well configured Raspberry? So I could check if it is a general problem with jack, or if it is on the Python side.
Would you recommend using jack1 or jack2? Does it matter?

Cheers,
Walle

walla
Posts: 5
Joined: Wed May 14, 2014 11:05 am

Re: RPi and real-time, low-latency audio

Fri Jun 20, 2014 5:48 pm

Hey AutoStatic,

I did some more testing the last days and performance seems to improve using another interface. Today though I managed to get jack not to work at all anymore, by doing a general system update through

Code: Select all

sudo apt-get update
sudo apt-get upgrade
When I try to start jack now, it quits with the following message:

Code: Select all

JACK server starting in realtime mode with priority 89
creating alsa driver ... hw:1|hw:1|256|3|48000|2|2|nomon|swmeter|soft-mode|32bit
control device hw:1
configuring for 48000Hz, period = 256 frames (5.3 ms), buffer = 3 periods
ALSA: final selected sample format for capture: 32bit integer little-endian
ALSA: use 3 periods for capture
ALSA: final selected sample format for playback: 32bit integer little-endian
ALSA: use 3 periods for playback
FATAL: cannot locate cpu MHz in /proc/cpuinfo
Apparently, the system kernel got updated to version 3.12, which - according to this discussion - removed some "bogomips" feature that jack relies on (which it is not supposed to).
They say, the solution is rebuilding jack with this commit: https://github.com/jackaudio/jack2/comm ... 74ff4995f0
Sadly I don't know how to do that. But as you maintain a repository and might be keen to retain compatibility I thought I could ask if it were possible for you to update the jack builds over at rpi.autostatic.com? ;)
I have no profound understanding of what is being changed, but to me it seems that the commit is also compatible to older kernels, where there were no problems with jack in the first place. Only thing is I don't know if this works on jackd1 as well. But at least one working jack version for the most recent Raspberry OS is better then none!

Thanks, looking forward to your answer!


EDIT:
Nevermind, I managed to compile a working jack version myself. If anyone is stuck on this problem, I did the following (you might wanna do all that in a previously created folder):

Add the src-repository, download the jackd2-sources, download AutoStatic's dbus-patch and apply it:

Code: Select all

sudo nano /etc/apt/sources.list
- add following line, then save and exit -
deb-src http://mirrordirector.raspbian.org/raspbian/ wheezy main contrib non-free rpi

sudo apt-get update
apt-get source jackd2
wget https://github.com/AutoStatic/jack-armel/raw/master/jack2_armel.diff
cd jackd2*
patch -p1 -i ../jack2_armel.diff
Next, I needed to manually edit the following source file: linux/JackLinuxTime.c - according to this commit: https://github.com/jackaudio/jack2/comm ... 74ff4995f0 (Patching it like the dbus patch didn't work as the file has changed a bit since the commit had been made, so patch would exit saying it couldn't complete every step). It's very simple, just 5 edits removing whole lines.

I have no idea what the next step does, I copied it from somebody elses way of compiling jack (http://permalink.gmane.org/gmane.comp.a ... ckit/26723):

Code: Select all

dpkg-source --commit
Next, I edited the following file: debian/rules - removing dbus:

Code: Select all

waf-configure-options += $(if $(filter linux,$(DEB_HOST_ARCH_OS)),--alsa --dbus) 
became
waf-configure-options += $(if $(filter linux,$(DEB_HOST_ARCH_OS)),--alsa)

dh_install -pjackd2 debian/tmp/usr/share/dbus-1/*
became
#dh_install -pjackd2 debian/tmp/usr/share/dbus-1/*
Next I compiled it after installing some packages needed for that:

Code: Select all

sudo apt-get install debhelper cdbs d-shlibs libsamplerate-dev libasound2-dev libsndfile1-dev libncurses-dev libreadline-dev libraw1394-dev po-debconf

dpkg-buildpackage -rfakeroot -uc -b
Now I was able to install it - the --foce-conflicts I needed to apply because I had another jack version installed which dpkg thought was newer, so it told me there were version conflicts though it was actually just the same version with some changes:

Code: Select all

cd ..
sudo dpkg -i --force-conflicts *.deb
Cheers,

Walle

cjfitz
Posts: 6
Joined: Thu Jun 26, 2014 4:15 pm

Re: RPi and real-time, low-latency audio

Tue Aug 19, 2014 6:09 pm

Hey,

I'm trying to build a low latency instrument. I am using analogue sensors to trigger audio samples from Pure Data.

I am just wondering what are the alsa settings I should use?
At the moment I have an external usb sound card.

My audio settings are: Sample rate 44.1, Delay 7ms, block size 256.

If I make the delay smaller or the block size bigger the audio i/o becomes stuck and alsa is unselectable. I need the overall latency to be less than 10ms.
I have followed most of the instructions off the wiki page, except I am still running a desktop.

Any help would be great

vorakitza
Posts: 1
Joined: Fri Oct 31, 2014 4:32 pm

Re: RPi and real-time, low-latency audio

Mon Nov 03, 2014 9:57 am

pls help me
when i try this https://raw.githubusercontent.com/AutoS ... pi/drumpad
i got this

Code: Select all

pi@raspberrypi ~ $ sudo ./drumpadscript.sh
dbus-launch: no process found
gvfsd: no process found
dbus-daemon: no process found
dhclient-bin: no process found
console-kit-daemon: no process found
polkitd: no process found
jackdmp 1.9.9
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2012 Grame.
jack server is not running or cannot be started
JACK server not running
jack server is not running or cannot be started
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
[....] Error opening file /home/pi/drumkv1/drumpad.jalv.state (No such file or directory)
new_state_from_model(): error: State file:///home/pi/drumkv1/drumpad.jalv.state missing lv2:appliesTo property
Missing plugin URI, try lv2ls to list plugins
. ok ing system message bus: dbusperformance[....] Stopping NTP server: ntpd
.
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JACK server starting in realtime mode with priority 84
control device hw:0
control device hw:0
Failed to connect to session bus for device reservation /usr/bin/dbus-launch terminated abnormally with the following error: PuTTY X11 proxy: wrong authentication protocol attemptedAutolaunch error: X11 initialization failed.


Failed to acquire device name : Audio0 error : Invalid argument
Audio device hw:0 cannot be acquired...
Cannot initialize driver
JackServer::Open failed with -1
Failed to open server
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
This's my lsusb

Code: Select all

pi@raspberrypi ~ $ lsusb
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. 
Bus 001 Device 004: ID 0d8c:013c C-Media Electronics, Inc. CM108 Audio Controller
Bus 001 Device 005: ID 09e8:007c AKAI  Professional M.I. Corp. 
i need to use Akai MPK mini as Drumpad for my Project

but when i run all program without a script it's work.
Image

Eduard.Sousa
Posts: 2
Joined: Wed Feb 04, 2015 12:31 am

Re: RPi and real-time, low-latency audio

Thu Feb 05, 2015 12:22 am

Hi, AutoStatic, great project, it work 5* to mi on x, can you help mi pls,
i have jack , and drumkv1 working on X , but i dont know how to start it without x , so it load automatically like you do in the video, or if possible on boot , because it will be to work like a drum module,

i have a alesis trigger io connected to the rasp. i use usb audio ( c media ) and its on hw0 its default

i cant start jackd on command line when i try it say
failed to connect to session bus for audio reservation unable to autolaunch a dbus-daemon without a display for x11

i am not a linux pro , i am a newbie on linux , i need this because my drum module burned , and i can't afford now a new roland module.
thank you
e.s.

sorry i was finishing of setting up my preset , and stopped to get sound , and get same wizard click noise , only when i stop jack it stops the restart jack and drumkv1 and all work ok again but after 6 or 7 minutes i get the same ? do you have any idea ?
sorry for my bad english

Eduard.Sousa
Posts: 2
Joined: Wed Feb 04, 2015 12:31 am

Re: RPi and real-time, low-latency audio

Fri Feb 06, 2015 10:34 pm

Hi i found my source of the noise , the drumkv1 after 3 or 5 minutes generate a noise like static , and den clouse, any one have or already get this ??
i found this because i opened drunkv1 alone before jack by mistake and e get a glass of water and wen i was back there it was the noise and den the drumkv1 close it selfe and the noise get out , i tray it again and the noise started.

any ideas ? , i am on my 7 sd image hoping a get the rigth config. it works but only for same minutes

jtayl711
Posts: 1
Joined: Thu Feb 19, 2015 2:46 pm

Re: RPi and real-time, low-latency audio

Mon Mar 23, 2015 4:07 am

So I'm brand new to Raspberry Pi's but this is something I've been trying to accomplish for a while. I'm in the process of trying to get the program Jamulus (anyone familiar?) to work on my Raspberry Pi but it's proving somewhat difficult. I have Pi 2 and my interface is an ART USB dual pre, which the Pi recognizes. My goal is to be able to play music in near realtime with friends over the internet using my raspberry pi. Would anyone who has accomplished this be willing to upload an image of their os with the correct configuration? I've started to look at the wiki page but I feel like it is way over my head.

azihsan
Posts: 8
Joined: Mon Apr 13, 2015 1:27 pm

Re: RPi and real-time, low-latency audio

Mon Apr 13, 2015 1:34 pm

hello
i am newbie here want to ask about how to connect my usb audio to jackd

im building rpi realtime with c-media usb headphone set, everytime i use this

Code: Select all

 jackd -R -dalsa -dhw:0 -p256 -n3
after wait for seconds, there are a lot of xrun will happen.

so, what should i do?

bricolodu13
Posts: 38
Joined: Tue Aug 07, 2012 2:05 pm

Re: RPi and real-time, low-latency audio

Wed Jun 24, 2015 5:18 pm

Hello,

Sorry if it is stupid, I'm a stupid neewbie :oops:

I have tried and succeeded to complile two different kernel with fully premptible RT Patch and 1000Hz :
Diet Pi (http://fuzon.co.uk/phpbb/viewtopic.php?f=8&t=6) with Real time patch (3.18.13-RT10+)
Navio (http://docs.emlid.com/Downloads/Real-time-Linux-RPi1/) got 3.12.36-RT50+

following this post : http://www.talkunafraid.co.uk/2014/04/r ... pberry-pi/

Code: Select all

mkdir kernel_sources
zcat /proc/config.gz > /kernel_sources .config
cd kernel_sources 
wget https://www.kernel.org/pub/linux/kernel/projects/rt/3.18/patch-3.18.13-rt10.patch.gz
#OR wget https://www.kernel.org/pub/linux/kernel/projects/rt/3.12/older/patch-3.12.36-rt50.patch.gz
gunzip patch*

git init 
git fetch git://github.com/raspberrypi/linux.git rpi-3.18.y:refs/remotes/origin/rpi-3.18.y 
git checkout rpi-3.18.y 

cat patch-3.18.13-rt10.patch | patch -p1

make bcmrpi_defconfig # I tried with and without this line
#	Start the configuration menu
make menuconfig
make
make modules 
sudo make modules install 
sudo cp arch/arm/boot/Image /boot/kernel-rt.img
#	Edit /boot/config.txt  and add the following lines:
disable_splash=1
force_turbo=1
kernel=kernel-rt.img
In both case, i had Alsamixer, aplay -l with hifibery i2S DAC working before compiling but no more sound card after
Even so I have applied the recommendated settings without success from here : https://www.hifiberry.com/guides/hifibe ... iguration/

Any idea ?

THANK YOU

bricolodu13
Posts: 38
Joined: Tue Aug 07, 2012 2:05 pm

Re: RPi and real-time, low-latency audio

Sun Jul 19, 2015 4:47 pm

Ok, I solved that one ;)

Looks like I had to re-write a good config. txt file

bricolodu13
Posts: 38
Joined: Tue Aug 07, 2012 2:05 pm

Re: RPi and real-time, low-latency audio

Sun Jul 19, 2015 4:57 pm

Now I have another challenge, I want to make FIR filtering on squeezelite

And yes I'm still newbie to linux and I'm fighting with using Jconvolver to make DRC on a Raspberry pi used as a squeezebox player

This is what I want to achieve :
send the sound to Jack, then to jconvolver then to hifiberry I2S sound card
OR
send the sound to virtual sound card, then to jconvolver then to hifiberry I2S sound card

This is where I am :

I followed http://alsa.opensrc.org/Jack_and_Loopba ... ack_bridge to create a loop virtual soundcard
and I get the following :
root@GiBi:~# aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
jack
JACK Audio Connection Kit
sysdefault:CARD=Loopback
Loopback, Loopback PCM
Default Audio Device
sysdefault:CARD=sndrpihifiberry
snd_rpi_hifiberry_dac,
Default Audio Device
root@GiBi:~# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Loopback [Loopback], device 0: Loopback PCM [Loopback PCM]
Subdevices: 8/8
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
Subdevice #4: subdevice #4
Subdevice #5: subdevice #5
Subdevice #6: subdevice #6
Subdevice #7: subdevice #7
card 0: Loopback [Loopback], device 1: Loopback PCM [Loopback PCM]
Subdevices: 8/8
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
Subdevice #4: subdevice #4
Subdevice #5: subdevice #5
Subdevice #6: subdevice #6
Subdevice #7: subdevice #7
card 1: sndrpihifiberry [snd_rpi_hifiberry_dac], device 0: HifiBerry DAC HiFi pcm5102a-hifi-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
root@GiBi:~# /usr/bin/squeezelite-armv6hf -l
Output devices:
null - Discard all samples (playback) or generate zero samples (capture)
jack - JACK Audio Connection Kit
sysdefault:CARD=Loopback - Loopback, Loopback PCM - Default Audio Device
sysdefault:CARD=sndrpihifiberry - snd_rpi_hifiberry_dac, - Default Audio Device
Squeezelite works ok with sysdefault:CARD=sndrpihifiberry (I get sound but what I want is send the sound to Jack, then to jconvolver then to hifiberry I2S sound card

Squeezelite also looks like running ok with sysdefault:CARD=Loopback

But I can't use Jack

I think that I can't use Jack directly as a valid sound card because here is what I get (although I don't understand what it exactly does....)
root@GiBi:~# jackd -P70 -p16 -t2000 -d alsa -dhw:0,0 -p128 -n3 -r44100 -s &
[1] 6508
root@GiBi:~# jackdmp 1.9.8
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2011 Grame.
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
JACK server starting in realtime mode with priority 70
creating alsa driver ... hw:0,0|hw:0,0|128|3|44100|0|0|nomon|swmeter|soft-mode|32bit
control device hw:0
configuring for 44100Hz, period = 128 frames (2.9 ms), buffer = 3 periods
ALSA: final selected sample format for capture: 32bit float little-endian
ALSA: use 3 periods for capture
ALSA: final selected sample format for playback: 32bit float little-endian
ALSA: use 3 periods for playback
driver: cannot register port for system:capture_16
Cannot attach audio driver
JackServer::Open() failed with -1
Failed to open server
^C
[1]+ Exit 255 jackd -P70 -p16 -t2000 -d alsa -dhw:0,0 -p128 -n3 -r44100 -s
I don't understand what it does but I understand it doesn't work !
May be I should had started Squeezelite first, but I thought Jack had to be started first, then Squeezelite

root@GiBi:~# jackd -P70 -p16 -t2000 -dalsa -dhw:1,0 -p128 -n3 -r44100 -s
jackdmp 1.9.8
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2011 Grame.
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
JACK server starting in realtime mode with priority 70
creating alsa driver ... hw:1,0|hw:1,0|128|3|44100|0|0|nomon|swmeter|soft-mode|32bit
control device hw:1
ALSA: Cannot open PCM device alsa_pcm for capture. Falling back to playback-only mode
configuring for 44100Hz, period = 128 frames (2.9 ms), buffer = 3 periods
ALSA: mmap-based access is not possible for the playback stream of this audio interface
ALSA: cannot configure playback channel
Cannot initialize driver
JackServer::Open() failed with -1
Failed to open server


If I understand well this second trial, I try to access the HiFiBerry soundcard through Jack ???
This fail because the I2S driver doesn't support mmap (https://www.hifiberry.com/forums/topic/jackd/)
Looks like there might be a way to emulate mmap but with poor results

So, my guess is that maybe I can make the job with the Loopback sound card rather then directly with Jack, but I have no idea how to make it.

Would anybody mind helping me ?

references :
http://alsa.opensrc.org/Jack_and_Loopba ... ack_bridge
http://proaudio.tuxfamily.org/wiki/inde ... a-ajbridge
http://wiki.linuxaudio.org/wiki/raspberrypi
bricolodu13

jannewmarch
Posts: 35
Joined: Thu Jan 17, 2013 12:45 am

Re: RPi and real-time, low-latency audio

Thu Sep 10, 2015 10:20 am

Update for RPi 2 Model B using 2015-05-05-raspbian-wheezy.img.

The version of jackd in the distro is still 1.9.9 from 2012 and still has the rough sound problem. The jackd site (http://jackaudio.org/downloads) now has version 1.9.10 in source code form which dates from 2014 but that does not improve the situation. The linux kernel is 4.1.6 so fixes involving installing a 3.9 kernel are going backwards - they haven't made it into the 4.1 kernels by the looks of it. The fix by jacob of

Code: Select all

jackd -R -P70 -p16 -t2000 -d alsa -dhw:0 -n 3 -r 44100 --shorts -i1 -o2
works okay for both 1.9.9 and 1.9.10

User avatar
PianoPlaySamplesDrum
Posts: 2
Joined: Thu Jan 28, 2016 4:42 pm

Re: RPi and real-time, low-latency audio

Thu Jan 28, 2016 6:53 pm

hello mr autostatic :D

i searched many days and weeks in the web for a professional teacher :shock: . now i think i found you because i think you knows very well the sampling world with low latency raspberry, teensy or other mini pc.

can you please help me. please :lol: iam a beginner

i want to play different sounds(bass samples) with are on a mini pc, teensy raperry on sd card. this i want to use with a akku, standalone.
when i play piano i want to play with the left hand the bass samples. for this i want to put on the piano keys a capazitiv touch metall like this https://www.youtube.com/watch?v=QttoT5OCPA0 (but this exaple had a to slow latency)

i found this
http://www.bareconductive.com/shop/touch-board/ touch board with sd card for 40 us
is this fast enoguh (latency) for playing different bass samples (about 0,1 - 2 seconds long)
the bass sound must come even when i press fast the key (may be only 0,1 seconds press time)

or i found this
https://www.youtube.com/watch?v=i22_KoAqmpI
there is a sd card slot for samples on board and a midi in out and real audio in out for about 50 us dollar. you think this is fast enough for samples

or you think the raspery pi with this touch board is faster https://shop.pimoroni.com/products/adaf ... kit-mpr121

or is it possible to make with a teensy https://www.pjrc.com/teensy/td_libs_Audio.html
touch key and send with midi out to the raspberry sound samples. is this then faster


my questions:
witch model is fast enough to play small samples. are there differents when i put on the raspberry or teensy linux, phyton, urbunto or what else. what is linuxsampler?

the next i want to do is:
i have two small midi keybords which i use to play with a normal midi expander soundcanvas with midi chanel 2 and 3.
my question. can i play with this midi keyboard the sounds, samples with are on a sd card in raspery or teensy.on chanel 2 and 3. (i wat to give other sounds by my self on the sd card)

is it possible with the rasperry or what else other mini pc, modul to play with the touch capactitiv keys and with the midi keyboard in the same time?

may be you know a other bord, modul especially for sample sounds?

thanks a lot when you can give me answers. :roll:


some more examples
https://www.youtube.com/watch?v=RsCtGyrawKA
https://www.youtube.com/watch?v=CDJ87UMOsE8 with sound on sd card

did you know how to make souch a playing pc keyboard with low lateny, because i want to give a pc keybord to my piano and then i want to play on this pc keybord other sounds too
https://www.youtube.com/watch?v=U-xiPwTF5Ok

excuse me my bad english an all my questions
i love you for your help and exause me for all my questions because i am a litle beginner

gixie
Posts: 36
Joined: Sun Aug 26, 2012 5:56 pm

Re: RPi and real-time, low-latency audio

Wed Feb 24, 2016 5:27 pm

Hello everybody,
I started looking into a guitar effects processor based on a pi or pi2 (I own both and a couple of 0s).
I managed to get everything working under Ubuntu x64 un a modified Asus Chromebox with an external M-Audio Fast Track device.
I can't for the love of it get it to work on the Pi's...
I have several questions, like what's the best distro for this? Raspbian or Arch (pi) or Ubuntu (pi2)?
Can anyone provide a worklog for this like a step-by-step guide or something?
I keep getting errors (should post them, I know) and it's really frustrating...
BTW, could the pi 0 be used instead of a B+? With a powered hub?
Thanks in advance to anyone taking the time to reply!
Cheers!

User avatar
AutoStatic
Posts: 326
Joined: Tue Jan 01, 2013 10:27 pm
Contact: Website

Re: RPi and real-time, low-latency audio

Wed Feb 24, 2016 6:34 pm

PianoPlaySamplesDrum wrote:i searched many days and weeks in the web for a professional teacher :shock: . now i think i found you because i think you knows very well the sampling world with low latency raspberry, teensy or other mini pc.
I'm in no way a professional teacher :oops:
PianoPlaySamplesDrum wrote:i want to play different sounds(bass samples) with are on a mini pc, teensy raperry on sd card. this i want to use with a akku, standalone.
when i play piano i want to play with the left hand the bass samples. for this i want to put on the piano keys a capazitiv touch metall like this https://www.youtube.com/watch?v=QttoT5OCPA0 (but this exaple had a to slow latency)

i found this
http://www.bareconductive.com/shop/touch-board/ touch board with sd card for 40 us
is this fast enoguh (latency) for playing different bass samples (about 0,1 - 2 seconds long)
the bass sound must come even when i press fast the key (may be only 0,1 seconds press time)

or i found this
https://www.youtube.com/watch?v=i22_KoAqmpI
there is a sd card slot for samples on board and a midi in out and real audio in out for about 50 us dollar. you think this is fast enough for samples

or you think the raspery pi with this touch board is faster https://shop.pimoroni.com/products/adaf ... kit-mpr121

or is it possible to make with a teensy https://www.pjrc.com/teensy/td_libs_Audio.html
touch key and send with midi out to the raspberry sound samples. is this then faster
I'm terribly sorry but I'm not familiar with any of the products you mention so I fear I can't be of any help there :(
PianoPlaySamplesDrum wrote:my questions:
witch model is fast enough to play small samples. are there differents when i put on the raspberry or teensy linux, phyton, urbunto or what else.
The Raspberry Pi 2 is the fastest. If you look at other embedded boards then the Allwinner based boards are best suited for real-time, low-latency audio.
PianoPlaySamplesDrum wrote:what is linuxsampler?
That's sampling software that allow you to play back samples from sample libraries (.sf2, .sfz, .gig) with the use of MIDI.
PianoPlaySamplesDrum wrote:the next i want to do is:
i have two small midi keybords which i use to play with a normal midi expander soundcanvas with midi chanel 2 and 3.
my question. can i play with this midi keyboard the sounds, samples with are on a sd card in raspery or teensy.on chanel 2 and 3. (i wat to give other sounds by my self on the sd card)
That's possible with a Raspberry Pi.
PianoPlaySamplesDrum wrote:is it possible with the rasperry or what else other mini pc, modul to play with the touch capactitiv keys and with the midi keyboard in the same time?
Yes.
PianoPlaySamplesDrum wrote:may be you know a other bord, modul especially for sample sounds?
Cubieboard2. It's not especially for playing samples but it's very well suited to do real-tome, low-latency audio.
PianoPlaySamplesDrum wrote:did you know how to make souch a playing pc keyboard with low lateny, because i want to give a pc keybord to my piano and then i want to play on this pc keybord other sounds too
That's possible too. But I'd suggest you first settle on what board you're going to use as a base and what kind of project you'd like to start with :)

Jeremy
RPi and real-time, low-latency audio: http://wiki.linuxaudio.org/wiki/raspberrypi
RPi audio repository: http://rpi.autostatic.com/
RPi and audio blog: https://autostatic.com/tag/raspberrypi/

User avatar
AutoStatic
Posts: 326
Joined: Tue Jan 01, 2013 10:27 pm
Contact: Website

Re: RPi and real-time, low-latency audio

Wed Feb 24, 2016 6:47 pm

gixie wrote:Hello everybody,
I started looking into a guitar effects processor based on a pi or pi2 (I own both and a couple of 0s).
I managed to get everything working under Ubuntu x64 un a modified Asus Chromebox with an external M-Audio Fast Track device.
I can't for the love of it get it to work on the Pi's...
I have several questions, like what's the best distro for this? Raspbian or Arch (pi) or Ubuntu (pi2)?
Distro doesn't matter, any distro should do.
gixie wrote:Can anyone provide a worklog for this like a step-by-step guide or something?
Unfortunately no :( But you might want to check out https://github.com/adamhub/ampbrownie
gixie wrote:I keep getting errors (should post them, I know) and it's really frustrating...
As long as you don't post them your frustration will endure ;)
gixie wrote:BTW, could the pi 0 be used instead of a B+? With a powered hub?
Yes, but don't expect miracles ;)

Jeremy
RPi and real-time, low-latency audio: http://wiki.linuxaudio.org/wiki/raspberrypi
RPi audio repository: http://rpi.autostatic.com/
RPi and audio blog: https://autostatic.com/tag/raspberrypi/

gixie
Posts: 36
Joined: Sun Aug 26, 2012 5:56 pm

Re: RPi and real-time, low-latency audio

Thu Feb 25, 2016 2:01 am

Thanks Jeremy,
For starters, I run Arch Linux, the latest image available on their servers. I am a GUI person, so I slapped XFCE. I want to make sure I can get it to work before moving away from the GUI.
I created a user, added it to the audio group. I then started to play with the command below.

Code: Select all

[gixie@alarmpi ~]$ lsusb
Bus 001 Device 006: ID 046d:c517 Logitech, Inc. LX710 Cordless Desktop Laser
Bus 001 Device 007: ID 0763:2024 Midiman M-Audio Fast Track MKII
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. SMC9514 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


[gixie@alarmpi ~]$ arecord -l
**** List of CAPTURE Hardware Devices ****
card 1: Track [Fast Track], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

[gixie@alarmpi ~]$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
  Subdevices: 8/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Track [Fast Track], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
Next I tried running qjackctl with the default settings and tthe D-Bus interface enabled in the Misc section. It did not give any error, but in the connect window there was no input available.
Next I went in the Setup and chose the external card as input but the software started giving out errors.
Here they are below

Code: Select all

01:31:52.158 Statistics reset.
01:31:52.218 ALSA connection change.
01:31:53.253 D-BUS: Service is available (org.jackaudio.service aka jackdbus).
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
01:31:53.537 ALSA connection graph change.
01:33:55.583 D-BUS: JACK server is starting...
Thu Feb 25 01:33:54 2016: Starting jack server...
Thu Feb 25 01:33:54 2016: JACK server starting in realtime mode with priority 10
Thu Feb 25 01:33:54 2016: self-connect-mode is "Don't restrict self connect requests"
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
01:33:55.719 D-BUS: JACK server was started (org.jackaudio.service aka jackdbus).
Thu Feb 25 01:33:55 2016: Acquired audio card Audio0
Thu Feb 25 01:33:55 2016: creating alsa driver ... hw:0|hw:0|256|2|48000|0|0|nomon|swmeter|-|32bit
Thu Feb 25 01:33:55 2016: ERROR: ALSA: Cannot open PCM device alsa_pcm for capture. Falling back to playback-only mode
Thu Feb 25 01:33:55 2016: configuring for 48000Hz, period = 256 frames (5.3 ms), buffer = 2 periods
Thu Feb 25 01:33:55 2016: ALSA: final selected sample format for playback: 16bit little-endian
Thu Feb 25 01:33:55 2016: ALSA: use 2 periods for playback
Thu Feb 25 01:33:55 2016: ERROR: Cannot use real-time scheduling (RR/10)(1: Operation not permitted)
Thu Feb 25 01:33:55 2016: ERROR: AcquireSelfRealTime error
Thu Feb 25 01:33:55 2016: graph reorder: new port 'system:playback_1'
Thu Feb 25 01:33:55 2016: New client 'system' with PID 0
Thu Feb 25 01:33:55 2016: graph reorder: new port 'system:playback_2'
Thu Feb 25 01:33:55 2016: Saving settings to "/root/.config/jack/conf.xml" ...
01:33:58.071 JACK connection change.
01:33:58.093 Server configuration saved to "/root/.jackdrc".
01:33:58.100 Statistics reset.
01:33:58.191 Client activated.
01:33:58.212 Patchbay deactivated.
01:33:58.349 JACK connection graph change.
Thu Feb 25 01:33:57 2016: New client 'qjackctl' with PID 345
01:34:18.389 Client deactivated.
01:34:18.777 D-BUS: JACK server is stopping...
01:34:18.806 D-BUS: JACK server was stopped (org.jackaudio.service aka jackdbus).
Thu Feb 25 01:34:18 2016: Client 'qjackctl' with PID 345 is out
Thu Feb 25 01:34:18 2016: Stopping jack server...
Thu Feb 25 01:34:18 2016: Client 'system' with PID 0 is out
Thu Feb 25 01:34:18 2016: Released audio card Audio0
01:34:33.522 D-BUS: JACK server is starting...
Thu Feb 25 01:34:32 2016: Starting jack server...
Thu Feb 25 01:34:32 2016: JACK server starting in realtime mode with priority 10
Thu Feb 25 01:34:32 2016: self-connect-mode is "Don't restrict self connect requests"
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
01:34:33.643 D-BUS: JACK server was started (org.jackaudio.service aka jackdbus).
Thu Feb 25 01:34:33 2016: Acquired audio card Audio1
Thu Feb 25 01:34:33 2016: Acquired audio card Audio0
Thu Feb 25 01:34:33 2016: creating alsa driver ... hw:0|hw:Track|256|2|48000|0|0|nomon|swmeter|-|32bit
Thu Feb 25 01:34:33 2016: configuring for 48000Hz, period = 256 frames (5.3 ms), buffer = 2 periods
Thu Feb 25 01:34:33 2016: ALSA: final selected sample format for capture: 24bit little-endian
Thu Feb 25 01:34:33 2016: ALSA: use 2 periods for capture
Thu Feb 25 01:34:33 2016: ALSA: final selected sample format for playback: 16bit little-endian
Thu Feb 25 01:34:33 2016: ALSA: use 2 periods for playback
Thu Feb 25 01:34:33 2016: ERROR: Cannot use real-time scheduling (RR/10)(1: Operation not permitted)
Thu Feb 25 01:34:33 2016: ERROR: AcquireSelfRealTime error
Thu Feb 25 01:34:33 2016: graph reorder: new port 'system:capture_1'
Thu Feb 25 01:34:33 2016: New client 'system' with PID 0
Thu Feb 25 01:34:33 2016: graph reorder: new port 'system:capture_2'
Thu Feb 25 01:34:33 2016: graph reorder: new port 'system:playback_1'
Thu Feb 25 01:34:33 2016: graph reorder: new port 'system:playback_2'
Thu Feb 25 01:34:34 2016: Saving settings to "/root/.config/jack/conf.xml" ...
01:34:41.008 Could not connect to JACK server as client. - Overall operation failed. - Server communication error. Please check the messages window for more info.
Thu Feb 25 01:34:40 2016: ERROR: JackPosixProcessSync::LockedTimedWait error usec = 5000000 err = Connection timed out
Thu Feb 25 01:34:40 2016: ERROR: Driver is not running
Thu Feb 25 01:34:40 2016: ERROR: Cannot create new client
Thu Feb 25 01:34:40 2016: ERROR: CheckSize error size = 32 Size() = 12
Thu Feb 25 01:34:40 2016: ERROR: CheckRead error
Thu Feb 25 01:34:40 2016: ERROR: CheckSize error size = -1 Size() = 4
Thu Feb 25 01:34:40 2016: ERROR: CheckRead error
Thu Feb 25 01:34:40 2016: ERROR: CheckSize error size = 0 Size() = 12
Thu Feb 25 01:34:40 2016: ERROR: CheckRead error
Cannot read socket fd = 17 err = Success
CheckRes error
JackSocketClientChannel read fail
Cannot open qjackctl client
01:35:11.206 D-BUS: JACK server could not be stopped. Sorry
Thu Feb 25 01:34:46 2016: Stopping jack server...
Thu Feb 25 01:34:51 2016: ERROR: JackPosixProcessSync::LockedTimedWait error usec = 5000000 err = Connection timed out
Thu Feb 25 01:34:51 2016: ERROR: JackEngine::ClientDeactivate wait error ref = 2 name = dbusapi
Thu Feb 25 01:34:51 2016: ERROR: failed to deactivate dbusapi jack client. error is -1
Thu Feb 25 01:34:51 2016: Client 'system' with PID 0 is out
Thu Feb 25 01:34:51 2016: ERROR: CheckSize error size = 32 Size() = 12
Thu Feb 25 01:34:51 2016: ERROR: CheckRead error
Thu Feb 25 01:34:51 2016: ERROR: CheckSize error size = -1 Size() = 4
Thu Feb 25 01:34:51 2016: ERROR: CheckRead error
Thu Feb 25 01:34:51 2016: ERROR: CheckSize error size = 0 Size() = 12
Thu Feb 25 01:34:51 2016: ERROR: CheckRead error
Thu Feb 25 01:34:52 2016: ERROR: JackPosixProcessSync::LockedTimedWait error usec = 1000000 err = Connection timed out
Thu Feb 25 01:34:52 2016: ERROR: JackEngine::ClientCloseAux wait error ref = 2
Thu Feb 25 01:34:52 2016: ERROR: CheckSize error size = 32 Size() = 12
Thu Feb 25 01:34:52 2016: ERROR: CheckRead error
Thu Feb 25 01:34:52 2016: ERROR: CheckSize error size = -1 Size() = 4
Thu Feb 25 01:34:52 2016: ERROR: CheckRead error
Thu Feb 25 01:34:52 2016: ERROR: CheckSize error size = 0 Size() = 12
Thu Feb 25 01:34:52 2016: ERROR: CheckRead error
01:36:10.671 D-BUS: JACK server could not be stopped. Sorry

Changing the input from hw:1 to hw:1,0 gave this error:

Code: Select all

01:54:07.162 Statistics reset.
01:54:07.324 ALSA connection change.
01:54:08.295 D-BUS: Service is available (org.jackaudio.service aka jackdbus).
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
01:54:08.597 ALSA connection graph change.
01:54:50.762 D-BUS: JACK server could not be started. Sorry
Thu Feb 25 01:54:25 2016: Starting jack server...
Thu Feb 25 01:54:25 2016: JACK server starting in realtime mode with priority 10
Thu Feb 25 01:54:25 2016: self-connect-mode is "Don't restrict self connect requests"
Thu Feb 25 01:54:26 2016: Acquired audio card Audio1
Thu Feb 25 01:54:26 2016: Acquired audio card Audio0
Thu Feb 25 01:54:26 2016: creating alsa driver ... hw:0|hw:Track,0|256|2|48000|0|0|nomon|swmeter|-|32bit
Thu Feb 25 01:54:26 2016: configuring for 48000Hz, period = 256 frames (5.3 ms), buffer = 2 periods
Thu Feb 25 01:54:26 2016: ALSA: final selected sample format for capture: 24bit little-endian
Thu Feb 25 01:54:26 2016: ALSA: use 2 periods for capture
Thu Feb 25 01:54:26 2016: ALSA: final selected sample format for playback: 16bit little-endian
Thu Feb 25 01:54:26 2016: ALSA: use 2 periods for playback
Thu Feb 25 01:54:26 2016: ERROR: Cannot use real-time scheduling (RR/10)(1: Operation not permitted)
Thu Feb 25 01:54:26 2016: ERROR: AcquireSelfRealTime error
Thu Feb 25 01:54:31 2016: ERROR: JackPosixProcessSync::LockedTimedWait error usec = 5000000 err = Connection timed out
Thu Feb 25 01:54:31 2016: ERROR: JackEngine::ClientActivate wait error ref = 2 name = dbusapi
Thu Feb 25 01:54:31 2016: ERROR: failed to activate dbusapi jack client. error is -1
Thu Feb 25 01:54:36 2016: ERROR: JackPosixProcessSync::LockedTimedWait error usec = 5000000 err = Connection timed out
Thu Feb 25 01:54:36 2016: ERROR: JackEngine::ClientDeactivate wait error ref = 2 name = dbusapi
Thu Feb 25 01:54:37 2016: ERROR: JackPosixProcessSync::LockedTimedWait error usec = 1000000 err = Connection timed out
Thu Feb 25 01:54:37 2016: ERROR: JackEngine::ClientCloseAux wait error ref = 2
Thu Feb 25 01:54:37 2016: ERROR: CheckSize error size = 32 Size() = 12
Thu Feb 25 01:54:37 2016: ERROR: CheckRead error
Thu Feb 25 01:54:37 2016: ERROR: CheckSize error size = -1 Size() = 4
Thu Feb 25 01:54:37 2016: ERROR: CheckRead error
Thu Feb 25 01:54:37 2016: ERROR: CheckSize error size = 0 Size() = 12
Thu Feb 25 01:54:37 2016: ERROR: CheckRead error
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
01:55:03.189 Could not connect to JACK server as client. - Overall operation failed. - Server communication error. Please check the messages window for more info.
Thu Feb 25 01:55:03 2016: ERROR: JackPosixProcessSync::LockedTimedWait error usec = 5000000 err = Connection timed out
Thu Feb 25 01:55:03 2016: ERROR: Driver is not running
Thu Feb 25 01:55:03 2016: ERROR: Cannot create new client
Thu Feb 25 01:55:03 2016: ERROR: CheckSize error size = 32 Size() = 12
Thu Feb 25 01:55:03 2016: ERROR: CheckRead error
Thu Feb 25 01:55:03 2016: ERROR: CheckSize error size = -1 Size() = 4
Thu Feb 25 01:55:03 2016: ERROR: CheckRead error
Thu Feb 25 01:55:03 2016: ERROR: CheckSize error size = 0 Size() = 12
Thu Feb 25 01:55:03 2016: ERROR: CheckRead error
Cannot read socket fd = 17 err = Success
CheckRes error
JackSocketClientChannel read fail
Cannot open qjackctl client
Any ideas? I am pretty new to this and can't seem to grasp it.
Thanks in advance!

gixie
Posts: 36
Joined: Sun Aug 26, 2012 5:56 pm

Re: RPi and real-time, low-latency audio

Thu Feb 25, 2016 2:04 am

One more thing I noticed in your posts Jeremy that you use commands a la Ubuntu

Code: Select all

sudo apt-get install
Is this available in Arch?

Second, am I better off with a Pi2 to start with...for more resources? Or maybe invest in different hardware? What do you think?
Thanks for your time!

User avatar
AutoStatic
Posts: 326
Joined: Tue Jan 01, 2013 10:27 pm
Contact: Website

Re: RPi and real-time, low-latency audio

Thu Feb 25, 2016 6:00 pm

Code: Select all

[gixie@alarmpi ~]$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
  Subdevices: 8/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Track [Fast Track], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
So the M-Audio USB interface is called 'Track'. This means you can refer to it as 'hw:Track' in i.e. QjackCtl.

Code: Select all

Thu Feb 25 01:33:55 2016: creating alsa driver ... hw:0|hw:0|256|2|48000|0|0|nomon|swmeter|-|32bit
Thu Feb 25 01:33:55 2016: ERROR: ALSA: Cannot open PCM device alsa_pcm for capture. Falling back to playback-only mode
hw:0 is the onboard audio and it doesn't do capture so this is to be expected.

Code: Select all

Thu Feb 25 01:33:55 2016: configuring for 48000Hz, period = 256 frames (5.3 ms), buffer = 2 periods
Thu Feb 25 01:33:55 2016: ALSA: final selected sample format for playback: 16bit little-endian
Thu Feb 25 01:33:55 2016: ALSA: use 2 periods for playback
Thu Feb 25 01:33:55 2016: ERROR: Cannot use real-time scheduling (RR/10)(1: Operation not permitted)
Thu Feb 25 01:33:55 2016: ERROR: AcquireSelfRealTime error
This means you either did not log out or log in again or that Arch is using a different group that can set higher real-time priorities. What's the output of 'ulimit -a'?

Code: Select all

Thu Feb 25 01:54:26 2016: creating alsa driver ... hw:0|hw:Track,0|256|2|48000|0|0|nomon|swmeter|-|32bit
using the onboard audio as output and the USB interface as input is bound to go wrong. Please try with only the USB interface.
RPi and real-time, low-latency audio: http://wiki.linuxaudio.org/wiki/raspberrypi
RPi audio repository: http://rpi.autostatic.com/
RPi and audio blog: https://autostatic.com/tag/raspberrypi/

User avatar
AutoStatic
Posts: 326
Joined: Tue Jan 01, 2013 10:27 pm
Contact: Website

Re: RPi and real-time, low-latency audio

Thu Feb 25, 2016 6:03 pm

gixie wrote:One more thing I noticed in your posts Jeremy that you use commands a la Ubuntu
A la Debian you mean ;)
gixie wrote:

Code: Select all

sudo apt-get install
Is this available in Arch?
No, unfortunately Arch lacks such a sophisticated package manager ;)
gixie wrote:Second, am I better off with a Pi2 to start with...for more resources? Or maybe invest in different hardware? What do you think?
A Pi2 is better suited for real-time audio. Your audio interface should be fine.
RPi and real-time, low-latency audio: http://wiki.linuxaudio.org/wiki/raspberrypi
RPi audio repository: http://rpi.autostatic.com/
RPi and audio blog: https://autostatic.com/tag/raspberrypi/

gixie
Posts: 36
Joined: Sun Aug 26, 2012 5:56 pm

Re: RPi and real-time, low-latency audio

Thu Feb 25, 2016 6:09 pm

Haven't thought of outputting through the external device.
Will do so tonight and post the results.
Thanks a million though.

gixie
Posts: 36
Joined: Sun Aug 26, 2012 5:56 pm

Re: RPi and real-time, low-latency audio

Fri Feb 26, 2016 2:36 am

Hi Jeremy,
Guess what, I plugged the Pi2 running Ubuntu Mate and it works with the external USB card as both input and output.
I went back to the first Pi and ran ulimit -a and here's the output:

Code: Select all

[gixie@alarmpi ~]$ ulimit -a
core file size          (blocks, -c) unlimited
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 3392
max locked memory       (kbytes, -l) unlimited
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 99
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 3392
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited
OK, now for the Pi...
I replicated the settings and it worked. Then I tried to install guitarix but one of the dependencies could not be found so it didn't install it at all.
I resorted to rakarrak and guess what? It worked. But after a while it started throwing errors and no sound was coming out of the headphones. (Xruns, was it?)
Anyways, it kinda worked...
Feeling confident, I toouk out my other guitar interface, a Line 6 GuitarPort and tried to do the same thing, of course replacing the input and output with the said card. Nothing, it wouldn't budge.
I am giving up for now but I found a video on youtube about installing and configuring everything. It's kinda old, but I'll try it anyway. For those interested here it is
https://www.youtube.com/watch?v=LJBp7EnfWK0

Here are my last two error logs (I think they are identical)

Code: Select all

2:25:10.402 Statistics reset.
02:25:10.575 ALSA connection change.
02:25:11.693 D-BUS: Service is available (org.jackaudio.service aka jackdbus).
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
02:25:12.076 ALSA connection graph change.
02:26:22.617 D-BUS: JACK server could not be started. Sorry
Fri Feb 26 02:25:57 2016: Starting jack server...
Fri Feb 26 02:25:57 2016: JACK server starting in realtime mode with priority 10
Fri Feb 26 02:25:57 2016: self-connect-mode is "Don't restrict self connect requests"
Fri Feb 26 02:25:58 2016: Acquired audio card Audio1
Fri Feb 26 02:25:58 2016: creating alsa driver ... hw:GuitarPort|hw:GuitarPort|128|2|48000|0|0|nomon|swmeter|-|32bit
Fri Feb 26 02:25:58 2016: configuring for 48000Hz, period = 128 frames (2.7 ms), buffer = 2 periods
Fri Feb 26 02:25:58 2016: ALSA: final selected sample format for capture: 16bit little-endian
Fri Feb 26 02:25:58 2016: ALSA: use 2 periods for capture
Fri Feb 26 02:25:58 2016: ALSA: final selected sample format for playback: 16bit little-endian
Fri Feb 26 02:25:58 2016: ALSA: use 2 periods for playback
Fri Feb 26 02:26:03 2016: ERROR: JackPosixProcessSync::LockedTimedWait error usec = 5000000 err = Connection timed out
Fri Feb 26 02:26:03 2016: ERROR: Driver is not running
Fri Feb 26 02:26:03 2016: ERROR: Cannot open client name = dbusapi
Fri Feb 26 02:26:03 2016: ERROR: failed to create dbusapi jack client
Fri Feb 26 02:26:03 2016: ERROR: CheckSize error size = 32 Size() = 12
Fri Feb 26 02:26:03 2016: ERROR: CheckRead error
Fri Feb 26 02:26:03 2016: ERROR: CheckSize error size = -1 Size() = 4
Fri Feb 26 02:26:03 2016: ERROR: CheckRead error
Fri Feb 26 02:26:03 2016: ERROR: CheckSize error size = 0 Size() = 12
Fri Feb 26 02:26:03 2016: ERROR: CheckRead error
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
02:26:34.954 Could not connect to JACK server as client. - Overall operation failed. - Server communication error. Please check the messages window fo$
Cannot read socket fd = 17 err = Success
CheckRes error
JackSocketClientChannel read fail
Cannot open qjackctl client
Fri Feb 26 02:26:34 2016: ERROR: JackPosixProcessSync::LockedTimedWait error usec = 5000000 err = Connection timed out
Fri Feb 26 02:26:34 2016: ERROR: Driver is not running
Fri Feb 26 02:26:34 2016: ERROR: Cannot create new client
Fri Feb 26 02:26:34 2016: ERROR: CheckSize error size = 32 Size() = 12
Fri Feb 26 02:26:34 2016: ERROR: CheckRead error
Fri Feb 26 02:26:34 2016: ERROR: CheckSize error size = -1 Size() = 4
Fri Feb 26 02:26:34 2016: ERROR: CheckRead error
Fri Feb 26 02:26:34 2016: ERROR: CheckSize error size = 0 Size() = 12
Fri Feb 26 02:26:03 2016: ERROR: CheckRead error
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
02:26:34.954 Could not connect to JACK server as client. - Overall operation failed. - Server communication error. Please check the messages window fo$
Cannot read socket fd = 17 err = Success
CheckRes error
JackSocketClientChannel read fail
Cannot open qjackctl client
Fri Feb 26 02:26:34 2016: ERROR: JackPosixProcessSync::LockedTimedWait error usec = 5000000 err = Connection timed out
Fri Feb 26 02:26:34 2016: ERROR: Driver is not running
Fri Feb 26 02:26:34 2016: ERROR: Cannot create new client
Fri Feb 26 02:26:34 2016: ERROR: CheckSize error size = 32 Size() = 12
Fri Feb 26 02:26:34 2016: ERROR: CheckRead error
Fri Feb 26 02:26:34 2016: ERROR: CheckSize error size = -1 Size() = 4
Fri Feb 26 02:26:34 2016: ERROR: CheckRead error
Fri Feb 26 02:26:34 2016: ERROR: CheckSize error size = 0 Size() = 12

Code: Select all

02:42:53.813 Statistics reset.
02:42:53.974 ALSA connection change.
02:42:55.075 D-BUS: Service is available (org.jackaudio.service aka jackdbus).
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
02:42:55.472 ALSA connection graph change.
02:43:42.873 D-BUS: JACK server could not be started. Sorry
Fri Feb 26 02:43:17 2016: Starting jack server...
Fri Feb 26 02:43:18 2016: JACK server starting in realtime mode with priority 10
Fri Feb 26 02:43:18 2016: self-connect-mode is "Don't restrict self connect requests"
Fri Feb 26 02:43:18 2016: Acquired audio card Audio1
Fri Feb 26 02:43:18 2016: creating alsa driver ... hw:GuitarPort|hw:GuitarPort|128|2|48000|0|0|nomon|swmeter|-|32bit
Fri Feb 26 02:43:18 2016: configuring for 48000Hz, period = 128 frames (2.7 ms), buffer = 2 periods
Fri Feb 26 02:43:18 2016: ALSA: final selected sample format for capture: 16bit little-endian
Fri Feb 26 02:43:18 2016: ALSA: use 2 periods for capture
Fri Feb 26 02:43:18 2016: ALSA: final selected sample format for playback: 16bit little-endian
Fri Feb 26 02:43:18 2016: ALSA: use 2 periods for playback
Fri Feb 26 02:43:23 2016: ERROR: JackPosixProcessSync::LockedTimedWait error usec = 5000000 err = Connection timed out
Fri Feb 26 02:43:23 2016: ERROR: Driver is not running
Fri Feb 26 02:43:23 2016: ERROR: Cannot open client name = dbusapi
Fri Feb 26 02:43:23 2016: ERROR: failed to create dbusapi jack client
Fri Feb 26 02:43:23 2016: ERROR: CheckSize error size = 32 Size() = 12
Fri Feb 26 02:43:23 2016: ERROR: CheckRead error
Fri Feb 26 02:43:23 2016: ERROR: CheckSize error size = -1 Size() = 4
Fri Feb 26 02:43:23 2016: ERROR: CheckRead error
Fri Feb 26 02:43:23 2016: ERROR: CheckSize error size = 0 Size() = 12
Fri Feb 26 02:43:23 2016: ERROR: CheckRead error
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
02:43:56.379 Could not connect to JACK server as client. - Overall operation failed. - Server communication error. Please check the messages window fo$
Cannot read socket fd = 17 err = Success
CheckRes error
JackSocketClientChannel read fail
Cannot open qjackctl client
Fri Feb 26 02:43:56 2016: ERROR: JackPosixProcessSync::LockedTimedWait error usec = 5000000 err = Connection timed out
Fri Feb 26 02:43:56 2016: ERROR: Driver is not running
Fri Feb 26 02:43:56 2016: ERROR: Cannot create new client
Fri Feb 26 02:43:56 2016: ERROR: CheckSize error size = 32 Size() = 12
Fri Feb 26 02:43:56 2016: ERROR: CheckRead error
Fri Feb 26 02:43:23 2016: ERROR: Cannot open client name = dbusapi
Fri Feb 26 02:43:23 2016: ERROR: failed to create dbusapi jack client
Fri Feb 26 02:43:23 2016: ERROR: CheckSize error size = 32 Size() = 12
Fri Feb 26 02:43:23 2016: ERROR: CheckRead error
Fri Feb 26 02:43:23 2016: ERROR: CheckSize error size = -1 Size() = 4
Fri Feb 26 02:43:23 2016: ERROR: CheckRead error
Fri Feb 26 02:43:23 2016: ERROR: CheckSize error size = 0 Size() = 12
Fri Feb 26 02:43:23 2016: ERROR: CheckRead error
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
02:43:56.379 Could not connect to JACK server as client. - Overall operation failed. - Server communication error. Please check the messages window fo$
Cannot read socket fd = 17 err = Success
CheckRes error
JackSocketClientChannel read fail
Cannot open qjackctl client
Fri Feb 26 02:43:56 2016: ERROR: JackPosixProcessSync::LockedTimedWait error usec = 5000000 err = Connection timed out
Fri Feb 26 02:43:56 2016: ERROR: Driver is not running
Fri Feb 26 02:43:56 2016: ERROR: Cannot create new client
Fri Feb 26 02:43:56 2016: ERROR: CheckSize error size = 32 Size() = 12
Fri Feb 26 02:43:56 2016: ERROR: CheckRead error
Fri Feb 26 02:43:56 2016: ERROR: CheckSize error size = -1 Size() = 4
Fri Feb 26 02:43:56 2016: ERROR: CheckRead error
Fri Feb 26 02:43:56 2016: ERROR: CheckSize error size = 0 Size() = 12
Fri Feb 26 02:43:56 2016: ERROR: CheckRead error

Return to “Graphics, sound and multimedia”