pantherb / setBfree

DSP tonewheel organ
http://setbfree.org
GNU General Public License v2.0
194 stars 35 forks source link

setBfree installation+sound problem! #30

Closed I3alan closed 9 years ago

I3alan commented 9 years ago

Hi, when i'm trying to install setBfree as it should be installed on linux(raspbian) (cd /home/pi/src/setBfree-master -> make ) i get an error :

-c -o overdrive.o overdrive.c ccl;error:unrecognized command line option '-msse' ccl;error:unrecognized command line option '-msse2' ccl;error:unrecognized command line option '-mfpmath=sse' Makefile:45: recipe for target 'overdrive.o' failed make[1]: * [overdrive.o] Error 1 make[1]: Leaving directory '/home/pi/src/setBfree-master/b_overdrive' Makefile:17:recipe for target 'b_overdrive' failed make: * [b_overdrive] Error 2

Meanwhile, if i delete those 3 commands (-msse,-msse2,-mfpmath=sse) from common.mak i get it installed and it works pretty good ,till im trying to play on my midi keyboard(plugged,configured with jack and dozens of diffrents ways were tried) when i'm pressing too much notes at the same time (specially black and white(from Fa to Si or more) i get a noise and it stucks for few seconds(for some settings in Jack it even stops de system from responding) so i thought that maybe those 3 commands that i have removed in the installation are the reason for that, becose i've tried lots of different settings and even bought an additional usb sound card in case that the RPI was too weak ,but all the same...

What does helped a little with de sound, was enabling the realtime mode in jack and setting the Dither to triangular ,but the noise continues, a little weaker, but it still too loud and stuck for about a second(impossible to play ).

Every additional program that you proposed i have installed and the Jack Audio works without any error messages so i have really no idea what is the reason for such a problem(i'm new to Linux ).

Any suggestions will be appreciated !

x42 commented 9 years ago

Hi,

I'm glad you managed to find your way around. For future reference: there's no need to edit the file, just make OPTIMIZATIONS=-O2 will do (-O2 still leaves some compiler optimizations in place). Anyway the problem you describe is not setBfree but jack and system related (xruns).

Sadly, getting low-latency audio+midi to run reliably on a RPi is a non-trivial task. You definitely want jackd to run in realtime mode and ideally use use a realtime preemption kernel. As a quick stopgap, it may help to run jackd with larger buffersizes e.g -p 2048 -n3 or -even -p 4096, that will decrease the load of the system but that won't really solve the problem (and increase the latency).

It's been about a year since I last looked into getting setBfree and other jack applications running on the RPi. it involved quite a lot of low-level hacking (recompile jack, compile a custom kernel, disable various system submodules). There's some info at http://wiki.linuxaudio.org/wiki/raspberrypi

Still the result is not something that i'd ever want to take on stage. The RPi is not designed for pro-audio, but it's fun nonetheless.

happy hacking, robin

PS. setBfree itself is very lightweight. The only heavy part is the cabinet emulation (convolution) at the end. It's not feasible to run this on any system without FPU. Don't use it (it's disabled by default).

I3alan commented 9 years ago

Thank you very much! You really helped me with that !
One more question, have you tried to run it in realtime on headless rpi? it probably will be my next step...

x42 commented 9 years ago

I had/have it working on a very similar ARM device (MK802). I don't own a RPi myself but know it can work there, too.