Skip to content

Instantly share code, notes, and snippets.

@bwestergard
Last active October 11, 2018 23:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bwestergard/87b662cd416ac01c53713dd72276fc20 to your computer and use it in GitHub Desktop.
Save bwestergard/87b662cd416ac01c53713dd72276fc20 to your computer and use it in GitHub Desktop.
Welsh Tune
(
(
Pbind(
\instrument, \bloop,
\mtranspose, Pstep([1,1,4,4, 0,0,0,0, 1,1,4,4, 5,3,2,1], 1/2, inf) + (Pstep(Pseq([0,0,1,3], inf), 8, inf) % 7)
) <> Ppar([
/* Pbind(
\octave, 5,
\degree, Pstep(Pn(Pseries(0,-1,8) % 7), 1/8, inf),
\dur, Pseq([2,1,1,3],inf)/4,
\legato, 16,
),*/
Pbind(
\octave, 5,
\degree, Pseq([8,4,6,2] ! 2, inf),
\strum, Pseq([\rest,Pn(1/8)]),
\dur, Pseq([1/2,Pn(2)]),
\legato, 16,
\db, -28
),
Pbind(
\octave, 3,
\degree, Pstep([0,4,0,4,0,4,1,2], 1/2, inf),
\dur, Pstep([3,1,2,4], 1, inf) / 8,
\legato, 12,
\db, -15
)
])
).play
)
(
SynthDef(\bloop, { |amp, freq = 440, sustain = 1|
var sig = Splay.ar(
VarSaw.ar(freq * [0.99,1/2.001,1,1.01], width: LFNoise2.ar(2).exprange(0.5, XLine.ar(0.5,0.03,sustain/8))) * XLine.ar(1e-10,1, 0.01) * XLine.ar(1,1e-10, sustain, doneAction: 2),
XLine.ar(0.2,1,sustain/3)
);
Out.ar(0, RLPF.ar(sig, XLine.ar(freq*16, freq/2, sustain / 16), 0.8) * amp)
}).store
)
(
(
Pbind(
\instrument, \bloop,
\mtranspose, Pstep([1,1,4,4, 0,0,0,0, 1,1,4,4, 5,3,2,1], 1/2, inf) + (Pstep(Pseq([0,0,1,3], inf), 8, inf) % 7)
) <> Ppar([
Pbind(
\octave, 4,
\degree, Pstep([6,2,4,0,0,1,2,3], 1/8, inf),
\dur, 1 / 16
),
Pbind(
\octave, 4,
\degree, Pseq([8,4,6] ! 2, inf),
\dur, 1 / 8
),
Pbind(
\octave, 3,
\degree, Pstep([0,4,0,4,0,4,0,2], 1/4, inf),
\dur, 1 / 4
)
])
).play
)
(
SynthDef(\bloop, { |amp, freq = 440|
Out.ar(0, VarSaw.ar(freq, width: LFNoise2.ar([2,3]).range(0.5,1)).dup * XLine.ar(1e-10,1, 0.1) * XLine.ar(1,1e-10, 2, doneAction: 2) * amp)
}).store
)
(
Ppar([
Pmono(
\default,
\octave, 4,
\mtranspose, Pstep([1,1,4,4, 0,0,0,0, 1,1,4,4, 5,3,2,1], 1/2, inf),
\degree, Pstep([6,2,4,0,0,1,2,3], 1/8, inf),
\dur, 1 / 16
),
Pbind(
\synth, \default,
\octave, 3,
\mtranspose, Pstep([1,1,4,4, 0,0,0,0, 1,1,4,4, 5,3,2,1], 1/2, inf),
\degree, Pstep([0,4,0,4,0,4,0,2], 1/4, inf),
\dur, 1 / 4
)
]).play
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment