Helllo! Finally getting some patterning going, but not it seems like my settings aren't quite what I need without a crash, etc.
s = Server.default;
s.options.numAnalogInChannels = 2;
s.options.numAnalogOutChannels = 2;
s.options.numDigitalChannels = 0;
s.options.blockSize = 128;
s.options.numInputBusChannels = 0;
s.options.numOutputBusChannels = 2;
s.options.postln;
s.options.numBuffers = 32; // increase this if you need to load more samples
s.options.hardwareBufferSize = 128;
s.options.postln;
s.waitForBoot {
// Drum Kit*************************************
// *********************************************
// Bring in full folder of samples
~drum_kit = Array.new;
~folder = PathName.new("sounds/drum_kit/");
~folder.entries.do({
arg path;
~drum_kit = ~drum_kit.add(Buffer.read(s, path.fullPath));
});
// Define synths
SynthDef.new(\playdrums, {
arg amp = 0.7, out = 0, buf, da = 2, rate = 1, midinote = 1;
var sig;
midinote.postln;
buf = midinote - 36;
midinote.postln;
sig = PlayBuf.ar(1, buf, rate, doneAction:da);
sig = sig * amp * 0.2;
Out.ar(out, sig);
}).add;
// Patterning*******************************
// *****************************************
// Read in MIDI file
m = SimpleMIDIFile.read("midi/trio2.mid");
m.postln;
// Create array for Pseq from midi values
t = m.generatePatternSeqs;
TempoClock.default.tempo = 90/60;
// OSC listener*****************************
// *****************************************
OSCdef.new(
\bang,
{
arg msg, time, addr, port;
msg.postln;
msg[1].postln;
if(msg[1] == 'bang', {
Pdef(
Pbind( \instrument, \playdrums,
\buf, ~drum_kit,
[\midinote, \dur],
Pseq(t[2], 1)).play;
);
});
},
'/bang'
);
};
Building project...
Build finished
Running project...
init_OSCempty
compiling class library...
initPassOne started NumPrimitives = 591
initPassOne done compiling dir: '/usr/local/share/SuperCollider/SCClassLibrary'
compiling dir: '/usr/local/share/SuperCollider/Extensions' compiling dir: '/root/.local/share/SuperCollider/downloaded-quarks/wslib'
pass 1 done
ERROR: Class extension for nonexistent class 'Document'
In file:'/deprecated/3.7/deprecated-3.7.sc'
numentries = 1068622 / 13405378 = 0.08
4613 method selectors, 2906 classes
method table size 7620700 bytes, big table size 53621512
Number of Symbols 12441
Byte Code Size 381974
compiled 374 files in 3.20 seconds
Info: 3 methods are currently overwritten by extensions. To see which, execute:MethodOverride.printAll
compile doneClass tree inited in 0.27 seconds
Cleaning up temp synthdefs...
WARNING: Extension in '/usr/local/share/SuperCollider/SCClassLibrary/Platform/linux/extMIDIOut.sc' overwrites Meta_MIDIClient:externalSources in main class library.
WARNING: Extension in '/usr/local/share/SuperCollider/SCClassLibrary/Platform/linux/extMIDIOut.sc' overwrites Meta_MIDIClient:externalDestinations in main class library.
WARNING: Extension in '/usr/local/share/SuperCollider/SCClassLibrary/Platform/linux/extMIDIOut.sc' overwrites Meta_MIDIIn:connectAll in main class library.
Intentional overwrites must be put in a 'SystemOverwrites' subfolder.
*** Welcome to SuperCollider 3.8dev. ***
For help type ctrl-c ctrl-h (Emacs) or :SChelp (vim) or ctrl-U (sced/gedit).
a ServerOptions
a ServerOptions
booting 57110
Found 0 LADSPA plugins
SC_AudioDriver: sample rate = 44100.000000, driver's block size = 128
SC_BelaDriver: >>DriverStartSuperCollider 3 server ready.
Receiving notification messages from server localhost
Shared memory server interface initialized
an OutputProxy
an OutputProxy
a SimpleMIDIFile[ /bang, bang ]bang
late 0.001895122
late 0.001895122
late 0.205080873
late 0.191849623
late 0.059247956