Fixing more conditional logic

This commit is contained in:
2024-05-15 12:13:34 +02:00
parent 5bc1cd641f
commit 27cbb48c98
7 changed files with 60 additions and 34 deletions

View File

@ -105,10 +105,10 @@ Boot {
Event.addEventType(\buboEvent, {
arg server;
if (BuboUtils.stringIsNumber(~sp), {}, {
~sp = BuboUtils.cleanSampleName(~sp);
~nb = BuboUtils.cleanSampleIndex(~nb);
if (~sp.notNil && ~nb.notNil, {
if (~sp.notNil, {
if (BuboUtils.stringIsNumber(~sp), {}, {
~sp = BuboUtils.cleanSampleName(~sp);
~nb = BuboUtils.cleanSampleIndex(~nb);
if (~sp !== "", {
~buf = Bank(~sp)[~nb % Bank(~sp).paths.size];
if (Bank(~sp).metadata[~nb % Bank(~sp).size][\numChannels] == 1) {
@ -116,7 +116,7 @@ Boot {
} {
~instrument = \splayer;
};
})
});
});
});
~type = \note;