monome / norns

norns is many sound instruments.
http://monome.org
GNU General Public License v3.0
630 stars 147 forks source link

investigate sc-supernova #435

Closed catfact closed 6 years ago

catfact commented 6 years ago

its worth putting a little time into checking the current state of sc-supernova on ARM.

available information and issues online seem a little stale.

simonvanderveldt commented 6 years ago

Finally managed to finish sc 3.9.1 compilation on norns, apparently some combination of CMake flags causes compilation to fail :| Managed to compile it using the following:

$ cmake -L -DCMAKE_BUILD_TYPE="Release" -DBUILD_TESTING=OFF -DSUPERNOVA=ON -DNATIVE=ON -DSC_WII=OFF -DSC_IDE=OFF -DSC_QT=OFF -DSC_ED=OFF -DSC_EL=OFF -DSC_VIM=OFF ..
$ make

At least starting supernova works fine:

we@norns:~/supercollider/build/server/supernova $ ./supernova 
Supernova booting
samplerate mismatch between command line argument and jack
forcing samplerate of 48000Hz
Supernova ready

Next up: Try to get it to replace scsynth and run some scripts

simonvanderveldt commented 6 years ago

So I had to recompile with -DSC_QT=OFF otherwise sclang failed to start because of some missing Qt dependency.

Also had to do a make install otherwise sclang would complain about missing library items, haven't been able to find a way to run it in a "development" setup using the dependencies from within the project/directory.

Anyway, the basics seem to work:

we@norns:~/supercollider/build $ ./lang/sclang 
compiling class library...
    Found 594 primitives.
    Compiling directory '/usr/local/share/SuperCollider/SCClassLibrary'
    Compiling directory '/home/we/.local/share/SuperCollider/Extensions'
ERROR: Class extension for nonexistent class 'HistoryGui'
     In file:'deprecated/3.9/HistoryGui.sc'
    numentries = 665683 / 7120940 = 0.093
    3845 method selectors, 1852 classes
    method table size 4556556 bytes, big table size 28483760
    Number of Symbols 9118
    Byte Code Size 263984
    compiled 228 files in 0.51 seconds

Info: 4 methods are currently overwritten by extensions. To see which, execute:
MethodOverride.printAll

compile done
localhost : setting clientID to 0.
internal : setting clientID to 0.
Class tree inited in 0.04 seconds

*** Welcome to SuperCollider 3.9.3. *** For help type ctrl-c ctrl-h (Emacs) or :SChelp (vim) or ctrl-U (sced/gedit).
sc3> Server.supernova
-> Server
sc3> s.boot
-> localhost
sc3> booting server 'localhost' on address: 127.0.0.1:57110
Supernova booting
samplerate mismatch between command line argument and jack
forcing samplerate of 48000Hz
Supernova ready
Requested notification messages from server 'localhost'
localhost: no maxLogins info from server process.
localhost: keeping clientID (0) as confirmed by server process.
Shared memory server interface initialized

sc3> { SinOsc.ar * 0.1 }.play(s)
-> Synth('temp__0' : 1000)
sc3> 

The sine tone is audible after this. I guess the next step is figuring out if it works with the norns extensions or maybe run something more complex, but I wouldn't know what. If anyone has any suggestions please let me know :)

[edit] Removed note about sound being mono, which was purely caused by my lack of SC knowledge :)

audionerd commented 6 years ago

The sine tone is audible after this, though only in mono (left side), not sure why.

{ SinOsc.ar * 0.1 }.play(s) is 1 channel { SinOsc.ar * 0.1 ! 2 }.play(s) or { SinOsc.ar.dup * 0.1 }.play(s) would be 2 channels

tehn commented 6 years ago

ok, i've built and installed it, from the 3.9.3 tarball (i should've just cloned github)

the sclang at 100% issue is back, and i've forgotten how this was fixed. searching git issues was not effective... and the build incantations for the build hosted by @artfwo i can't find anywhere... is that somewhere? and if not we should document it and also host these on the monome site.

switching via Server.supernova just seemed like it works, though i don't know what i'm doing.

artfwo commented 6 years ago

the cpu hogging issue is apparently fixed: https://github.com/supercollider/supercollider/issues/2144

the cmake flags currently used to build packages on device are:

    -DCMAKE_BUILD_TYPE=Release \
    -DNATIVE=1 \
    -DSSE=0 \
    -DSSE2=0 \
    -DENABLE_TESTSUITE=0 \
    -DCMAKE_SKIP_RPATH=1 \
    -DLIBSCSYNTH=0 \
    -DSUPERNOVA=0 \
    -DSC_WII=0 \
    -DSC_IDE=0 \
    -DSC_QT=0 \
    -DSC_ED=0 \
    -DSC_EL=0 \
    -DSC_VIM=1
tehn commented 6 years ago

added file startup.scd to ~/.config/Supercollider/ with contents:

Server.supernova

working well, though some errors:

Exception when reading synthdef: Cannot load synth soft_cut_voice: Unit generator SoftCutHead not installed
Exception when reading synthdef: Cannot load synth faust_comp: Unit generator FaustCompressor not installed
Exception when reading synthdef: Cannot load synth faust_verb: Unit generator FaustZitaVerbLight not installed

not sure if locations differ for supernova.

also, my build still is throwing extremely high CPU for sclang so i obviously messed something up.

audionerd commented 6 years ago

Those UGens might require Supernova-compatible builds. There's a flag you can set when building.

catfact commented 6 years ago

Yeah you need to change norns/SC/wscript

catfact commented 6 years ago

ok sorry for my delay, busy times.

@tehn

my build still is throwing extremely high CPU for sclang so i obviously messed something up.

i'm not getting this anymore. the requisite patch was (finally) merged upstream in commit 3c3688cd2ba2419f9d4ac9a181972509e84665de on june 23.

re: supernova and ugens. still trying to figure out how to do this through waf. may fall back on cmake builds at least to see if things are working for now.

artfwo commented 6 years ago

@catfact i think this should be done for plugins to work.

catfact commented 6 years ago

https://github.com/monome/norns/pull/464/files