No more segfaults ?
This commit is contained in:
@ -95,19 +95,17 @@ Boot {
|
||||
|
||||
Event.addEventType(\buboLoopEvent, {
|
||||
arg server;
|
||||
[~sp, ~nb].postln;
|
||||
~sp = BuboUtils.cleanSampleName(~sp);
|
||||
~nb = BuboUtils.cleanSampleIndex(~nb);
|
||||
[~sp, ~nb].postln;
|
||||
if (~sp.notNil && ~nb.notNil, {
|
||||
~sp = ~sp ?? 'default';
|
||||
~nb = ~nb ?? 0;
|
||||
~buf = Bank(~sp)[~nb % Bank(~sp).paths.size];
|
||||
if (Bank(~sp).metadata[~nb % Bank(~sp).size][\numChannels] == 1) {
|
||||
~instrument = \looperMono;
|
||||
} {
|
||||
~instrument = \looperStereo;
|
||||
};
|
||||
if (~sp != "", {
|
||||
~buf = Bank(~sp)[~nb % Bank(~sp).paths.size];
|
||||
if (Bank(~sp).metadata[~nb % Bank(~sp).size][\numChannels] == 1) {
|
||||
~instrument = \looperMono;
|
||||
} {
|
||||
~instrument = \looperStereo;
|
||||
};
|
||||
})
|
||||
});
|
||||
~type = \note;
|
||||
currentEnvironment.play;
|
||||
@ -115,17 +113,20 @@ Boot {
|
||||
|
||||
Event.addEventType(\buboEvent, {
|
||||
arg server;
|
||||
~sp = BuboUtils.cleanSampleName(~sp);
|
||||
~nb = BuboUtils.cleanSampleIndex(~nb);
|
||||
if (~sp.notNil && ~nb.notNil, {
|
||||
if (~sp != "", {
|
||||
~buf = Bank(~sp)[~nb % Bank(~sp).paths.size];
|
||||
if (Bank(~sp).metadata[~nb % Bank(~sp).size][\numChannels] == 1) {
|
||||
~instrument = \player;
|
||||
} {
|
||||
~instrument = \splayer;
|
||||
};
|
||||
})
|
||||
[~sp, ~nb, ~instrument].postln;
|
||||
if (BuboUtils.stringIsNumber(~sp), {}, {
|
||||
~sp = BuboUtils.cleanSampleName(~sp);
|
||||
~nb = BuboUtils.cleanSampleIndex(~nb);
|
||||
if (~sp.notNil && ~nb.notNil, {
|
||||
if (~sp !== "", {
|
||||
~buf = Bank(~sp)[~nb % Bank(~sp).paths.size];
|
||||
if (Bank(~sp).metadata[~nb % Bank(~sp).size][\numChannels] == 1) {
|
||||
~instrument = \player;
|
||||
} {
|
||||
~instrument = \splayer;
|
||||
};
|
||||
})
|
||||
});
|
||||
});
|
||||
~type = \note;
|
||||
currentEnvironment.play;
|
||||
|
||||
Reference in New Issue
Block a user