Hi all ,
I am trying to change some boot settings in sonic pi , I would like to use soundflower64 as a default boot device and specify certain channels (9-15) to use as output.
The idea is to send sonic pi audio to reaper and capture split tracks in it.
I would also like to know if it is possible c=to see and change supercollider’s port number so I can use tidal and sonic pi together without conflict
Thanks in advance
Sebastian
You can assign the audio output device that Sonic Pi uses, but you have to do it manually in the code that boots Sonic Pi’s ‘embedded’ SuperCollider server. In particular, look for the boot_server_osx
function that’s located in the ‘scsynthexternal.rb’ file (not sure of the exact path for that on a Mac system, but relative to your SonicPi installation path, it should be in /app/server/ruby/lib/sonicpi).
You’ll need to add a line for the ‘-H’ switch, then indicate the name of your audio device (Soundflower, in this case-- I would get the exact device name by booting up SuperCollider and looking at the devices it finds, but if you don’t have SC up and running, that info might appear in the Sonic Pi logs?).
Bryan
Thanks so much for your help.
I found boot_server_osx in the context pasted below.
Sorry about my ignorance but I am not sure what you mean by “You’ll need to add a line for the ‘-H’ switch” but this is the way SC lists it as an output :
“Soundflower (64ch)” Output Device
Streams: 1
0 channels 64
this is the osx boot looks like in scsynthexternal.rb
def boot
if booted?
server_log “Server already booted…”
return false
end
puts “Booting server…”
@osc_server = OSC::UDPServer.new(0, use_decoder_cache: true, use_encoder_cache: true)
@osc_server.add_global_method do |address, args|
case address
when "/n_end"
id = args[0].to_i
@events.async_event "/n_end/#{id}", args
when "/n_off"
id = args[0].to_i
@events.async_event "/n_off/#{id}", args
when "/n_on"
id = args[0].to_i
@events.async_event "/n_on/#{id}", args
when "/n_go"
id = args[0].to_i
@events.async_event "/n_go/#{id}", args
when "/n_move"
id = args[0].to_i
@events.async_event "/n_move/#{id}", args
else
@events.async_event address, args
end
p = 0
d = 0
b = 0
m = 60
@register_cue_event_lambda.call(Time.now, p, @scsynth_thread_id, d, b, m, address, args) if address.start_with? "/scsynth/"
end
case os
when :raspberry
boot_server_raspberry_pi
when :linux
boot_server_linux
when :osx
boot_server_osx
when :windows
boot_server_windows
end
true
end
Sorry, about that-- so, you’ll need to add another line in this section (‘boot_and_wait’)
where all the server options are being passed:
So, something like "-H", "My Audio Device"
Bryan
In fact, here’s a list of other server switches that may come in handy:
supercollider_synth options:
-v print the supercollider version and exit
-u <udp-port-number> a port number 0-65535
-t <tcp-port-number> a port number 0-65535
-B <bind-to-address> an IP address
-c <number-of-control-bus-channels> (default 16384)
-a <number-of-audio-bus-channels> (default 1024)
-i <number-of-input-bus-channels> (default 8)
-o <number-of-output-bus-channels> (default 8)
-z <block-size> (default 64)
-Z <hardware-buffer-size> (default 0)
-S <hardware-sample-rate> (default 44100)
-b <number-of-sample-buffers> (default 1024)
-n <max-number-of-nodes> (default 1024)
-d <max-number-of-synth-defs> (default 1024)
-m <real-time-memory-size> (default 8192)
-w <number-of-wire-buffers> (default 64)
-r <number-of-random-seeds> (default 64)
-D <load synthdefs? 1 or 0> (default 1)
-R <publish to Rendezvous? 1 or 0> (default 1)
-l <max-logins> (default 64)
maximum number of named return addresses stored
also maximum number of tcp connections accepted
-p <session-password>
When using TCP, the session password must be the first command sent.
The default is no password.
UDP ports never require passwords, so for security use TCP.
-N <cmd-filename> <input-filename> <output-filename> <sample-rate> <header-format> <sample-format>
-H <hardware-device-name>
-V <verbosity>
0 is normal behaviour.
-1 suppresses informational messages.
-2 suppresses informational and many error messages, as well as
messages from Poll.
The default is 0.
-U <ugen-plugins-path> a colon-separated list of paths
if -U is specified, the standard paths are NOT searched for plugins.
-P <restricted-path>
if specified, prevents file-accessing OSC commands from
accessing files outside <restricted-path>.
You’ll note there is a switch for the server port-- I believe you had mentioned in your original post that you had wanted to know how to have Sonic Pi use a different SC port…
(btw, this info can be found by running: <sonic pi dir>/app/server/native/scsynth -h
.
Bryan
1 Like