sc master (desktop + headless) on rpi2 with raspbian jessie

classic Classic list List threaded Threaded
45 messages Options
123
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

sc master (desktop + headless) on rpi2 with raspbian jessie

Fredrik Olofsson
note: this will uninstall sonic-pi.  so far i haven’t found a good way to keep both sonic pi and supercollider installed at the same time.

else everything seems to run fine.  scide with all windows, scope, levelmeters, help system, autocompletion, NdefMixer, Pen, UserView, the new Quarks.gui system, soundfile recording etc.  and with the export DISPLAY=:0.0 trick together with moving the GUI classes into scide_scqt, one can now also run it headless over ssh.


//—requirements
* raspberry pi 2 model b
* sd card with 2015-11-21-raspbian-jessie.img (note: not jessie-lite)
* router with ethernet internet connection for the rpi
* screen, mouse and keyboard (although you can also do it all via ssh)
* optional: usb soundcard with headphones or speakers connected

//—hardware setup
* connect an ethernet cable from the network router to the rpi
* insert the sd card and usb soundcard + screen, mouse and keyboard
* last connect usb power from a 5V@1A power supply

//—startup, setup and update the system
* when you see the rpi desktop open the terminal and type:
sudo raspi-config  #change password, expand file system, reboot and start terminal again
sudo apt-get remove --auto-remove supercollider  #note: this will also remove sonicpi (we'll keep jackd though)
sudo apt-get update
sudo apt-get upgrade

//—install required libraries and downgrade gcc
sudo apt-get install libboost-dev libjack-jackd2-dev libqt4-dev libqtwebkit-dev libcwiid-dev libicu-dev libasound2-dev libsamplerate0-dev libsndfile1-dev libreadline-dev libxt-dev libudev-dev libavahi-client-dev libfftw3-dev cmake gcc-4.8 g++-4.8 qt5-default qt5-qmake qttools5-dev qttools5-dev-tools qtdeclarative5-dev libqt5webkit5-dev qtpositioning5-dev libqt5sensors5-dev
sudo apt-get autoremove gcc-4.9 g++-4.9 libstdc++-4.9-dev libasan1 libgcc-4.9-dev libubsan0
sudo ln -s /usr/bin/gcc-4.8 /usr/bin/gcc
sudo ln -s /usr/bin/g++-4.8 /usr/bin/g++
sudo apt-get clean

//—compile and install supercollider
git clone --recursive git://github.com/supercollider/supercollider.git supercollider
cd supercollider
git submodule init && git submodule update
sed -i 's/UL, numSubclasses/UL, (long unsigned int)numSubclasses/g' lang/LangSource/PyrObject.cpp
mkdir build && cd build
cmake -L -DCMAKE_BUILD_TYPE="Release" -DBUILD_TESTING=OFF -DSSE=OFF -DSSE2=OFF -DSUPERNOVA=OFF -DNOVA_SIMD=ON -DNATIVE=OFF -DSC_ED=OFF -DSC_WII=ON -DSC_IDE=ON -DSC_QT=ON -DSC_EL=OFF -DCMAKE_C_FLAGS="-mtune=cortex-a7 -mfloat-abi=hard -mfpu=neon -funsafe-math-optimizations" -DCMAKE_CXX_FLAGS="-mtune=cortex-a7 -mfloat-abi=hard -mfpu=neon -funsafe-math-optimizations" ..
make -j4
sudo make install
sudo ldconfig
cd ../..
rm -r supercollider
sudo mv /usr/local/share/SuperCollider/SCClassLibrary/Common/GUI /usr/local/share/SuperCollider/SCClassLibrary/scide_scqt/GUI
sudo mv /usr/local/share/SuperCollider/SCClassLibrary/JITLib/GUI /usr/local/share/SuperCollider/SCClassLibrary/scide_scqt/JITLibGUI

//—test usb soundcard
lsusb  #soundcard should show up here
aplay -l  #and here.  note the name.  usually it is ’Device'
speaker-test -c2 -Ddefault:CARD=Device  #if needed edit ’Device’ to match your soundcard.  stop with ctrl+c

//—test jackd and supercollider from terminal
jackd -P95 -dalsa -dhw:1 -p1024 -n3 -s -r44100 &  #edit -dhw:1 to match your soundcard.  usually it is 1.  and if you want to start jackd from ssh first do: export DISPLAY=:0.0
sclang  #should start sc and compile the class library with only 3 harmless class overwrites and 3 libEGL warnings
> s.boot  #should boot the server

booting 57110
-> localhost
sc3> JackDriver: client name is 'SuperCollider'
SC_AudioDriver: sample rate = 44100.000000, driver's block size = 1024
JackDriver: connected  system:capture_1 to SuperCollider:in_1
JackDriver: connected  SuperCollider:out_1 to system:playback_1
JackDriver: connected  SuperCollider:out_2 to system:playback_2
SuperCollider 3 server ready.
JackDriver: max output latency 69.7 ms
Receiving notification messages from server localhost
Shared memory server interface initialized

sc3> a= {SinOsc.ar([400, 404])}.play  #should play sound in both channels
-> Synth('temp__0' : 1000)
sc3> a.free
-> Synth('temp__0' : 1000)

//—benchmarks (for rpi2)
sc3> {1000000.do{2.5.sqrt}}.bench
-> 1.01
sc3> {Mix(50.collect{RLPF.ar(SinOsc.ar)});DC.ar(0)}.play
-> s.dump  //avg show around 17.4%
sc3> 0.exit
pkill jackd

//—start scide from desktop
* open terminal and type:
qjackctl  #and select the usb soundcard under setup/interface.  click ok and start
scide  #this should launch supercollider


_f

  #|
     fredrikolofsson.com     musicalfieldsforever.com
  |#


_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: sc master (desktop + headless) on rpi2 with raspbian jessie

Fredrik Olofsson
just a minor update:

> sudo apt-get install libboost-dev libjack-jackd2-dev libqt4-dev libqtwebkit-dev libcwiid-dev libicu-dev libasound2-dev libsamplerate0-dev libsndfile1-dev libreadline-dev libxt-dev libudev-dev libavahi-client-dev libfftw3-dev cmake gcc-4.8 g++-4.8 qt5-default qt5-qmake qttools5-dev qttools5-dev-tools qtdeclarative5-dev libqt5webkit5-dev qtpositioning5-dev libqt5sensors5-dev

in this line libqt4-dev and libqtwebkit-dev can go away.  (but also no harm in leaving them in)

> sudo apt-get autoremove gcc-4.9 g++-4.9 libstdc++-4.9-dev libasan1 libgcc-4.9-dev libubsan0

and here libasan1 and libubsan0 can go away.

_f

  #|
     fredrikolofsson.com     musicalfieldsforever.com
  |#


_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: sc master (desktop + headless) on rpi2 with raspbian jessie

Ivan Franco
In reply to this post by Fredrik Olofsson
Great work Fredrik. Thanks.
Have you by any chance tried to compile it for the Beaglebone Black using the same procedure?
I don’t have time right now to try it but I’m curious if you think that any part of this would be RPi specific.

Cheers,
Ivan


> On Jan 17, 2016, at 6:40 PM, Fredrik Olofsson <[hidden email]> wrote:
>
> note: this will uninstall sonic-pi.  so far i haven’t found a good way to keep both sonic pi and supercollider installed at the same time.
>
> else everything seems to run fine.  scide with all windows, scope, levelmeters, help system, autocompletion, NdefMixer, Pen, UserView, the new Quarks.gui system, soundfile recording etc.  and with the export DISPLAY=:0.0 trick together with moving the GUI classes into scide_scqt, one can now also run it headless over ssh.
>
>
> //—requirements
> * raspberry pi 2 model b
> * sd card with 2015-11-21-raspbian-jessie.img (note: not jessie-lite)
> * router with ethernet internet connection for the rpi
> * screen, mouse and keyboard (although you can also do it all via ssh)
> * optional: usb soundcard with headphones or speakers connected
>
> //—hardware setup
> * connect an ethernet cable from the network router to the rpi
> * insert the sd card and usb soundcard + screen, mouse and keyboard
> * last connect usb power from a 5V@1A power supply
>
> //—startup, setup and update the system
> * when you see the rpi desktop open the terminal and type:
> sudo raspi-config  #change password, expand file system, reboot and start terminal again
> sudo apt-get remove --auto-remove supercollider  #note: this will also remove sonicpi (we'll keep jackd though)
> sudo apt-get update
> sudo apt-get upgrade
>
> //—install required libraries and downgrade gcc
> sudo apt-get install libboost-dev libjack-jackd2-dev libqt4-dev libqtwebkit-dev libcwiid-dev libicu-dev libasound2-dev libsamplerate0-dev libsndfile1-dev libreadline-dev libxt-dev libudev-dev libavahi-client-dev libfftw3-dev cmake gcc-4.8 g++-4.8 qt5-default qt5-qmake qttools5-dev qttools5-dev-tools qtdeclarative5-dev libqt5webkit5-dev qtpositioning5-dev libqt5sensors5-dev
> sudo apt-get autoremove gcc-4.9 g++-4.9 libstdc++-4.9-dev libasan1 libgcc-4.9-dev libubsan0
> sudo ln -s /usr/bin/gcc-4.8 /usr/bin/gcc
> sudo ln -s /usr/bin/g++-4.8 /usr/bin/g++
> sudo apt-get clean
>
> //—compile and install supercollider
> git clone --recursive git://github.com/supercollider/supercollider.git supercollider
> cd supercollider
> git submodule init && git submodule update
> sed -i 's/UL, numSubclasses/UL, (long unsigned int)numSubclasses/g' lang/LangSource/PyrObject.cpp
> mkdir build && cd build
> cmake -L -DCMAKE_BUILD_TYPE="Release" -DBUILD_TESTING=OFF -DSSE=OFF -DSSE2=OFF -DSUPERNOVA=OFF -DNOVA_SIMD=ON -DNATIVE=OFF -DSC_ED=OFF -DSC_WII=ON -DSC_IDE=ON -DSC_QT=ON -DSC_EL=OFF -DCMAKE_C_FLAGS="-mtune=cortex-a7 -mfloat-abi=hard -mfpu=neon -funsafe-math-optimizations" -DCMAKE_CXX_FLAGS="-mtune=cortex-a7 -mfloat-abi=hard -mfpu=neon -funsafe-math-optimizations" ..
> make -j4
> sudo make install
> sudo ldconfig
> cd ../..
> rm -r supercollider
> sudo mv /usr/local/share/SuperCollider/SCClassLibrary/Common/GUI /usr/local/share/SuperCollider/SCClassLibrary/scide_scqt/GUI
> sudo mv /usr/local/share/SuperCollider/SCClassLibrary/JITLib/GUI /usr/local/share/SuperCollider/SCClassLibrary/scide_scqt/JITLibGUI
>
> //—test usb soundcard
> lsusb  #soundcard should show up here
> aplay -l  #and here.  note the name.  usually it is ’Device'
> speaker-test -c2 -Ddefault:CARD=Device  #if needed edit ’Device’ to match your soundcard.  stop with ctrl+c
>
> //—test jackd and supercollider from terminal
> jackd -P95 -dalsa -dhw:1 -p1024 -n3 -s -r44100 &  #edit -dhw:1 to match your soundcard.  usually it is 1.  and if you want to start jackd from ssh first do: export DISPLAY=:0.0
> sclang  #should start sc and compile the class library with only 3 harmless class overwrites and 3 libEGL warnings
>> s.boot  #should boot the server
>
> booting 57110
> -> localhost
> sc3> JackDriver: client name is 'SuperCollider'
> SC_AudioDriver: sample rate = 44100.000000, driver's block size = 1024
> JackDriver: connected  system:capture_1 to SuperCollider:in_1
> JackDriver: connected  SuperCollider:out_1 to system:playback_1
> JackDriver: connected  SuperCollider:out_2 to system:playback_2
> SuperCollider 3 server ready.
> JackDriver: max output latency 69.7 ms
> Receiving notification messages from server localhost
> Shared memory server interface initialized
>
> sc3> a= {SinOsc.ar([400, 404])}.play  #should play sound in both channels
> -> Synth('temp__0' : 1000)
> sc3> a.free
> -> Synth('temp__0' : 1000)
>
> //—benchmarks (for rpi2)
> sc3> {1000000.do{2.5.sqrt}}.bench
> -> 1.01
> sc3> {Mix(50.collect{RLPF.ar(SinOsc.ar)});DC.ar(0)}.play
> -> s.dump  //avg show around 17.4%
> sc3> 0.exit
> pkill jackd
>
> //—start scide from desktop
> * open terminal and type:
> qjackctl  #and select the usb soundcard under setup/interface.  click ok and start
> scide  #this should launch supercollider
>
>
> _f
>
>  #|
>     fredrikolofsson.com     musicalfieldsforever.com
>  |#
>
>
> _______________________________________________
> sc-users mailing list
>
> info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
> archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
> search: http://www.listarc.bham.ac.uk/lists/sc-users/search/


_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: sc master (desktop + headless) on rpi2 with raspbian jessie

Fredrik Olofsson
hi Ivan,
i’ve tried and tried again but so far it only failed.  sc compiles fine but then freezes at startup.  no error, no nothing.  very strange.
so the instructions i posted recently won’t work on beaglebone black (jessie) and also not with old raspberry pi models (same freeze problem there).
working on it,
_f

> 19 jan 2016 kl. 17:34 skrev Ivan Franco <[hidden email]>:
>
> Great work Fredrik. Thanks.
> Have you by any chance tried to compile it for the Beaglebone Black using the same procedure?
> I don’t have time right now to try it but I’m curious if you think that any part of this would be RPi specific.
>
> Cheers,
> Ivan

  #|
     fredrikolofsson.com     musicalfieldsforever.com
  |#


_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: sc master (desktop + headless) on rpi2 with raspbian jessie

Ivan Franco
Hi Fredrik,
To compile for the BBB I was previously using your older set of instructions on the wiki. More recently I tried to make a new flasher image for the BBB and SC failed on all of the newest kernels I tried, with different distributions of Debian. So I’ve been a bit frustrated with not being able to trace the problem. I remember at some point you referred on the list which kernels failed and which passed.
What’s the current kernel and debian distro on your BB?

Ivan


> On Jan 22, 2016, at 6:14 AM, Fredrik Olofsson <[hidden email]> wrote:
>
> hi Ivan,
> i’ve tried and tried again but so far it only failed.  sc compiles fine but then freezes at startup.  no error, no nothing.  very strange.
> so the instructions i posted recently won’t work on beaglebone black (jessie) and also not with old raspberry pi models (same freeze problem there).
> working on it,
> _f
>
>> 19 jan 2016 kl. 17:34 skrev Ivan Franco <[hidden email]>:
>>
>> Great work Fredrik. Thanks.
>> Have you by any chance tried to compile it for the Beaglebone Black using the same procedure?
>> I don’t have time right now to try it but I’m curious if you think that any part of this would be RPi specific.
>>
>> Cheers,
>> Ivan
>
>  #|
>     fredrikolofsson.com     musicalfieldsforever.com
>  |#
>
>
> _______________________________________________
> sc-users mailing list
>
> info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
> archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
> search: http://www.listarc.bham.ac.uk/lists/sc-users/search/


_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: sc master (desktop + headless) on rpi2 with raspbian jessie

Fredrik Olofsson
hi Ivan,
here are my notes that i’ve used recently to build sc on bbb.  it uses wheezy on the emmc, kernel 3.8.13-bone72, gcc4.7 and a sc commit from march 2014.  this is running very well and i’ve used it extensively in embedded projects.
hope it works for you too.  if you don’t have or can find the 2015-07-28-2gb image online i can share it with you privately.  also note that my instructions also install a few extra things like the adafruit gpio python library.  but it’s easy to adapt it to your needs.
also see https://github.com/redFrik/udk11-portable_sonification_projects/tree/master/udk140515
which is very similar - only a slightly older version (but not as old as the one on sc wiki).

as for compiling a more recent sc on bbb (with jessie and with gcc 4.8 and 4.9) i’ve also failed so far.  but i’m working on it in the background and will share my findings (if/when they happen).  currently the bbb and the original rpi share the same issues with jessie and recent sc.

_f


//use BBB-eMMC-flasher-debian-7.8-console-armhf-2015-07-28-2gb.img
//power up with S2 button pressed down
//wait until all 4 leds are lit up
//unplug sd card, put in ethernet cable and restart

ssh [hidden email] #temppwd
sudo passwd debian #enter a new password

sudo dpkg-reconfigure tzdata
echo 'export LC_ALL="en_US.UTF-8"' >> ~/.bashrc

//—expand filesystem
//#df -h
//sudo /opt/scripts/tools/grow_partition.sh #///SKIP FOR EMMC///
//#sudo reboot
//#df -h


sudo apt-get update
sudo apt-get upgrade
sudo apt-get install avahi-daemon locales ntp cpufrequtils usbutils wireless-tools firmware-ralink firmware-realtek wpasupplicant build-essential alsa-base libasound2-dev libsamplerate0-dev libsndfile1-dev libavahi-client-dev libicu-dev libfftw3-dev libxt-dev git python-pip python-dev python-serial libreadline-dev cmake gcc-4.7 g++-4.7
sudo apt-get remove --auto-remove gcc-4.6
sudo ln -s /usr/bin/gcc-4.7 /usr/bin/gcc
sudo ln -s /usr/bin/g++-4.7 /usr/bin/g++
sudo apt-get clean

sudo dpkg-reconfigure locales #set en_US.UTF-8 UTF-8 twice
sudo nano /etc/default/avahi-daemon #and change from 1 to 0

//—hostname
sudo nano /etc/hostname #and replace what is there with xxx
sudo nano /etc/hosts #and edit 127.0.1.1 to match xxx
sudo reboot

//—install python stuff
sudo easy_install -U distribute
sudo pip install pyosc Adafruit_BBIO

//—install jack
git clone git://github.com/jackaudio/jack2.git
cd jack2
./waf configure --alsa
./waf build
sudo ./waf install
cd ..
sudo rm -r jack2
sudo ldconfig

//—install sc
git clone --recursive git://github.com/supercollider/supercollider.git supercollider
cd supercollider
git checkout c7600cc1c9  #last working commit it seems - mar2014
git submodule init && git submodule update
mkdir build && cd build
cmake -L -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DSSE=OFF -DSSE2=OFF -DSUPERNOVA=OFF -DNOVA_SIMD=ON -DNATIVE=OFF -DSC_QT=OFF -DSC_WII=OFF -DSC_ED=OFF -DSC_IDE=OFF -DSC_EL=OFF -DSC_VIM=OFF -DCMAKE_C_FLAGS="-march=armv7-a -mtune=cortex-a8 -mfloat-abi=hard -mfpu=neon" -DCMAKE_CXX_FLAGS="-march=armv7-a -mtune=cortex-a8 -mfloat-abi=hard -mfpu=neon" ..
make
sudo make install
sudo ldconfig
cd ../..
sudo rm -rf supercollider
sudo nano /usr/local/share/SuperCollider/SCClassLibrary/Common/GUI/Base/QtGUI.sc #comment out:
        //this.style = "Plastique";
        //this.palette = QPalette.light;
sudo nano /usr/local/share/SuperCollider/SCClassLibrary/Common/GUI/Base/QFont.sc #comment out:
        //defaultSansFace = this.prDefaultFamilyForStyle(0);
        //defaultSerifFace = this.prDefaultFamilyForStyle(1);
        //defaultMonoFace = this.prDefaultFamilyForStyle(2);
sudo halt #and connect hub+soundcard+wlan

//—realtime
sudo nano /etc/security/limits.conf #add the following before end of file
        @audio - memlock 256000
        @audio - rtprio 75
sudo nano /etc/ssh/sshd_config #and at the bottom change to…
        UsePAM yes

//—disable hdmi (and emmc)
sudo nano /boot/uEnv.txt
uncomment the line under ##Disable HDMI #///DIFFERENT FOR SDCARD///
and add the following line to the end…
        cape_enable=capemgr.enable_partno=BB-UART1,BB-UART4

sudo halt #(disconnect ethernet cable)

//—startup
nano autostart.sh #and add the following
        #!/bin/bash
        #turn off annoying onboard leds
        echo 0 > /sys/class/leds/beaglebone\:green\:usr0/brightness #heartbeat
        echo 0 > /sys/class/leds/beaglebone\:green\:usr1/brightness #microsd
        echo 0 > /sys/class/leds/beaglebone\:green\:usr2/brightness #cpu
        #echo 0 > /sys/class/leds/beaglebone\:green\:usr3/brightness #emmc
        sleep 55  #hack needed - wait for network i think
        /usr/local/bin/jackd -P75 -d dummy -C1 -p512 -r44100 & #TODO try -m
        sleep 1 #TODO try remove
        /usr/local/bin/alsa_in -q1 -d hw:1 &
        /usr/local/bin/alsa_out -q1 -d hw:1 &
        sleep 1 #TODO try remove
        su root -c "sclang -D /home/debian/mytest.scd"
chmod +x autostart.sh
sudo crontab -e #and add…
        @reboot /bin/bash /home/debian/autostart.sh

nano stop.sh #and add the following
        #!/bin/bash
        pkill scsynth
        pkill jackd
        pkill sclang
        pkill python
chmod +x stop.sh


> 23 jan 2016 kl. 17:42 skrev Ivan Franco <[hidden email]>:
>
> Hi Fredrik,
> To compile for the BBB I was previously using your older set of instructions on the wiki. More recently I tried to make a new flasher image for the BBB and SC failed on all of the newest kernels I tried, with different distributions of Debian. So I’ve been a bit frustrated with not being able to trace the problem. I remember at some point you referred on the list which kernels failed and which passed.
> What’s the current kernel and debian distro on your BB?
>
> Ivan
>
>
>> On Jan 22, 2016, at 6:14 AM, Fredrik Olofsson <[hidden email]> wrote:
>>
>> hi Ivan,
>> i’ve tried and tried again but so far it only failed.  sc compiles fine but then freezes at startup.  no error, no nothing.  very strange.
>> so the instructions i posted recently won’t work on beaglebone black (jessie) and also not with old raspberry pi models (same freeze problem there).
>> working on it,
>> _f
>>
>>> 19 jan 2016 kl. 17:34 skrev Ivan Franco <[hidden email]>:
>>>
>>> Great work Fredrik. Thanks.
>>> Have you by any chance tried to compile it for the Beaglebone Black using the same procedure?
>>> I don’t have time right now to try it but I’m curious if you think that any part of this would be RPi specific.
>>>
>>> Cheers,
>>> Ivan

  #|
     fredrikolofsson.com     musicalfieldsforever.com
  |#


_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: sc master (desktop + headless) on rpi2 with raspbian jessie

Ivan Franco
Thanks a lot Fredrik,
For now I’m gonna try to find the distro you mentioned and if I can’t find it will get back to you.

I can confirm that the latest official BBB jessie distro (bone-debian-8.3-lxqt-4gb-armhf-2016-01-24-4gb) freezes when starting sclang.
I compiled it with gcc 4.8 and removed the GUI classes as you suggested for RPi 2.

Would be great to have the latest official SC and BBB working happily together. My PhD project also uses embedded computing extensively and I really wanted to push the capabilities of SC on these platforms but I have to confess I have been looking for alternatives, since I don’t know what to expect from the interest of SC dev in supporting ARM. Would be great to hear from the community if it’s a priority, a second thought or not at all in the plans.

Cheers all,
Ivan


> On Jan 23, 2016, at 12:20 PM, Fredrik Olofsson <[hidden email]> wrote:
>
> hi Ivan,
> here are my notes that i’ve used recently to build sc on bbb.  it uses wheezy on the emmc, kernel 3.8.13-bone72, gcc4.7 and a sc commit from march 2014.  this is running very well and i’ve used it extensively in embedded projects.
> hope it works for you too.  if you don’t have or can find the 2015-07-28-2gb image online i can share it with you privately.  also note that my instructions also install a few extra things like the adafruit gpio python library.  but it’s easy to adapt it to your needs.
> also see https://github.com/redFrik/udk11-portable_sonification_projects/tree/master/udk140515
> which is very similar - only a slightly older version (but not as old as the one on sc wiki).
>
> as for compiling a more recent sc on bbb (with jessie and with gcc 4.8 and 4.9) i’ve also failed so far.  but i’m working on it in the background and will share my findings (if/when they happen).  currently the bbb and the original rpi share the same issues with jessie and recent sc.
>
> _f
>
>
> //use BBB-eMMC-flasher-debian-7.8-console-armhf-2015-07-28-2gb.img
> //power up with S2 button pressed down
> //wait until all 4 leds are lit up
> //unplug sd card, put in ethernet cable and restart
>
> ssh [hidden email] #temppwd
> sudo passwd debian #enter a new password
>
> sudo dpkg-reconfigure tzdata
> echo 'export LC_ALL="en_US.UTF-8"' >> ~/.bashrc
>
> //—expand filesystem
> //#df -h
> //sudo /opt/scripts/tools/grow_partition.sh #///SKIP FOR EMMC///
> //#sudo reboot
> //#df -h
>
>
> sudo apt-get update
> sudo apt-get upgrade
> sudo apt-get install avahi-daemon locales ntp cpufrequtils usbutils wireless-tools firmware-ralink firmware-realtek wpasupplicant build-essential alsa-base libasound2-dev libsamplerate0-dev libsndfile1-dev libavahi-client-dev libicu-dev libfftw3-dev libxt-dev git python-pip python-dev python-serial libreadline-dev cmake gcc-4.7 g++-4.7
> sudo apt-get remove --auto-remove gcc-4.6
> sudo ln -s /usr/bin/gcc-4.7 /usr/bin/gcc
> sudo ln -s /usr/bin/g++-4.7 /usr/bin/g++
> sudo apt-get clean
>
> sudo dpkg-reconfigure locales #set en_US.UTF-8 UTF-8 twice
> sudo nano /etc/default/avahi-daemon #and change from 1 to 0
>
> //—hostname
> sudo nano /etc/hostname #and replace what is there with xxx
> sudo nano /etc/hosts #and edit 127.0.1.1 to match xxx
> sudo reboot
>
> //—install python stuff
> sudo easy_install -U distribute
> sudo pip install pyosc Adafruit_BBIO
>
> //—install jack
> git clone git://github.com/jackaudio/jack2.git
> cd jack2
> ./waf configure --alsa
> ./waf build
> sudo ./waf install
> cd ..
> sudo rm -r jack2
> sudo ldconfig
>
> //—install sc
> git clone --recursive git://github.com/supercollider/supercollider.git supercollider
> cd supercollider
> git checkout c7600cc1c9  #last working commit it seems - mar2014
> git submodule init && git submodule update
> mkdir build && cd build
> cmake -L -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DSSE=OFF -DSSE2=OFF -DSUPERNOVA=OFF -DNOVA_SIMD=ON -DNATIVE=OFF -DSC_QT=OFF -DSC_WII=OFF -DSC_ED=OFF -DSC_IDE=OFF -DSC_EL=OFF -DSC_VIM=OFF -DCMAKE_C_FLAGS="-march=armv7-a -mtune=cortex-a8 -mfloat-abi=hard -mfpu=neon" -DCMAKE_CXX_FLAGS="-march=armv7-a -mtune=cortex-a8 -mfloat-abi=hard -mfpu=neon" ..
> make
> sudo make install
> sudo ldconfig
> cd ../..
> sudo rm -rf supercollider
> sudo nano /usr/local/share/SuperCollider/SCClassLibrary/Common/GUI/Base/QtGUI.sc #comment out:
> //this.style = "Plastique";
> //this.palette = QPalette.light;
> sudo nano /usr/local/share/SuperCollider/SCClassLibrary/Common/GUI/Base/QFont.sc #comment out:
> //defaultSansFace = this.prDefaultFamilyForStyle(0);
> //defaultSerifFace = this.prDefaultFamilyForStyle(1);
> //defaultMonoFace = this.prDefaultFamilyForStyle(2);
> sudo halt #and connect hub+soundcard+wlan
>
> //—realtime
> sudo nano /etc/security/limits.conf #add the following before end of file
> @audio - memlock 256000
> @audio - rtprio 75
> sudo nano /etc/ssh/sshd_config #and at the bottom change to…
> UsePAM yes
>
> //—disable hdmi (and emmc)
> sudo nano /boot/uEnv.txt
> uncomment the line under ##Disable HDMI #///DIFFERENT FOR SDCARD///
> and add the following line to the end…
> cape_enable=capemgr.enable_partno=BB-UART1,BB-UART4
>
> sudo halt #(disconnect ethernet cable)
>
> //—startup
> nano autostart.sh #and add the following
> #!/bin/bash
> #turn off annoying onboard leds
> echo 0 > /sys/class/leds/beaglebone\:green\:usr0/brightness #heartbeat
> echo 0 > /sys/class/leds/beaglebone\:green\:usr1/brightness #microsd
> echo 0 > /sys/class/leds/beaglebone\:green\:usr2/brightness #cpu
> #echo 0 > /sys/class/leds/beaglebone\:green\:usr3/brightness #emmc
> sleep 55  #hack needed - wait for network i think
> /usr/local/bin/jackd -P75 -d dummy -C1 -p512 -r44100 & #TODO try -m
> sleep 1 #TODO try remove
> /usr/local/bin/alsa_in -q1 -d hw:1 &
> /usr/local/bin/alsa_out -q1 -d hw:1 &
> sleep 1 #TODO try remove
> su root -c "sclang -D /home/debian/mytest.scd"
> chmod +x autostart.sh
> sudo crontab -e #and add…
> @reboot /bin/bash /home/debian/autostart.sh
>
> nano stop.sh #and add the following
> #!/bin/bash
> pkill scsynth
> pkill jackd
> pkill sclang
> pkill python
> chmod +x stop.sh
>
>
>> 23 jan 2016 kl. 17:42 skrev Ivan Franco <[hidden email]>:
>>
>> Hi Fredrik,
>> To compile for the BBB I was previously using your older set of instructions on the wiki. More recently I tried to make a new flasher image for the BBB and SC failed on all of the newest kernels I tried, with different distributions of Debian. So I’ve been a bit frustrated with not being able to trace the problem. I remember at some point you referred on the list which kernels failed and which passed.
>> What’s the current kernel and debian distro on your BB?
>>
>> Ivan
>>
>>
>>> On Jan 22, 2016, at 6:14 AM, Fredrik Olofsson <[hidden email]> wrote:
>>>
>>> hi Ivan,
>>> i’ve tried and tried again but so far it only failed.  sc compiles fine but then freezes at startup.  no error, no nothing.  very strange.
>>> so the instructions i posted recently won’t work on beaglebone black (jessie) and also not with old raspberry pi models (same freeze problem there).
>>> working on it,
>>> _f
>>>
>>>> 19 jan 2016 kl. 17:34 skrev Ivan Franco <[hidden email]>:
>>>>
>>>> Great work Fredrik. Thanks.
>>>> Have you by any chance tried to compile it for the Beaglebone Black using the same procedure?
>>>> I don’t have time right now to try it but I’m curious if you think that any part of this would be RPi specific.
>>>>
>>>> Cheers,
>>>> Ivan
>
>  #|
>     fredrikolofsson.com     musicalfieldsforever.com
>  |#
>
>
> _______________________________________________
> sc-users mailing list
>
> info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
> archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
> search: http://www.listarc.bham.ac.uk/lists/sc-users/search/


_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: sc master (desktop + headless) on rpi2 with raspbian jessie

Fredrik Olofsson
hi Ivan,
here are new instructions for running sc master on a bbb debian jessie headless.
http://supercollider.github.io/development/building-beagleboneblack.html

it’s all thanks to the amazing Dan Stowell.  this weekend he found and fixed that nasty freeze bug.

so this is for beaglebone black.  i’ll update the corresponding raspberry pi page soon as well.
_f

> 30 jan 2016 kl. 22:12 skrev Ivan Franco <[hidden email]>:
>
> Thanks a lot Fredrik,
> For now I’m gonna try to find the distro you mentioned and if I can’t find it will get back to you.
>
> I can confirm that the latest official BBB jessie distro (bone-debian-8.3-lxqt-4gb-armhf-2016-01-24-4gb) freezes when starting sclang.
> I compiled it with gcc 4.8 and removed the GUI classes as you suggested for RPi 2.
>
> Would be great to have the latest official SC and BBB working happily together. My PhD project also uses embedded computing extensively and I really wanted to push the capabilities of SC on these platforms but I have to confess I have been looking for alternatives, since I don’t know what to expect from the interest of SC dev in supporting ARM. Would be great to hear from the community if it’s a priority, a second thought or not at all in the plans.
>
> Cheers all,
> Ivan


  #|
     fredrikolofsson.com     musicalfieldsforever.com
  |#


_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: sc master (desktop + headless) on rpi2 with raspbian jessie

Ivan Franco
This is great Fredrik and Dan.
Thanks for the extra mile.
I had just finished doing a custom image based on the older kernels but it will be great to have the most recent distros working.

Off to try it!

Cheers!
Ivan

> On Feb 1, 2016, at 1:52 PM, Fredrik Olofsson <[hidden email]> wrote:
>
> hi Ivan,
> here are new instructions for running sc master on a bbb debian jessie headless.
> http://supercollider.github.io/development/building-beagleboneblack.html
>
> it’s all thanks to the amazing Dan Stowell.  this weekend he found and fixed that nasty freeze bug.
>
> so this is for beaglebone black.  i’ll update the corresponding raspberry pi page soon as well.
> _f
>
>> 30 jan 2016 kl. 22:12 skrev Ivan Franco <[hidden email]>:
>>
>> Thanks a lot Fredrik,
>> For now I’m gonna try to find the distro you mentioned and if I can’t find it will get back to you.
>>
>> I can confirm that the latest official BBB jessie distro (bone-debian-8.3-lxqt-4gb-armhf-2016-01-24-4gb) freezes when starting sclang.
>> I compiled it with gcc 4.8 and removed the GUI classes as you suggested for RPi 2.
>>
>> Would be great to have the latest official SC and BBB working happily together. My PhD project also uses embedded computing extensively and I really wanted to push the capabilities of SC on these platforms but I have to confess I have been looking for alternatives, since I don’t know what to expect from the interest of SC dev in supporting ARM. Would be great to hear from the community if it’s a priority, a second thought or not at all in the plans.
>>
>> Cheers all,
>> Ivan
>
>
>  #|
>     fredrikolofsson.com     musicalfieldsforever.com
>  |#
>
>
> _______________________________________________
> sc-users mailing list
>
> info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
> archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
> search: http://www.listarc.bham.ac.uk/lists/sc-users/search/


_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: sc master (desktop + headless) on rpi2 with raspbian jessie

Ivan Franco
Ok, I was able to compile fine but I get a distorted output. I have a little chime that plays automatically from a cron job that starts everything (similar to Fredrik’s)…
Really strange and I can’t understand what’s different. I’m sure the distortion doesn’t come from Alsa levels.
The exact same code plays undistorted with kernel 3.8.13-bone72, gcc4.7, 3.7 alpha 0.
Fredrik, have you done sound testing?
 
Any thoughts?

Cheers,
Ivan

> On Feb 1, 2016, at 3:48 PM, Ivan Franco <[hidden email]> wrote:
>
> This is great Fredrik and Dan.
> Thanks for the extra mile.
> I had just finished doing a custom image based on the older kernels but it will be great to have the most recent distros working.
>
> Off to try it!
>
> Cheers!
> Ivan
>
>> On Feb 1, 2016, at 1:52 PM, Fredrik Olofsson <[hidden email]> wrote:
>>
>> hi Ivan,
>> here are new instructions for running sc master on a bbb debian jessie headless.
>> http://supercollider.github.io/development/building-beagleboneblack.html
>>
>> it’s all thanks to the amazing Dan Stowell.  this weekend he found and fixed that nasty freeze bug.
>>
>> so this is for beaglebone black.  i’ll update the corresponding raspberry pi page soon as well.
>> _f
>>
>>> 30 jan 2016 kl. 22:12 skrev Ivan Franco <[hidden email]>:
>>>
>>> Thanks a lot Fredrik,
>>> For now I’m gonna try to find the distro you mentioned and if I can’t find it will get back to you.
>>>
>>> I can confirm that the latest official BBB jessie distro (bone-debian-8.3-lxqt-4gb-armhf-2016-01-24-4gb) freezes when starting sclang.
>>> I compiled it with gcc 4.8 and removed the GUI classes as you suggested for RPi 2.
>>>
>>> Would be great to have the latest official SC and BBB working happily together. My PhD project also uses embedded computing extensively and I really wanted to push the capabilities of SC on these platforms but I have to confess I have been looking for alternatives, since I don’t know what to expect from the interest of SC dev in supporting ARM. Would be great to hear from the community if it’s a priority, a second thought or not at all in the plans.
>>>
>>> Cheers all,
>>> Ivan
>>
>>
>> #|
>>    fredrikolofsson.com     musicalfieldsforever.com
>> |#
>>
>>
>> _______________________________________________
>> sc-users mailing list
>>
>> info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
>> archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
>> search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
>


_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: sc master (desktop + headless) on rpi2 with raspbian jessie

Fredrik Olofsson
hi Ivan,
crap.  the most important thing and i screw it up.  typical me :-)
yes, i also hear distortion here, but figured out that it has to do with jackd's rt-priority being set too high.  please try with -P75 instead of -P95.  seems ok here.

sorry for all the hassle.  i’ve updated the wiki build page.
_f

> 2 feb 2016 kl. 02:21 skrev Ivan Franco <[hidden email]>:
>
> Ok, I was able to compile fine but I get a distorted output. I have a little chime that plays automatically from a cron job that starts everything (similar to Fredrik’s)…
> Really strange and I can’t understand what’s different. I’m sure the distortion doesn’t come from Alsa levels.
> The exact same code plays undistorted with kernel 3.8.13-bone72, gcc4.7, 3.7 alpha 0.
> Fredrik, have you done sound testing?
>
> Any thoughts?
>
> Cheers,
> Ivan


  #|
     fredrikolofsson.com     musicalfieldsforever.com
  |#


_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: sc master (desktop + headless) on rpi2 with raspbian jessie

Noiseconformist

On 2.Feb 2016, at 15:39 , Fredrik Olofsson <[hidden email]> wrote:

> it has to do with jackd's rt-priority being set too high

i.e. jackd then not leaving enough cpu time for scsynth?
If so I’d had even more crackles on my old R-Pi, but I don’t?
(trying to figure the relations of parameters)


_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: sc master (desktop + headless) on rpi2 with raspbian jessie

Ivan Franco
In reply to this post by Fredrik Olofsson
Hi Fredrik,
I was almost sure I was using a lower priority and I just confirmed it.
Still distorts with P75.

autostart.sh:

#!/bin/bash
sudo /usr/local/bin/jackd -P75 -dalsa -dhw:1,0 -p1024 -n3 -s &
sudo /usr/local/bin/sclang /home/debian/main.scd

main.scd launched by crontab:

s.waitForBoot{
        ("chime.scd").loadRelative;
}

chime.scd:

a = Pseq(#[0, 1, 3, 5, 12], 1).asStream;
Routine({
    5.do({
        (note: a.next, dur: ((10).rand/10 + 0.1), octave:(2.rand +4), amp: 0.1).play;
        0.1.wait;
    })
}).play;

This exact same thing doesn’t distort with the 3.8.13-bone72, gcc4.7, 3.7 alpha 0.

Cheers,
Ivan

> On Feb 2, 2016, at 9:39 AM, Fredrik Olofsson <[hidden email]> wrote:
>
> hi Ivan,
> crap.  the most important thing and i screw it up.  typical me :-)
> yes, i also hear distortion here, but figured out that it has to do with jackd's rt-priority being set too high.  please try with -P75 instead of -P95.  seems ok here.
>
> sorry for all the hassle.  i’ve updated the wiki build page.
> _f
>
>> 2 feb 2016 kl. 02:21 skrev Ivan Franco <[hidden email]>:
>>
>> Ok, I was able to compile fine but I get a distorted output. I have a little chime that plays automatically from a cron job that starts everything (similar to Fredrik’s)…
>> Really strange and I can’t understand what’s different. I’m sure the distortion doesn’t come from Alsa levels.
>> The exact same code plays undistorted with kernel 3.8.13-bone72, gcc4.7, 3.7 alpha 0.
>> Fredrik, have you done sound testing?
>>
>> Any thoughts?
>>
>> Cheers,
>> Ivan
>
>
>  #|
>     fredrikolofsson.com     musicalfieldsforever.com
>  |#
>
>
> _______________________________________________
> sc-users mailing list
>
> info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
> archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
> search: http://www.listarc.bham.ac.uk/lists/sc-users/search/


_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: sc master (desktop + headless) on rpi2 with raspbian jessie

Fredrik Olofsson
urk, then i must have done something strange while testing this.  i did get clean sound for a moment and i was pretty sure it was the P75 that made it.
but hm, what else did i do there… installed alsa-utils, tried with speaker-test… don’t remember.

could it be some kind of system feedback?  maybe try jack dummy driver...

sudo jackd -P50 -d dummy -C1 -p1024 -r44100 &
sudo alsa_in -q1 -d hw:1 &
sudo alsa_out -q1 -d hw:1 &
sudo sclang
s.boot
"jack_connect SuperCollider:in_1 alsa_in:capture_1 &".unixCmd;
"jack_connect SuperCollider:out_1 alsa_out:playback_1 &".unixCmd;
"jack_connect SuperCollider:out_2 alsa_out:playback_2 &".unixCmd;
a= {SinOsc.ar([400, 404])}.play

or what happens when you lowed the amplitude even more?
a= {SinOsc.ar([400, 404],0,0.1)}.play

sorry, all this is a bit above my head.
_f

> 2 feb 2016 kl. 20:55 skrev Ivan Franco <[hidden email]>:
>
> Hi Fredrik,
> I was almost sure I was using a lower priority and I just confirmed it.
> Still distorts with P75.
>
> autostart.sh:
>
> #!/bin/bash
> sudo /usr/local/bin/jackd -P75 -dalsa -dhw:1,0 -p1024 -n3 -s &
> sudo /usr/local/bin/sclang /home/debian/main.scd
>
> main.scd launched by crontab:
>
> s.waitForBoot{
> ("chime.scd").loadRelative;
> }
>
> chime.scd:
>
> a = Pseq(#[0, 1, 3, 5, 12], 1).asStream;
> Routine({
>    5.do({
> (note: a.next, dur: ((10).rand/10 + 0.1), octave:(2.rand +4), amp: 0.1).play;
>        0.1.wait;
>    })
> }).play;
>
> This exact same thing doesn’t distort with the 3.8.13-bone72, gcc4.7, 3.7 alpha 0.
>
> Cheers,
> Ivan
>
>> On Feb 2, 2016, at 9:39 AM, Fredrik Olofsson <[hidden email]> wrote:
>>
>> hi Ivan,
>> crap.  the most important thing and i screw it up.  typical me :-)
>> yes, i also hear distortion here, but figured out that it has to do with jackd's rt-priority being set too high.  please try with -P75 instead of -P95.  seems ok here.
>>
>> sorry for all the hassle.  i’ve updated the wiki build page.
>> _f
>>
>>> 2 feb 2016 kl. 02:21 skrev Ivan Franco <[hidden email]>:
>>>
>>> Ok, I was able to compile fine but I get a distorted output. I have a little chime that plays automatically from a cron job that starts everything (similar to Fredrik’s)…
>>> Really strange and I can’t understand what’s different. I’m sure the distortion doesn’t come from Alsa levels.
>>> The exact same code plays undistorted with kernel 3.8.13-bone72, gcc4.7, 3.7 alpha 0.
>>> Fredrik, have you done sound testing?
>>>
>>> Any thoughts?
>>>
>>> Cheers,
>>> Ivan

  #|
     fredrikolofsson.com     musicalfieldsforever.com
  |#


_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: sc master (desktop + headless) on rpi2 with raspbian jessie

Ivan Franco
Hey Fredrik,
You’ve already did a lot and I’m truly grateful.

I created two flasher images with the two different kernels / sc versions, so I could quickly swap between both.
With these I can just drop the bash scripts and sc files. It is striking that the exact same thing has different results.
One curious thing is that the single oscillator test sounds fine. I too don’t know where to start poking at other things…

Ivan

> On Feb 2, 2016, at 3:12 PM, Fredrik Olofsson <[hidden email]> wrote:
>
> urk, then i must have done something strange while testing this.  i did get clean sound for a moment and i was pretty sure it was the P75 that made it.
> but hm, what else did i do there… installed alsa-utils, tried with speaker-test… don’t remember.
>
> could it be some kind of system feedback?  maybe try jack dummy driver...
>
> sudo jackd -P50 -d dummy -C1 -p1024 -r44100 &
> sudo alsa_in -q1 -d hw:1 &
> sudo alsa_out -q1 -d hw:1 &
> sudo sclang
> s.boot
> "jack_connect SuperCollider:in_1 alsa_in:capture_1 &".unixCmd;
> "jack_connect SuperCollider:out_1 alsa_out:playback_1 &".unixCmd;
> "jack_connect SuperCollider:out_2 alsa_out:playback_2 &".unixCmd;
> a= {SinOsc.ar([400, 404])}.play
>
> or what happens when you lowed the amplitude even more?
> a= {SinOsc.ar([400, 404],0,0.1)}.play
>
> sorry, all this is a bit above my head.
> _f
>
>> 2 feb 2016 kl. 20:55 skrev Ivan Franco <[hidden email]>:
>>
>> Hi Fredrik,
>> I was almost sure I was using a lower priority and I just confirmed it.
>> Still distorts with P75.
>>
>> autostart.sh:
>>
>> #!/bin/bash
>> sudo /usr/local/bin/jackd -P75 -dalsa -dhw:1,0 -p1024 -n3 -s &
>> sudo /usr/local/bin/sclang /home/debian/main.scd
>>
>> main.scd launched by crontab:
>>
>> s.waitForBoot{
>> ("chime.scd").loadRelative;
>> }
>>
>> chime.scd:
>>
>> a = Pseq(#[0, 1, 3, 5, 12], 1).asStream;
>> Routine({
>>   5.do({
>> (note: a.next, dur: ((10).rand/10 + 0.1), octave:(2.rand +4), amp: 0.1).play;
>>       0.1.wait;
>>   })
>> }).play;
>>
>> This exact same thing doesn’t distort with the 3.8.13-bone72, gcc4.7, 3.7 alpha 0.
>>
>> Cheers,
>> Ivan
>>
>>> On Feb 2, 2016, at 9:39 AM, Fredrik Olofsson <[hidden email]> wrote:
>>>
>>> hi Ivan,
>>> crap.  the most important thing and i screw it up.  typical me :-)
>>> yes, i also hear distortion here, but figured out that it has to do with jackd's rt-priority being set too high.  please try with -P75 instead of -P95.  seems ok here.
>>>
>>> sorry for all the hassle.  i’ve updated the wiki build page.
>>> _f
>>>
>>>> 2 feb 2016 kl. 02:21 skrev Ivan Franco <[hidden email]>:
>>>>
>>>> Ok, I was able to compile fine but I get a distorted output. I have a little chime that plays automatically from a cron job that starts everything (similar to Fredrik’s)…
>>>> Really strange and I can’t understand what’s different. I’m sure the distortion doesn’t come from Alsa levels.
>>>> The exact same code plays undistorted with kernel 3.8.13-bone72, gcc4.7, 3.7 alpha 0.
>>>> Fredrik, have you done sound testing?
>>>>
>>>> Any thoughts?
>>>>
>>>> Cheers,
>>>> Ivan
>
>  #|
>     fredrikolofsson.com     musicalfieldsforever.com
>  |#
>
>
> _______________________________________________
> sc-users mailing list
>
> info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
> archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
> search: http://www.listarc.bham.ac.uk/lists/sc-users/search/


_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: sc master (desktop + headless) on rpi2 with raspbian jessie

julian.rohrhuber
just a very stupid idea: could it be distortion of the audio due to absolute level? I see that you multiply by 0.1, but still.

> On 02.02.2016, at 21:54, Ivan Franco <[hidden email]> wrote:
>
> Hey Fredrik,
> You’ve already did a lot and I’m truly grateful.
>
> I created two flasher images with the two different kernels / sc versions, so I could quickly swap between both.
> With these I can just drop the bash scripts and sc files. It is striking that the exact same thing has different results.
> One curious thing is that the single oscillator test sounds fine. I too don’t know where to start poking at other things…
>
> Ivan
>
>> On Feb 2, 2016, at 3:12 PM, Fredrik Olofsson <[hidden email]> wrote:
>>
>> urk, then i must have done something strange while testing this.  i did get clean sound for a moment and i was pretty sure it was the P75 that made it.
>> but hm, what else did i do there… installed alsa-utils, tried with speaker-test… don’t remember.
>>
>> could it be some kind of system feedback?  maybe try jack dummy driver...
>>
>> sudo jackd -P50 -d dummy -C1 -p1024 -r44100 &
>> sudo alsa_in -q1 -d hw:1 &
>> sudo alsa_out -q1 -d hw:1 &
>> sudo sclang
>> s.boot
>> "jack_connect SuperCollider:in_1 alsa_in:capture_1 &".unixCmd;
>> "jack_connect SuperCollider:out_1 alsa_out:playback_1 &".unixCmd;
>> "jack_connect SuperCollider:out_2 alsa_out:playback_2 &".unixCmd;
>> a= {SinOsc.ar([400, 404])}.play
>>
>> or what happens when you lowed the amplitude even more?
>> a= {SinOsc.ar([400, 404],0,0.1)}.play
>>
>> sorry, all this is a bit above my head.
>> _f
>>
>>> 2 feb 2016 kl. 20:55 skrev Ivan Franco <[hidden email]>:
>>>
>>> Hi Fredrik,
>>> I was almost sure I was using a lower priority and I just confirmed it.
>>> Still distorts with P75.
>>>
>>> autostart.sh:
>>>
>>> #!/bin/bash
>>> sudo /usr/local/bin/jackd -P75 -dalsa -dhw:1,0 -p1024 -n3 -s &
>>> sudo /usr/local/bin/sclang /home/debian/main.scd
>>>
>>> main.scd launched by crontab:
>>>
>>> s.waitForBoot{
>>> ("chime.scd").loadRelative;
>>> }
>>>
>>> chime.scd:
>>>
>>> a = Pseq(#[0, 1, 3, 5, 12], 1).asStream;
>>> Routine({
>>>  5.do({
>>> (note: a.next, dur: ((10).rand/10 + 0.1), octave:(2.rand +4), amp: 0.1).play;
>>>      0.1.wait;
>>>  })
>>> }).play;
>>>
>>> This exact same thing doesn’t distort with the 3.8.13-bone72, gcc4.7, 3.7 alpha 0.
>>>
>>> Cheers,
>>> Ivan
>>>
>>>> On Feb 2, 2016, at 9:39 AM, Fredrik Olofsson <[hidden email]> wrote:
>>>>
>>>> hi Ivan,
>>>> crap.  the most important thing and i screw it up.  typical me :-)
>>>> yes, i also hear distortion here, but figured out that it has to do with jackd's rt-priority being set too high.  please try with -P75 instead of -P95.  seems ok here.
>>>>
>>>> sorry for all the hassle.  i’ve updated the wiki build page.
>>>> _f
>>>>
>>>>> 2 feb 2016 kl. 02:21 skrev Ivan Franco <[hidden email]>:
>>>>>
>>>>> Ok, I was able to compile fine but I get a distorted output. I have a little chime that plays automatically from a cron job that starts everything (similar to Fredrik’s)…
>>>>> Really strange and I can’t understand what’s different. I’m sure the distortion doesn’t come from Alsa levels.
>>>>> The exact same code plays undistorted with kernel 3.8.13-bone72, gcc4.7, 3.7 alpha 0.
>>>>> Fredrik, have you done sound testing?
>>>>>
>>>>> Any thoughts?
>>>>>
>>>>> Cheers,
>>>>> Ivan
>>
>> #|
>>    fredrikolofsson.com     musicalfieldsforever.com
>> |#
>>
>>
>> _______________________________________________
>> sc-users mailing list
>>
>> info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
>> archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
>> search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
>
>
> _______________________________________________
> sc-users mailing list
>
> info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
> archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
> search: http://www.listarc.bham.ac.uk/lists/sc-users/search/


_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: sc master (desktop + headless) on rpi2 with raspbian jessie

Ivan Franco
No, I also tried lower levels.
Like I said before the same exact thing works fine in another distro.

Thanks,
Ivan

> On Feb 2, 2016, at 3:58 PM, Julian Rohrhuber <[hidden email]> wrote:
>
> just a very stupid idea: could it be distortion of the audio due to absolute level? I see that you multiply by 0.1, but still.
>
>> On 02.02.2016, at 21:54, Ivan Franco <[hidden email]> wrote:
>>
>> Hey Fredrik,
>> You’ve already did a lot and I’m truly grateful.
>>
>> I created two flasher images with the two different kernels / sc versions, so I could quickly swap between both.
>> With these I can just drop the bash scripts and sc files. It is striking that the exact same thing has different results.
>> One curious thing is that the single oscillator test sounds fine. I too don’t know where to start poking at other things…
>>
>> Ivan
>>
>>> On Feb 2, 2016, at 3:12 PM, Fredrik Olofsson <[hidden email]> wrote:
>>>
>>> urk, then i must have done something strange while testing this.  i did get clean sound for a moment and i was pretty sure it was the P75 that made it.
>>> but hm, what else did i do there… installed alsa-utils, tried with speaker-test… don’t remember.
>>>
>>> could it be some kind of system feedback?  maybe try jack dummy driver...
>>>
>>> sudo jackd -P50 -d dummy -C1 -p1024 -r44100 &
>>> sudo alsa_in -q1 -d hw:1 &
>>> sudo alsa_out -q1 -d hw:1 &
>>> sudo sclang
>>> s.boot
>>> "jack_connect SuperCollider:in_1 alsa_in:capture_1 &".unixCmd;
>>> "jack_connect SuperCollider:out_1 alsa_out:playback_1 &".unixCmd;
>>> "jack_connect SuperCollider:out_2 alsa_out:playback_2 &".unixCmd;
>>> a= {SinOsc.ar([400, 404])}.play
>>>
>>> or what happens when you lowed the amplitude even more?
>>> a= {SinOsc.ar([400, 404],0,0.1)}.play
>>>
>>> sorry, all this is a bit above my head.
>>> _f
>>>
>>>> 2 feb 2016 kl. 20:55 skrev Ivan Franco <[hidden email]>:
>>>>
>>>> Hi Fredrik,
>>>> I was almost sure I was using a lower priority and I just confirmed it.
>>>> Still distorts with P75.
>>>>
>>>> autostart.sh:
>>>>
>>>> #!/bin/bash
>>>> sudo /usr/local/bin/jackd -P75 -dalsa -dhw:1,0 -p1024 -n3 -s &
>>>> sudo /usr/local/bin/sclang /home/debian/main.scd
>>>>
>>>> main.scd launched by crontab:
>>>>
>>>> s.waitForBoot{
>>>> ("chime.scd").loadRelative;
>>>> }
>>>>
>>>> chime.scd:
>>>>
>>>> a = Pseq(#[0, 1, 3, 5, 12], 1).asStream;
>>>> Routine({
>>>> 5.do({
>>>> (note: a.next, dur: ((10).rand/10 + 0.1), octave:(2.rand +4), amp: 0.1).play;
>>>>     0.1.wait;
>>>> })
>>>> }).play;
>>>>
>>>> This exact same thing doesn’t distort with the 3.8.13-bone72, gcc4.7, 3.7 alpha 0.
>>>>
>>>> Cheers,
>>>> Ivan
>>>>
>>>>> On Feb 2, 2016, at 9:39 AM, Fredrik Olofsson <[hidden email]> wrote:
>>>>>
>>>>> hi Ivan,
>>>>> crap.  the most important thing and i screw it up.  typical me :-)
>>>>> yes, i also hear distortion here, but figured out that it has to do with jackd's rt-priority being set too high.  please try with -P75 instead of -P95.  seems ok here.
>>>>>
>>>>> sorry for all the hassle.  i’ve updated the wiki build page.
>>>>> _f
>>>>>
>>>>>> 2 feb 2016 kl. 02:21 skrev Ivan Franco <[hidden email]>:
>>>>>>
>>>>>> Ok, I was able to compile fine but I get a distorted output. I have a little chime that plays automatically from a cron job that starts everything (similar to Fredrik’s)…
>>>>>> Really strange and I can’t understand what’s different. I’m sure the distortion doesn’t come from Alsa levels.
>>>>>> The exact same code plays undistorted with kernel 3.8.13-bone72, gcc4.7, 3.7 alpha 0.
>>>>>> Fredrik, have you done sound testing?
>>>>>>
>>>>>> Any thoughts?
>>>>>>
>>>>>> Cheers,
>>>>>> Ivan
>>>
>>> #|
>>>   fredrikolofsson.com     musicalfieldsforever.com
>>> |#
>>>
>>>
>>> _______________________________________________
>>> sc-users mailing list
>>>
>>> info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
>>> archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
>>> search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
>>
>>
>> _______________________________________________
>> sc-users mailing list
>>
>> info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
>> archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
>> search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
>
>
> _______________________________________________
> sc-users mailing list
>
> info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
> archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
> search: http://www.listarc.bham.ac.uk/lists/sc-users/search/


_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: sc master (desktop + headless) on rpi2 with raspbian jessie

Noiseconformist
In reply to this post by Ivan Franco

On 2.Feb 2016, at 2:21 , Ivan Franco <[hidden email]> wrote:

> The exact same code plays undistorted with kernel 3.8.13-bone72, gcc4.7, 3.7 alpha 0.

what’s the kernel you’re trying now? other differences?
_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: sc master (desktop + headless) on rpi2 with raspbian jessie

Ivan Franco
Hello,

The setup we’re trying to get to work is:
kernel  - 4.1.16 (included with the debian jessie release for armhf)
gcc 4.9.2
supercollider 3.7 master (beta1 I would think?)

Other than that nothing is really different since Alsa was updated to latest version and Jack was compiled from source in both systems.

Ivan

> On Feb 2, 2016, at 5:04 PM, Michael Zacherl <[hidden email]> wrote:
>
>
> On 2.Feb 2016, at 2:21 , Ivan Franco <[hidden email]> wrote:
>
>> The exact same code plays undistorted with kernel 3.8.13-bone72, gcc4.7, 3.7 alpha 0.
>
> what’s the kernel you’re trying now? other differences?
> _______________________________________________
> sc-users mailing list
>
> info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
> archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
> search: http://www.listarc.bham.ac.uk/lists/sc-users/search/


_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: sc master (desktop + headless) on rpi2 with raspbian jessie

Alessandro Fogar
Hi, 

are these instructions still valid ?

Fredrik, I finally purchased a Raspberry Pi3 and I'm trying...

Best

AF

2016-02-02 23:41 GMT+01:00 Ivan Franco <[hidden email]>:
Hello,

The setup we’re trying to get to work is:
kernel  - 4.1.16 (included with the debian jessie release for armhf)
gcc 4.9.2
supercollider 3.7 master (beta1 I would think?)

Other than that nothing is really different since Alsa was updated to latest version and Jack was compiled from source in both systems.

Ivan

> On Feb 2, 2016, at 5:04 PM, Michael Zacherl <[hidden email]> wrote:
>
>
> On 2.Feb 2016, at 2:21 , Ivan Franco <[hidden email]> wrote:
>
>> The exact same code plays undistorted with kernel 3.8.13-bone72, gcc4.7, 3.7 alpha 0.
>
> what’s the kernel you’re trying now? other differences?
> _______________________________________________
> sc-users mailing list
>
> info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
> archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
> search: http://www.listarc.bham.ac.uk/lists/sc-users/search/


_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/



--
Alessandro Fogar

http://www.fogar.it
123
Loading...