Found a solution which is to increase the
maxLogins option of each server to 2. It seems that on
the pi, when sclang is killed off after the creation
of each server, the client remains attached. On the
desktop Ubuntu machine it doesn't.
I'm using the following to kill sclang after
each server is booted:
I tried using 0.exit but that had the
unwanted effect of also killing the scsynth.
I'm happy at least that it's working and I
can run synths on the 4 cores.
adding to my last message, the curious
thing is that if I do exactly the same thing on my
desktop computer, it works. Any reason why it
doesn't work on Pi?
I also tried using only 2 servers on the
pi (on cores 0 and 1 and again on cores 0 and 2) but
the same error results: "could not register, too
many users".
Any ideas?
Thanks
___________________
Many thanks sludgefree. Managed to get
servers running on the 4 cores of the Pi3. I've
pasted my method for this at the end of this
message. The only problems is that I don't know how
to access the servers once they're all created. For
example, the following command in a terminal shows
that the 4 servers are running (and I've tested them
with taskset and they are associated with each of
the 4 cores on the Pi3):
pi@raspberrypi:~/scripts $ ps -ef | grep
scsynth
pi 2431 1 1 11:41 pts/0 00:00:08
scsynth -u 57200 -a 1024 -i 2 -o 2 -b 1026 -H SC
Server 1 -R 0 -C 0 -l 1
pi 2510 1 1 11:41 pts/0 00:00:08
scsynth -u 57201 -a 1024 -i 2 -o 2 -b 1026 -H SC
Server 2 -R 0 -C 0 -l 1
pi 2585 1 1 11:41 pts/0 00:00:07
scsynth -u 57202 -a 1024 -i 2 -o 2 -b 1026 -H SC
Server 3 -R 0 -C 0 -l 1
pi 2659 1 1 11:41 pts/0 00:00:07
scsynth -u 57203 -a 1024 -i 2 -o 2 -b 1026 -H SC
Server 4 -R 0 -C 0 -l 1
pi 2860 715 0 11:51 pts/0 00:00:00 grep
--color=auto scsynth
The first Server was created with
NetAddr("127.0.0.1", 57200) - see below
Running sclang again, I thought then that
I might be able to create an instance of the server
with the following:
n = NetAddr("127.0.0.1", 57200);
s = Server.remote("s1", n )
This however results in the following:
s1 : setting clientID to 0.
-> s1
Requested notification messages from server 's1'
s1 - could not register, too many users.
It also kills off Server 1 running on core
1.
Any suggestions please on what I can do to
access the servers created on cores 1-4?
I'll paste below the technique I used to
create the 4 servers.
All the best,
Iain
Created 4 .scd files.
Contents of launchserver1.scd:
n = NetAddr("127.0.0.1", 57200);
s = Server.new("s1", n);
o = s.options;
o.device = "SC Server 1";
s.waitForBoot {
"killall -9 sclang".unixCmd
}
Contents of launchserver2.scd:
n = NetAddr("127.0.0.1", 57201);
s = Server.new("s2", n);
o = s.options;
o.device = "SC Server 2";
s.waitForBoot {
"killall -9 sclang".unixCmd
}
Contents of launchserver3.scd:
n = NetAddr("127.0.0.1", 57202);
s = Server.new("s3", n);
o = s.options;
o.device = "SC Server 3";
s.waitForBoot {
"killall -9 sclang".unixCmd
}
Contents of launchserver4.scd:
n = NetAddr("127.0.0.1", 57203);
s = Server.new("s4", n);
o = s.options;
o.device = "SC Server 4";
s.waitForBoot {
"killall -9 sclang".unixCmd
}
......
Then to launch everything, a bash script with the
following:
#!/bin/bash
killall -9 sclang scsynth
/usr/bin/taskset -c 0 sclang
/home/pi/scripts/launchserver1.scd
/usr/bin/taskset -c 1 sclang
/home/pi/scripts/launchserver2.scd
/usr/bin/taskset -c 2 sclang
/home/pi/scripts/launchserver3.scd
/usr/bin/taskset -c 3 sclang
/home/pi/scripts/launchserver4.scd
exit 0
This is all experimental, so please
forgive the lack of specifics:
I wrote a script that would kick off the first
server, which would run a bunch of nodes, and then
exit the script with sclang running in the
background.
I had a second script that I would
run after that for the second server. Linux
automatically started the second server on its
own core.
I am also not sure what's up with
only needing two servers; it's possible that my
"quad" core is really more of a physical dual
core, with some machine virtualization on top of
it :)
If I were using this method on a
regular basis, I would probably figure out a way
to merge the scripts, but most of what i do just
doesn't require that much power.
--
_________
Iain Mott
http://escuta.org