less ugly
This commit is contained in:
1
BuboShortcuts.sc
Normal file
1
BuboShortcuts.sc
Normal file
@ -0,0 +1 @@
|
|||||||
|
Eu : Pbjorklund2 {}
|
||||||
@ -1,17 +1,30 @@
|
|||||||
Boot {
|
Boot {
|
||||||
|
|
||||||
|
classvar <>clock;
|
||||||
|
classvar <>localPath;
|
||||||
|
classvar <>samplePath;
|
||||||
|
|
||||||
|
|
||||||
*new {
|
*new {
|
||||||
arg samplePath;
|
arg configPath, samplePath;
|
||||||
|
var s = Server.default;
|
||||||
|
var p; var c;
|
||||||
var banner = "┳┓ ┓ ┳┓\n"
|
var banner = "┳┓ ┓ ┳┓\n"
|
||||||
"┣┫┓┏┣┓┏┓ ┣┫┏┓┏┓╋\n"
|
"┣┫┓┏┣┓┏┓ ┣┫┏┓┏┓╋\n"
|
||||||
"┻┛┗┻┗┛┗┛ ┻┛┗┛┗┛┗";
|
"┻┛┗┻┗┛┗┛ ┻┛┗┛┗┛┗";
|
||||||
var ready = "┓ ┳┓┏┏┓ ┏┓┏┓┳┓┏┓ ┳┓┏┓┏┓┳┓┓┏\n"
|
var ready = "┓ ┳┓┏┏┓ ┏┓┏┓┳┓┏┓ ┳┓┏┓┏┓┳┓┓┏\n"
|
||||||
"┃ ┃┃┃┣ ┃ ┃┃┃┃┣ ┣┫┣ ┣┫┃┃┗┫\n"
|
"┃ ┃┃┃┣ ┃ ┃┃┃┃┣ ┣┫┣ ┣┫┃┃┗┫\n"
|
||||||
"┗┛┻┗┛┗┛ ┗┛┗┛┻┛┗┛ ┛┗┗┛┛┗┻┛┗┛";
|
"┗┛┻┗┛┗┛ ┗┛┗┛┻┛┗┛ ┛┗┗┛┛┗┻┛┗┛";
|
||||||
var p; var c; var m;
|
|
||||||
var s = Server.default;
|
|
||||||
var clock = LinkClock(130 / 60).latency_(Server.default.latency).permanent_(true);
|
|
||||||
var localPath = this.class.filenameSymbol.asString.dirname +/+ "Configuration";
|
|
||||||
this.fancyPrint(banner, 40);
|
this.fancyPrint(banner, 40);
|
||||||
|
|
||||||
|
// Using Ableton Link Clock for automatic synchronisation with other peers
|
||||||
|
this.clock = LinkClock(130 / 60).latency_(Server.default.latency).permanent_(true);
|
||||||
|
c = this.clock;
|
||||||
|
|
||||||
|
// Defining the local path as default for configuration files if not configPath
|
||||||
|
this.localPath = this.class.filenameSymbol.asString.dirname +/+ "Configuration";
|
||||||
|
|
||||||
|
// Customizing server options: less conservative than SuperCollider defaults
|
||||||
s.options.numBuffers = 1024 * 128;
|
s.options.numBuffers = 1024 * 128;
|
||||||
s.options.memSize = 8192 * 64;
|
s.options.memSize = 8192 * 64;
|
||||||
s.options.numWireBufs = 2048;
|
s.options.numWireBufs = 2048;
|
||||||
@ -19,25 +32,24 @@ Boot {
|
|||||||
s.options.device = "BlackHole 16ch";
|
s.options.device = "BlackHole 16ch";
|
||||||
s.options.numOutputBusChannels = 16;
|
s.options.numOutputBusChannels = 16;
|
||||||
s.options.numInputBusChannels = 16;
|
s.options.numInputBusChannels = 16;
|
||||||
p = ProxySpace.push(Server.default.boot, clock: clock);
|
|
||||||
c = clock;
|
p = ProxySpace.push(Server.default.boot, clock: this.clock);
|
||||||
Bank.root = samplePath ? "/Users/bubo/.config/livecoding/samples";
|
this.samplePath = samplePath ? "/Users/bubo/.config/livecoding/samples";
|
||||||
|
|
||||||
|
// Setting up the audio samples/buffers manager
|
||||||
|
Bank.root = this.samplePath;
|
||||||
Bank.lazyLoading = true;
|
Bank.lazyLoading = true;
|
||||||
|
|
||||||
|
// Post actions: installing behavior after server boot
|
||||||
Server.default.waitForBoot({
|
Server.default.waitForBoot({
|
||||||
"-> Loading config from: %".format(localPath +/+ "Startup.scd").postln;
|
"-> Loading config from: %".format(configPath ? (this.localPath +/+ "Startup.scd")).postln;
|
||||||
(localPath+/+ "Startup.scd").load;
|
(configPath ? (this.localPath +/+ "Startup.scd")).load;
|
||||||
StageLimiter.activate;
|
StageLimiter.activate;
|
||||||
this.fancyPrint(ready, 40);
|
this.fancyPrint(ready, 40);
|
||||||
|
// this.installServerTreeBehavior();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Routine that prints the current state of the session every bar
|
|
||||||
*/
|
|
||||||
*monitorMessage {
|
|
||||||
CmdPeriod.add({})
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Convenience method for printing a message with a fancy separator.
|
* Convenience method for printing a message with a fancy separator.
|
||||||
*/
|
*/
|
||||||
@ -53,4 +65,14 @@ Boot {
|
|||||||
each.postln;
|
each.postln;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
*installServerTreeBehavior {
|
||||||
|
CmdPeriod.add({
|
||||||
|
"Dummy text".postln;
|
||||||
|
// var text = "Bubo SuperCollider Session\n Tempo: % =-= CPU: %".format(
|
||||||
|
// this.clock.tempo * 60, Server.default.avgCPU.round(2)
|
||||||
|
// );
|
||||||
|
}, Server.default);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user