some more configuration stuff
This commit is contained in:
@ -10,17 +10,73 @@
|
|||||||
^Pindex(pat, this[1], repeats)
|
^Pindex(pat, this[1], repeats)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
findShortcuts {
|
||||||
|
arg pattern;
|
||||||
|
var short, correctedPattern;
|
||||||
|
correctedPattern = List.new();
|
||||||
|
short = Dictionary.newFrom([
|
||||||
|
// Instrument
|
||||||
|
\i, \instrument,
|
||||||
|
// Notes
|
||||||
|
\n, \note,
|
||||||
|
\mn, \midinote,
|
||||||
|
\deg, \degree,
|
||||||
|
\o, \octave,
|
||||||
|
\f, \freq,
|
||||||
|
\det, \detune,
|
||||||
|
// Durations
|
||||||
|
\d, \dur,
|
||||||
|
\st, \stretch,
|
||||||
|
\l, \legato,
|
||||||
|
// Amplitude
|
||||||
|
\a, \amp,
|
||||||
|
\p, \pan,
|
||||||
|
// Envelope
|
||||||
|
\a, \attack,
|
||||||
|
\d, \decay,
|
||||||
|
\s, \sustain,
|
||||||
|
\r, \release,
|
||||||
|
// Filter control
|
||||||
|
\r, \resonance,
|
||||||
|
\ff, \ffreq,
|
||||||
|
// Modulation
|
||||||
|
\m, \mod,
|
||||||
|
\c, \midichan,
|
||||||
|
\speed: \stretch,
|
||||||
|
]);
|
||||||
|
|
||||||
|
// shortcuts are turned into regular keys;
|
||||||
|
pattern.do({| element |
|
||||||
|
if (short.includesKey(element),
|
||||||
|
{correctedPattern.add(short[element])},
|
||||||
|
{correctedPattern.add(element)}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
^correctedPattern;
|
||||||
|
}
|
||||||
|
|
||||||
|
// pat {
|
||||||
|
// arg node_proxy, quant=4, fade=0.05;
|
||||||
|
// var newArray = this ++ [\type, \buboEvent];
|
||||||
|
// node_proxy.quant_(quant);
|
||||||
|
// node_proxy.fadeTime = fade;
|
||||||
|
// node_proxy[0] = Pbind(*(this.findShortcuts(newArray)));
|
||||||
|
// ^node_proxy;
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
pat {
|
pat {
|
||||||
arg node_proxy, quant=4, fade=0.05;
|
arg quant=4, fade=0.05;
|
||||||
var newArray = this ++ [\type, \buboEvent];
|
var proxyName = this[0];
|
||||||
node_proxy.quant_(quant);
|
var newArray = this[1..] ++ [\type, \buboEvent];
|
||||||
node_proxy.fadeTime = fade;
|
currentEnvironment.at(proxyName.asSymbol).quant_(quant);
|
||||||
node_proxy[0] = Pbind(*newArray);
|
currentEnvironment.at(proxyName.asSymbol).fadeTime = fade;
|
||||||
^node_proxy;
|
currentEnvironment.at(proxyName.asSymbol)[0] = Pbind(*(this.findShortcuts(newArray)));
|
||||||
|
^currentEnvironment.at(proxyName.asSymbol);
|
||||||
}
|
}
|
||||||
|
|
||||||
pbind {
|
p {
|
||||||
^Pbind(*this)
|
^Pbind(*(this.findShortcuts(this)))
|
||||||
}
|
}
|
||||||
|
|
||||||
euclid {
|
euclid {
|
||||||
|
|||||||
@ -78,9 +78,10 @@ Boot {
|
|||||||
}, Server.default);
|
}, Server.default);
|
||||||
Event.addEventType(\buboEvent, {
|
Event.addEventType(\buboEvent, {
|
||||||
arg server;
|
arg server;
|
||||||
if (~sp.notNil && ~n.notNil,
|
if (~sp.notNil && ~nb.notNil,
|
||||||
{ ~buf = Bank(~sp)[~n % Bank(~sp).buffers.size]; }
|
{ ~buf = Bank(~sp)[~nb % Bank(~sp).buffers.size]; }
|
||||||
);
|
);
|
||||||
|
if (~nb == nil) {~nb = 0};
|
||||||
~type = \note; // back to note
|
~type = \note; // back to note
|
||||||
currentEnvironment.play;
|
currentEnvironment.play;
|
||||||
});
|
});
|
||||||
|
|||||||
@ -2,8 +2,8 @@ d = (); // This is a storage area for synthesizers
|
|||||||
f = (); // This is a storage for various FX functions
|
f = (); // This is a storage for various FX functions
|
||||||
|
|
||||||
(
|
(
|
||||||
d.info = { arg obj, name; obj[name].allControlNames.do({arg i; i.postln;}); };
|
d.params = { arg obj, name; obj[name].allControlNames.do({arg i; i.postln;}); };
|
||||||
d.show = { arg obj; obj.keys.do({arg i; i.postln}); };
|
d.list = { arg obj; obj.keys.do({arg i; i.postln}); };
|
||||||
);
|
);
|
||||||
|
|
||||||
f.vardel = {
|
f.vardel = {
|
||||||
|
|||||||
Reference in New Issue
Block a user