fixing some of the current issues with pat

This commit is contained in:
2024-05-14 15:21:50 +02:00
parent 6f61558ffb
commit 74642bd1f4
6 changed files with 151 additions and 73 deletions

View File

@ -95,6 +95,10 @@ 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;
@ -111,18 +115,21 @@ Boot {
Event.addEventType(\buboEvent, {
arg server;
~sp = BuboUtils.cleanSampleName(~sp);
~nb = BuboUtils.cleanSampleIndex(~nb);
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 = \player;
} {
~instrument = \splayer;
};
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;
});
}
}