BelaPlatform / supercollider

an environment and programming language for real time audio synthesis and algorithmic composition
GNU General Public License v3.0
14 stars 8 forks source link

Defaulting to pru 1, for compatibility with the new Bela default #33

Closed giuliomoro closed 7 years ago

giuliomoro commented 7 years ago

Defaulting to PRU1 is required on the new Bela image because that is the default PRU for other Bela programs and is the one that allows to run the multiplexer capelet . SC does not clean after itself on the PRU unless it is closed with /quit(there is no signal handler, see #11), and this causes conflicts with programs running on the other PRU when you kill it.

giuliomoro commented 7 years ago

This PR will now close #37 as well.

LFSaw commented 7 years ago

succesfully tested on BELA.

However, I now get a lot of underruns when I run the start-scsynth example project

screen shot 2017-06-13 at 15 10 57

giuliomoro commented 7 years ago

hmmm that's not expected. Can you reboot your board, just to check?

LFSaw commented 7 years ago

no change... also, I seem to not be able to get sound out atm.

LFSaw commented 7 years ago

also, if I start scsynth with

scsynth -u 57110 -z 16 -J 8 -K 8 -G 16 -i 2 -o 2

directly via ssh on the board, I get masses of

Underrun detected: 1 blocks dropped
Underrun detected: 1 blocks dropped
Underrun detected: 1 blocks dropped
Underrun detected: 1 blocks dropped
giuliomoro commented 7 years ago

ok, I am trying for myself. What version of the Bela core code are you using?

LFSaw commented 7 years ago

(y)

https://github.com/BelaPlatform/Bela/commit/1d97d05e420f4505f18366c930c9450f946b84e1

giuliomoro commented 7 years ago

It works just fine for me. What compiler are you using? If you are using the gcc that comes with the board, that is 4.9 and it seems to be buggy (https://github.com/supercollider/supercollider/issues/1450).

I am using gcc-4.8 over distcc (details in the updated README.md): 10 minutes to build and it works great.

LFSaw commented 7 years ago

the OSX crosscompiler link at http://www.welzels.de/blog/en/arm-cross-compiling-with-mac-os-x/

leaves me with a dropbox file not found error...

giuliomoro commented 7 years ago

oh I see. Adding it here: eecs.qmul.ac.uk/~gm303/gcc-linaro-arm-linux-gnueabihf-2014.04_mac.pkg

giuliomoro commented 7 years ago

Give it some time though: uploading now

giuliomoro commented 7 years ago

@LFSaw done, it's there now.

LFSaw commented 7 years ago

ok. forget everything I wrote above, actually, I'll remove the comments, they are misleading. with the pkg uploaded by @giuliomoro, you need to add the binary directory to your path (on the HOST).

Make sure distcc is installed on both machines.

HOST (osx/linux machine):

export PATH=$PATH:/usr/local/linaro/arm-linux-gnueabihf/bin/

then run

 distccd --verbose --no-detach --daemon --allow 192.168.7.2 --log-level info --log-file ~/distccd.log

and tail the log (in a separate console) via

tail -f ~/distccd.log

bela/BBB:

cd build

export DISTCC_HOSTS="192.168.7.1" export CC="/usr/bin/distcc arm-linux-gnueabihf-gcc" export CXX="/usr/bin/distcc arm-linux-gnueabihf-g++"

cmake .. -DNOVA_SIMD=ON -DSSE=OFF -DSSE2=OFF -DINSTALL_HELP=OFF -DSC_QT=OFF -DSC_IDE=OFF -DSC_EL=OFF -DSC_ED=OFF -DSC_VIM=OFF -DSUPERNOVA=OFF -DNO_AVAHI=ON -DENABLE_TESTSUITE=OFF -DAUDIOAPI=bela
LFSaw commented 7 years ago

success!

just as a side:

one need to set block-size to match with hardware-buffer-size like so

root@bela ~$ scsynth -u 57110 -z 64 -Z 64 -J 8 -K 8 -G 16 -i 2 -o 2

otherwise server start fails with

root@bela ~$ scsynth -u 57110 -J 8 -K 8 -G 16 -i 2 -o 2
terminate called without an active exception
Aborted
giuliomoro commented 7 years ago

one need to set block-size to match with hardware-buffer-size like so

Is this the same as https://github.com/sensestage/supercollider/issues/40 ?

HOST (osx/linux machine):

export PATH=$PATH:/usr/local/linaro/arm-linux-gnueabihf/bin/

Yes the host needs to know how to find it, because distcc will call it. Actually on my Mac, I have arm-linux-gnueabihf-g++ in /usr/local/bin as a symlink to /usr/local/linaro/arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++, not sure if I created it or it was created when the package got installed.

Also I would recommend to use the full compiler nome including version number, e.g.: arm-linux-gnueabihf-g++-4.8: distcc defaults to retrying locally if a remote build fails and you do not want it to just retry locally for arm-linux-gnueabihf-g++, as it probably resolves to g++-4.9.

I will update the README now, thanks.

LFSaw commented 7 years ago

it is the same as #40.