Commit 3ece89a9 authored by Kenneth Flak's avatar Kenneth Flak

building launchpad set for tlu workshop

parent 3f37c498
/home/kf/mySamples/celloLublin
\ No newline at end of file
......@@ -126,3 +126,5 @@
}
);
);
<?xml version="1.0" ?>
<xml>
<hive name="myprojectname">
<minibee caps="7" configuration="-1" id="1" libversion="7" name="" revision="D" serial="0013A2000013A200">
<!--the id given inside the minibee tag is the unique id or number of the minibee-->
<!--the configutaion inside the minibee tag is the unique id of the configuration that is used. It has to match one of the configuration id's that are defined in this file.-->
<!--This minibee has no configuration yet! Change it to use one of the configurations in this file.-->
</minibee>
<minibee caps="7" configuration="1" id="9" libversion="7" name="" revision="D" serial="0013A20040BB363F">
<!--the id given inside the minibee tag is the unique id or number of the minibee-->
<!--the configutaion inside the minibee tag is the unique id of the configuration that is used. It has to match one of the configuration id's that are defined in this file.-->
<custom/>
</minibee>
<minibee caps="7" configuration="1" id="10" libversion="7" name="" revision="D" serial="0013A20040C1849C">
<!--the id given inside the minibee tag is the unique id or number of the minibee-->
<!--the configutaion inside the minibee tag is the unique id of the configuration that is used. It has to match one of the configuration id's that are defined in this file.-->
<custom/>
</minibee>
<minibee caps="7" configuration="1" id="11" libversion="7" name="" revision="D" serial="0013A20040C181F9">
<!--the id given inside the minibee tag is the unique id or number of the minibee-->
<!--the configutaion inside the minibee tag is the unique id of the configuration that is used. It has to match one of the configuration id's that are defined in this file.-->
<custom/>
</minibee>
<minibee caps="7" configuration="1" id="12" libversion="7" name="" revision="D" serial="0013A20040C184BC">
<!--the id given inside the minibee tag is the unique id or number of the minibee-->
<!--the configutaion inside the minibee tag is the unique id of the configuration that is used. It has to match one of the configuration id's that are defined in this file.-->
<custom/>
</minibee>
<minibee caps="7" configuration="1" id="13" libversion="7" name="" revision="D" serial="0013A20040C184B5">
<!--the id given inside the minibee tag is the unique id or number of the minibee-->
<!--the configutaion inside the minibee tag is the unique id of the configuration that is used. It has to match one of the configuration id's that are defined in this file.-->
<custom/>
</minibee>
<minibee caps="7" configuration="1" id="14" libversion="7" name="" revision="D" serial="0013A20040C184B9">
<!--the id given inside the minibee tag is the unique id or number of the minibee-->
<!--the configutaion inside the minibee tag is the unique id of the configuration that is used. It has to match one of the configuration id's that are defined in this file.-->
</minibee>
<minibee caps="7" configuration="1" id="15" libversion="7" name="" revision="D" serial="0013A20040C18169">
<!--the id given inside the minibee tag is the unique id or number of the minibee-->
<!--the configutaion inside the minibee tag is the unique id of the configuration that is used. It has to match one of the configuration id's that are defined in this file.-->
<custom/>
</minibee>
<minibee caps="7" configuration="1" id="16" libversion="6" name="" revision="D" serial="0013A20040C1820E">
<!--the id given inside the minibee tag is the unique id or number of the minibee-->
<!--the configutaion inside the minibee tag is the unique id of the configuration that is used. It has to match one of the configuration id's that are defined in this file.-->
</minibee>
<minibee caps="7" configuration="1" id="17" libversion="6" name="" revision="D" serial="0013A20040A16B05">
<!--the id given inside the minibee tag is the unique id or number of the minibee-->
<!--the configutaion inside the minibee tag is the unique id of the configuration that is used. It has to match one of the configuration id's that are defined in this file.-->
</minibee>
<minibee caps="7" configuration="1" id="18" libversion="7" name="" revision="D" serial="0013A20040BE052F">
<!--the id given inside the minibee tag is the unique id or number of the minibee-->
<!--the configutaion inside the minibee tag is the unique id of the configuration that is used. It has to match one of the configuration id's that are defined in this file.-->
</minibee>
<minibee caps="7" configuration="1" id="19" libversion="7" name="" revision="D" serial="0013A20040BE051F">
<!--the id given inside the minibee tag is the unique id or number of the minibee-->
<!--the configutaion inside the minibee tag is the unique id of the configuration that is used. It has to match one of the configuration id's that are defined in this file.-->
</minibee>
<configuration id="1" message_interval="50" name="accelero" redundancy="3" samples_per_message="1">
<pin config="TWIClock" id="A5" name="None"/>
<pin config="TWIData" id="A4" name="None"/>
<twi device="ADXL345" id="1" name="accelero"/>
</configuration>
<configuration id="2" message_interval="50" name="expee" redundancy="3" samples_per_message="1">
<pin config="AnalogOut" id="D10" name="led1"/>
<pin config="AnalogOut" id="D11" name="led2"/>
<pin config="AnalogIn10bit" id="A1" name="analog1"/>
<pin config="AnalogIn10bit" id="A0" name="analog0"/>
<pin config="AnalogIn10bit" id="A3" name="analog3"/>
<pin config="AnalogIn10bit" id="A2" name="analog2"/>
<pin config="TWIClock" id="A5" name="None"/>
<pin config="TWIData" id="A4" name="None"/>
<pin config="AnalogOut" id="D9" name="led0"/>
<pin config="AnalogOut" id="D6" name="led5"/>
<pin config="AnalogOut" id="D5" name="led4"/>
<pin config="AnalogOut" id="D3" name="led3"/>
<twi device="ADXL345" id="1" name="accelero"/>
</configuration>
<configuration id="3" message_interval="50" name="expree" redundancy="3" samples_per_message="1">
<pin config="DigitalIn" id="D10" name="digitaal6"/>
<pin config="AnalogIn10bit" id="A7" name="analog5"/>
<pin config="AnalogIn10bit" id="A6" name="analog4"/>
<pin config="AnalogIn10bit" id="A1" name="analog1"/>
<pin config="AnalogIn10bit" id="A0" name="analog0"/>
<pin config="AnalogIn10bit" id="A3" name="analog3"/>
<pin config="AnalogIn10bit" id="A2" name="analog2"/>
<pin config="TWIClock" id="A5" name="None"/>
<pin config="TWIData" id="A4" name="None"/>
<pin config="DigitalIn" id="D8" name="digitaal4"/>
<pin config="DigitalIn" id="D9" name="digitaal5"/>
<pin config="DigitalIn" id="D6" name="digitaal2"/>
<pin config="DigitalIn" id="D7" name="digitaal3"/>
<pin config="DigitalIn" id="D5" name="digitaal1"/>
<pin config="DigitalIn" id="D3" name="digitaal0"/>
<pin config="DigitalIn" id="D11" name="digitaal7"/>
<twi device="ADXL345" id="1" name="accelero"/>
</configuration>
</hive>
</xml>
(
var out, outBus;
var mbTrig, bufs;
var rev, revBus;
outBus = Bus.audio(s, ~numSpeakers);
out = Synth(\route, [
\in, outBus,
\out, ~masterBus,
\attack, 10,
\release, 60,
]);
revBus = Bus.audio(s, ~numSpeakers);
rev = Synth(\jpverb, [
\in, revBus,
\out, outBus,
\revtime, 3, \mix, 0.3
]);
mbTrig = ~mb.collect{|id, idx|
MBDeltaTrig.new(
speedlim: 1,
threshold: 0.6,
minibeeID: id,
minAmp: -3,
maxAmp: 0,
function: {|dt, minAmp, maxAmp|
Pbind(
\instrument, \grbufphasor,
\buf, Prand(~buf[\shh]),
\dur, dt.linlin(0.0, 1.0, 0.5, 2),
\attack, Pkey(\dur) * 0.2,
\release, Pkey(\dur),
\rate, Prand([0.25, 1], inf),
\rateDev, Pwhite(0.0, 0.5),
\posDev, Pwhite(0.0, 0.3),
\playbackRate, Pwhite(0.1, 2),
\grainsize, Pwhite(0.01, 0.5),
\grainfreq, Pwhite(2, 40),
\db, dt.linlin(0.0, 1.0, minAmp, maxAmp),
\pan, Pwhite(-1.0, 1.0, 1),
\panDev, Pwhite(0.0, 1.0),
\out, revBus,
).play;
}
);
};
~play[\mbShh] = {|i|
case
{i.isInteger}{
mbTrig[~mb.indexOf(i)].play;
}
{i.isCollection}{
i.do{|item|
mbTrig[~mb.indexOf(item)].play;
}
};
};
~stop[\mbShh] = {|i|
case
{i.isInteger}{
mbTrig[~mb.indexOf(i)].stop;
}
{i.isCollection}{
i.do{|item|
mbTrig[~mb.indexOf(item)].stop;
}
};
};
~free[\mbShh] = {
fork{
out.set(\gate, 0);
60.wait;
mbTrig.do(_.free);
bufs.do(_.free);
rev.set(\gate, 0);
[revBus, outBus].do(_.free);
}
};
"mbShh done".postln;
)
(
~mbSineFB = {|fadeInTime=10, level=0.2, fadeOutTime=10, mb, threshold=0.05|
var mbTrig;
var rev, revBus, revTime=3;
var flanger, flangerBus;
var eq, eqBus;
var out, outBus;
var group, instr, fx;
s.makeBundle(nil, {
group = Group.new();
fx = Group.tail(group);
instr = Group.head(group);
outBus = Bus.audio(s, ~numSpeakers);
out = Synth(\route, [
\in, outBus,
\out, ~masterBus,
\attack, fadeInTime,
\release, fadeOutTime,
], fx);
revBus = Bus.audio(s, ~numSpeakers);
rev = Synth(\jpverb, [
\revtime, revTime,
\mix, 0.4,
\in, revBus,
\out, outBus,
], fx);
eqBus = Bus.audio(s, ~numSpeakers);
eq = Synth(\eq, [
\in, eqBus,
\out, revBus,
\hishelfdb, -9,
\hishelffreq, 600,
], fx);
flangerBus = Bus.audio(s, ~numSpeakers);
flanger = Synth(\flanger, [
\in, flangerBus,
\feedback, 0.08,
\depth, 0.04,
\rate, 0.03,
\decay, 0.01,
\out, eqBus,
\mix, 0.3,
], fx);
if (mb.isInteger){ mb = Array.newClear(1).fill(mb) };
mbTrig = mb.collect{|id, idx|
MBDeltaTrig.new(
speedlim: 0.5,
threshold: 0.05,
minibeeID: id,
minAmp: -40,
maxAmp: -12,
function: {|dt, minAmp, maxAmp|
Pbind(
\instrument, \pm,
\dur, Prand((0.1..0.4), inf),
\scale, Scale.minorPentatonic,
\degree, (0..8).choose,
\octave, Prand((2..5), inf) + 3.rand,
\modfreq, Pfunc{|ev| ev.use { ~freq.() + (~freq.()/128).rand }},
\modfreqDev, Pwhite(10, 400),
\legato, 1.2,
\attack, Pkey(\dur) * Pkey(\legato),
\release, Pkey(\dur),
\pmindex, Pwhite(1.0, 4.0),
\ampScale, dt.linlin(0.0, 1.0, minAmp, maxAmp),
\db, Pseg([-70, 0, -70], [3*dt, 3*dt])
+ Pkey(\ampScale),
\pan, Pwhite(-1.0, 1.0),
\out, flangerBus,
\group, instr,
).play;
};
).play;
};
});
~play[\mbSineFB] = {|i|
case
{i.isInteger}{
mbTrig[~mb.indexOf(i)].play;
}
{i.isCollection}{
i.do{|item|
mbTrig[~mb.indexOf(item)].play;
}
};
};
~stop[\mbSineFB] = {|i|
case
{i.isInteger}{
mbTrig[~mb.indexOf(i)].stop;
}
{i.isCollection}{
i.do{|item|
mbTrig[~mb.indexOf(item)].stop;
}
};
};
~free[\mbSineFB] = {
fork{
out.set(\gate, 0);
fadeOutTime.wait;
mbTrig.do(_.free);
group.free;
[outBus, rev, revBus].do(_.free);
};
};
}
)
(
var group = Group.new;
var instr = Group.head(group);
var fx = Group.after(instr);
var pat;
var reverb, revBus, revMix=0.4;
var eq, eqBus;
var out, outBus;
var fadeInTime = 90;
var fadeOutTime = 30;
outBus = Bus.audio(s, ~numSpeakers);
out = Synth(\route, [
\in, outBus,
\out, ~masterBus,
\attack, fadeInTime,
\release, fadeOutTime,
\amp, -6.dbamp,
], fx);
revBus = Bus.audio(s, ~numSpeakers);
reverb = Synth(\jpverb, [
\in, revBus,
\out, outBus,
\revtime, 1,
\mix, revMix
], fx);
eqBus = Bus.audio(s, ~numSpeakers);
eq = Synth(\eq, [\in, eqBus, \out, revBus, \locut, 400], fx);
pat = Pbind(
\instrument, \playbuf,
\buf, Prand(~buf[\bubbles], inf),
\attack, 0,
\rate, 2,
\dur, 1/8,
\release, 0.1,
\legato, 0.1,
\pan, Pwhite(-1.0, 1.0),
\db, Pwhite(-24, -18),
\out, eqBus,
\group, instr,
).play;
~free[\patBubbles] = {
fork {
out.set(\gate, 0);
fadeOutTime.wait;
pat.stop;
outBus.free;
revBus.free;
eqBus.free;
group.free;
}
};
)
// ~play[\patBubbles].(~mb);
// ~stop[\patBubbles].(~mb);
// ~free[\patBubbles].();
This diff is collapsed.
(
~arvopbindFx = FxChain.new(
fadeInTime:10,
level:0.2,
fadeOutTime:10,
fadeInTime: 10,
level: 0.2,
fadeOutTime: 10,
out: ~masterBus,
);
......
(
~bd = {|fadeInTime=10, level=1, fadeOutTime=10, mb, threshold=0.3|
var mbTrig, bufs;
var eq, eqBus;
var out, outBus;
var group, instr, fx;
var rev, revBus;
group = Group.new();
fx = Group.tail(group);
instr = Group.head(group);
outBus = Bus.audio(s, ~numSpeakers);
out = Synth(\route, [
\in, outBus,
\out, ~masterBus,
\attack, fadeInTime,
\release, fadeOutTime,
\amp, level,
], fx);
revBus = Bus.audio(s, ~numSpeakers);
rev = Synth(\jpverb, [
\in, revBus,
\out, outBus,
\mix, 0.7,
\revtime, 3,
], fx);
eqBus = Bus.audio(s, ~numSpeakers);
eq = Synth(\eq, [
\in, eqBus,
\locut, 60,
\hicut, 200,
\out, revBus,
], fx);
mbTrig = mb.collect{|id, idx|
MBDeltaTrig.new(
speedlim: 0.5,
threshold: threshold,
minibeeID: id,
minAmp: -30,
maxAmp: -12,
function: {|dt, minAmp, maxAmp|
Pbind(
\instrument, \playbuf,
\buf, Prand(~buf[\bd]),
\dur, 1,
\release, Pkey(\dur) * 2,
\loop, 0,
\legato, 0.1,
\db, dt.linlin(0.0, 1.0, minAmp, maxAmp),
\pan, Pwhite(-1.0, 1.0),
\group, instr,
\out, eqBus,
).play;
}
).play;
};
~play[\bd] = {|i|
case
{i.isInteger}{
mbTrig[~mb.indexOf(i)].play;
}
{i.isCollection}{
i.do{|item|
mbTrig[~mb.indexOf(item)].play;
}
};
};
~stop[\bd] = {|i|
case
{i.isInteger}{
mbTrig[~mb.indexOf(i)].stop;
~bdFx = FxChain.new(
fadeInTime: 10,
level: 0.dbamp,
fadeOutTime: 10,
out: ~masterBus,
);
~bdFx.add(\eq, [
\locut, 60,
\hicut, 200,
]);
~bdFx.add(\jpverb, [
\mix, 0.5,
\revtime, 3,
]);
~bd = ~mb.collect{|id, idx|
MBDeltaTrig.new(
speedlim: 0.5,
threshold: 0.07,
minibeeID: id,
minAmp: -30,
maxAmp: -6,
function: {|dt, minAmp, maxAmp|
Pbind(
\instrument, \playbuf,
\buf, Prand(~buf[\bd]),
\dur, 1,
\release, Pkey(\dur) * 2,
\loop, 0,
\legato, 0.1,
\db, dt.linlin(0.0, 1.0, minAmp, maxAmp),
\pan, Pwhite(-1.0, 1.0),
\out, ~bdFx.in,
\group, ~bdFx.group,
).play;
}
{i.isCollection}{
i.do{|item|
mbTrig[~mb.indexOf(item)].stop;
}
};
};
~free[\bd] = {
fork{
out.set(\gate, 0);
fadeOutTime.wait;
mbTrig.do(_.free);
}
};
};
);
};
)
// (
// ~bdFx.play;
// ~bd.do(_.play);
// )
// (
// ~bdFx.free;
// ~bd.do(_.free);
// )
// s.plotTree;
// ~bd[0].dump;
(
fork{
// var bdbufs = [];
// var snbufs = [];
// var hhbufs = [];
var mbTrig;
var bufs = Array.newClear(17);
var group = Group.new();
var instr = Group.head(group);
var fx = Group.after(instr);
var rev, revBus;
var revFade, revFadeBus;
var distortion, distbus, distroute;
var out, outBus;
var bufs = Array.newClear(17);
outBus = Bus.audio(s, ~numSpeakers);
out = Synth(\route, [
\in, outBus,
\out, ~masterBus,
\attack, 40,
\release, 10,
\amp, -12.dbamp,
], fx);
~dirtdeltaFx = FxChain.new(
out: ~masterBus,
fadeInTime: 40,
fadeOutTime: 10,
level: -18.dbamp,
);
distbus = Bus.audio(s, ~numSpeakers);
distortion = Synth(\dist, [
\in, distbus,
\out, outBus,
\gain, 40,
\amp, -12.dbamp
], fx);
~dirtdeltaFx.add(\dist, [
\gain, 40,
\amp, -12.dbamp
]);
revFadeBus = Bus.control(s, 1);
revFade = Synth(\kline, [
\out, revFadeBus,
\start, 1.0,