mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-26 21:18:49 +00:00
refactor: voicings -> voicing in tunes
This commit is contained in:
parent
a639d9f49f
commit
70fe8f14e3
@ -68,32 +68,35 @@ stack(
|
|||||||
`;
|
`;
|
||||||
|
|
||||||
export const giantSteps = `// John Coltrane - Giant Steps
|
export const giantSteps = `// John Coltrane - Giant Steps
|
||||||
setVoicingRange('lefthand', ['E3', 'G4']);
|
|
||||||
|
let melody = note(
|
||||||
|
"[F#5 D5] [B4 G4] Bb4 [B4 A4]",
|
||||||
|
"[D5 Bb4] [G4 Eb4] F#4 [G4 F4]",
|
||||||
|
"Bb4 [B4 A4] D5 [D#5 C#5]",
|
||||||
|
"F#5 [G5 F5] Bb5 [F#5 F#5]",
|
||||||
|
)
|
||||||
|
|
||||||
stack(
|
stack(
|
||||||
// melody
|
// melody
|
||||||
seq(
|
melody.color('#F8E71C'),
|
||||||
"[F#5 D5] [B4 G4] Bb4 [B4 A4]",
|
|
||||||
"[D5 Bb4] [G4 Eb4] F#4 [G4 F4]",
|
|
||||||
"Bb4 [B4 A4] D5 [D#5 C#5]",
|
|
||||||
"F#5 [G5 F5] Bb5 [F#5 F#5]",
|
|
||||||
).color('#F8E71C'),
|
|
||||||
// chords
|
// chords
|
||||||
seq(
|
chord(
|
||||||
"[B^7 D7] [G^7 Bb7] Eb^7 [Am7 D7]",
|
"[B^7 D7] [G^7 Bb7] Eb^7 [Am7 D7]",
|
||||||
"[G^7 Bb7] [Eb^7 F#7] B^7 [Fm7 Bb7]",
|
"[G^7 Bb7] [Eb^7 F#7] B^7 [Fm7 Bb7]",
|
||||||
"Eb^7 [Am7 D7] G^7 [C#m7 F#7]",
|
"Eb^7 [Am7 D7] G^7 [C#m7 F#7]",
|
||||||
"B^7 [Fm7 Bb7] Eb^7 [C#m7 F#7]"
|
"B^7 [Fm7 Bb7] Eb^7 [C#m7 F#7]"
|
||||||
).voicings('lefthand').color('#7ED321'),
|
).dict('lefthand')
|
||||||
|
.anchor(melody).mode('under')
|
||||||
|
.voicing().color('#7ED321'),
|
||||||
// bass
|
// bass
|
||||||
seq(
|
note(
|
||||||
"[B2 D2] [G2 Bb2] [Eb2 Bb3] [A2 D2]",
|
"[B2 D2] [G2 Bb2] [Eb2 Bb3] [A2 D2]",
|
||||||
"[G2 Bb2] [Eb2 F#2] [B2 F#2] [F2 Bb2]",
|
"[G2 Bb2] [Eb2 F#2] [B2 F#2] [F2 Bb2]",
|
||||||
"[Eb2 Bb2] [A2 D2] [G2 D2] [C#2 F#2]",
|
"[Eb2 Bb2] [A2 D2] [G2 D2] [C#2 F#2]",
|
||||||
"[B2 F#2] [F2 Bb2] [Eb2 Bb3] [C#2 F#2]"
|
"[B2 F#2] [F2 Bb2] [Eb2 Bb3] [C#2 F#2]"
|
||||||
).color('#00B8D4')
|
).color('#00B8D4')
|
||||||
).slow(20).note()
|
).slow(20)
|
||||||
//.pianoroll({fold:1})`;
|
.pianoroll({fold:1})`;
|
||||||
|
|
||||||
export const zeldasRescue = `// Koji Kondo - Princess Zelda's Rescue
|
export const zeldasRescue = `// Koji Kondo - Princess Zelda's Rescue
|
||||||
stack(
|
stack(
|
||||||
@ -134,28 +137,31 @@ const drums = stack(
|
|||||||
s("[~ hh]*2").delay(.3).delayfeedback(.5).delaytime(.125).gain(.4)
|
s("[~ hh]*2").delay(.3).delayfeedback(.5).delaytime(.125).gain(.4)
|
||||||
);
|
);
|
||||||
|
|
||||||
const thru = (x) => x.transpose("<0 1>/8").transpose(-1);
|
|
||||||
const synths = stack(
|
const synths = stack(
|
||||||
|
|
||||||
"<eb4 d4 c4 b3>/2"
|
"<eb4 d4 c4 b3>/2"
|
||||||
.scale(timeCat([3,'C minor'],[1,'C melodic minor'])
|
.scale("<C:minor!3 C:melodic:minor>/2")
|
||||||
.slow(8)).struct("[~ x]*2")
|
.struct("[~ x]*2")
|
||||||
.layer(
|
.layer(
|
||||||
x=>x.scaleTranspose(0).early(0),
|
x=>x.scaleTranspose(0).early(0),
|
||||||
x=>x.scaleTranspose(2).early(1/8),
|
x=>x.scaleTranspose(2).early(1/8),
|
||||||
x=>x.scaleTranspose(7).early(1/4),
|
x=>x.scaleTranspose(7).early(1/4),
|
||||||
x=>x.scaleTranspose(8).early(3/8)
|
x=>x.scaleTranspose(8).early(3/8)
|
||||||
).apply(thru).note().apply(keys).mask("<~ x>/16")
|
).note().apply(keys).mask("<~ x>/16")
|
||||||
.color('darkseagreen'),
|
.color('darkseagreen'),
|
||||||
note("<C2 Bb1 Ab1 [G1 [G2 G1]]>/2".apply(thru))
|
|
||||||
|
note("<C2 Bb1 Ab1 [G1 [G2 G1]]>/2")
|
||||||
.struct("[x [~ x] <[~ [~ x]]!3 [x x]>@2]/2".fast(2))
|
.struct("[x [~ x] <[~ [~ x]]!3 [x x]>@2]/2".fast(2))
|
||||||
.s('sawtooth').attack(0.001).decay(0.2).sustain(1).cutoff(500)
|
.s('sawtooth').attack(0.001).decay(0.2).sustain(1).cutoff(500)
|
||||||
.color('brown'),
|
.color('brown'),
|
||||||
"<Cm7 Bb7 Fm7 G7b13>/2".struct("~ [x@0.2 ~]".fast(2))
|
chord("<Cm7 Bb7 Fm7 G7b13>/2")
|
||||||
.voicings('lefthand')
|
.struct("~ [x@0.2 ~]".fast(2))
|
||||||
.apply(thru).every(2, early(1/8)).note().apply(keys).sustain(0)
|
.dict('lefthand').voicing()
|
||||||
|
.every(2, early(1/8))
|
||||||
|
.apply(keys).sustain(0)
|
||||||
.delay(.4).delaytime(.12)
|
.delay(.4).delaytime(.12)
|
||||||
.mask("<x@7 ~>/8".early(1/4))
|
.mask("<x@7 ~>/8".early(1/4))
|
||||||
)
|
).add(note("<-1 0>/8"))
|
||||||
stack(
|
stack(
|
||||||
drums.fast(2).color('tomato'),
|
drums.fast(2).color('tomato'),
|
||||||
synths
|
synths
|
||||||
@ -263,15 +269,20 @@ export const festivalOfFingers = `// "Festival of fingers"
|
|||||||
|
|
||||||
const chords = "<Cm7 Fm7 G7 F#7>";
|
const chords = "<Cm7 Fm7 G7 F#7>";
|
||||||
stack(
|
stack(
|
||||||
chords.voicings('lefthand').struct("x(3,8,-1)").velocity(.5).off(1/7,x=>x.transpose(12).velocity(.2)),
|
chord(chords).dict('lefthand').voicing().struct("x(3,8,-1)")
|
||||||
chords.rootNotes(2).struct("x(4,8,-2)"),
|
.velocity(.5).off(1/7,x=>x.add(note(12)).velocity(.2)),
|
||||||
|
|
||||||
|
chords.rootNotes(2).struct("x(4,8,-2)").note(),
|
||||||
|
|
||||||
chords.rootNotes(4)
|
chords.rootNotes(4)
|
||||||
.scale(cat('C minor','F dorian','G dorian','F# mixolydian'))
|
.scale(cat('C minor','F dorian','G dorian','F# mixolydian'))
|
||||||
.struct("x(3,8,-2)".fast(2))
|
.struct("x(3,8,-2)".fast(2))
|
||||||
.scaleTranspose("0 4 0 6".early(".125 .5")).layer(scaleTranspose("0,<2 [4,6] [5,7]>/4"))
|
.scaleTranspose("0 4 0 6".early(".125 .5")).layer(scaleTranspose("0,<2 [4,6] [5,7]>/4"))
|
||||||
|
.note()
|
||||||
|
|
||||||
).slow(2)
|
).slow(2)
|
||||||
.velocity(sine.struct("x*8").add(3/5).mul(2/5).fast(8))
|
.velocity(sine.struct("x*8").add(3/5).mul(2/5).fast(8))
|
||||||
.note().piano()`;
|
.piano()`;
|
||||||
|
|
||||||
// iter, echo, echoWith
|
// iter, echo, echoWith
|
||||||
export const undergroundPlumber = `// "Underground plumber"
|
export const undergroundPlumber = `// "Underground plumber"
|
||||||
@ -527,10 +538,10 @@ stack(
|
|||||||
.gain(.4) // turn down
|
.gain(.4) // turn down
|
||||||
.cutoff(sine.slow(7).range(300,5000)) // automate cutoff
|
.cutoff(sine.slow(7).range(300,5000)) // automate cutoff
|
||||||
//.hush()
|
//.hush()
|
||||||
,"<Am7!3 <Em7 E7b13 Em7 Ebm7b5>>".voicings('lefthand') // chords
|
,chord("<Am7!3 <Em7 E7b13 Em7 Ebm7b5>>")
|
||||||
.superimpose(x=>x.add(.04)) // add second, slightly detuned voice
|
.dict('lefthand').voicing() // chords
|
||||||
.add(perlin.range(0,.5)) // random pitch variation
|
.add(note("0,.04")) // add second, slightly detuned voice
|
||||||
.note() // wrap in "note"
|
.add(note(perlin.range(0,.5))) // random pitch variation
|
||||||
.s('sawtooth') // waveform
|
.s('sawtooth') // waveform
|
||||||
.gain(.16) // turn down
|
.gain(.16) // turn down
|
||||||
.cutoff(500) // fixed cutoff
|
.cutoff(500) // fixed cutoff
|
||||||
@ -559,14 +570,15 @@ samples({
|
|||||||
perc: ['perc/002_perc2.wav'],
|
perc: ['perc/002_perc2.wav'],
|
||||||
}, 'github:tidalcycles/Dirt-Samples/master/');
|
}, 'github:tidalcycles/Dirt-Samples/master/');
|
||||||
|
|
||||||
"C^7 Am7 Dm7 G7".slow(2).voicings('lefthand')
|
chord("<C^7 Am7 Dm7 G7>*2").dict('lefthand').anchor("G4").voicing()
|
||||||
.stack("0@6 [<1 2> <2 0> 1]@2".scale('C5 major'))
|
.stack(n("0@6 [<1 2> <2 0> 1]@2").scale('C5 major'))
|
||||||
.note().slow(4)
|
.slow(4)
|
||||||
.s("gm_epiano1:1")
|
.s("gm_epiano1:1")
|
||||||
.color('steelblue')
|
.color('steelblue')
|
||||||
.stack(
|
.stack(
|
||||||
"<-7 ~@2 [~@2 -7] -9 ~@2 [~@2 -9] -10!2 ~ [~@2 -10] -5 ~ [-3 -2 -10]@2>*2".scale('C3 major')
|
n("<-7 ~@2 [~@2 -7] -9 ~@2 [~@2 -9] -10!2 ~ [~@2 -10] -5 ~ [-3 -2 -10]@2>*2")
|
||||||
.note().s('sawtooth').color('brown')
|
.scale('C3 major')
|
||||||
|
.s('sawtooth').color('brown')
|
||||||
)
|
)
|
||||||
.attack(0.05).decay(.1).sustain(.7)
|
.attack(0.05).decay(.1).sustain(.7)
|
||||||
.cutoff(perlin.range(800,2000))
|
.cutoff(perlin.range(800,2000))
|
||||||
@ -664,8 +676,10 @@ stack(
|
|||||||
s("mt lt ht").struct("x(3,8)").fast(2).gain(.5).room(.5).sometimes(x=>x.speed(".5")),
|
s("mt lt ht").struct("x(3,8)").fast(2).gain(.5).room(.5).sometimes(x=>x.speed(".5")),
|
||||||
s("misc:2").speed(1).delay(.5).delaytime(1/3).gain(.4),
|
s("misc:2").speed(1).delay(.5).delaytime(1/3).gain(.4),
|
||||||
// chords
|
// chords
|
||||||
note("[~ Gm7] ~ [~ Dm7] ~".voicings('lefthand').superimpose(x=>x.add(.1)))
|
chord("[~ Gm7] ~ [~ Dm7] ~")
|
||||||
.s('sawtooth').gain(.5)
|
.dict('lefthand').voicing()
|
||||||
|
.add(note("0,.1"))
|
||||||
|
.s('sawtooth').gain(.8)
|
||||||
.cutoff(perlin.range(400,3000).slow(8))
|
.cutoff(perlin.range(400,3000).slow(8))
|
||||||
.decay(perlin.range(0.05,.2)).sustain(0)
|
.decay(perlin.range(0.05,.2)).sustain(0)
|
||||||
.delay(.9).room(1),
|
.delay(.9).room(1),
|
||||||
@ -695,7 +709,11 @@ setVoicingRange('lefthand', ['c3','a4'])
|
|||||||
stack(
|
stack(
|
||||||
s('bass').loopAt(8).clip(1),
|
s('bass').loopAt(8).clip(1),
|
||||||
s("bd*2, ~ sd,hh*4"),
|
s("bd*2, ~ sd,hh*4"),
|
||||||
note("Abm7".voicings('lefthand').struct("x(3,8,1)".slow(2))),
|
chord("Abm7")
|
||||||
|
.mode("below:G4")
|
||||||
|
.dict('lefthand')
|
||||||
|
.voicing()
|
||||||
|
.struct("x(3,8,1)".slow(2)),
|
||||||
"0 1 2 3".scale('ab4 minor pentatonic')
|
"0 1 2 3".scale('ab4 minor pentatonic')
|
||||||
.superimpose(x=>x.add(.1))
|
.superimpose(x=>x.add(.1))
|
||||||
.sometimes(x=>x.add(12))
|
.sometimes(x=>x.add(12))
|
||||||
@ -859,7 +877,7 @@ export const loungeSponge = `// "Lounge sponge"
|
|||||||
await loadOrc('github:kunstmusik/csound-live-code/master/livecode.orc')
|
await loadOrc('github:kunstmusik/csound-live-code/master/livecode.orc')
|
||||||
|
|
||||||
stack(
|
stack(
|
||||||
note("<C^7 A7 Dm7 Fm7>/2".voicings('lefthand'))
|
chord("<C^7 A7 Dm7 Fm7>/2").dict('lefthand').voicing()
|
||||||
.cutoff(sine.range(500,2000).round().slow(16))
|
.cutoff(sine.range(500,2000).round().slow(16))
|
||||||
.euclidLegato(3,8).csound('FM1')
|
.euclidLegato(3,8).csound('FM1')
|
||||||
,
|
,
|
||||||
@ -878,9 +896,11 @@ export const arpoon = `// "Arpoon"
|
|||||||
|
|
||||||
await samples('github:tidalcycles/Dirt-Samples/master')
|
await samples('github:tidalcycles/Dirt-Samples/master')
|
||||||
|
|
||||||
note("<<Am7 C^7> C7 F^7 [Fm7 E7b9]>".voicings('lefthand'))
|
n("[0,3] 2 [1,3] 2".fast(3).lastOf(4, fast(2))).clip(2)
|
||||||
.arp("[0,3] 2 [1,3] 2".fast(3).lastOf(4, fast(2))).clip(2)
|
.offset("<<1 2> 2 1 1>")
|
||||||
.add(perlin.range(0,0.2).add("<0 12>/8").note())
|
.chord("<<Am7 C^7> C7 F^7 [Fm7 E7b9]>")
|
||||||
|
.dict('lefthand').voicing()
|
||||||
|
.add(perlin.range(0,0.2).add("<-12 0>/8").note())
|
||||||
.cutoff(perlin.range(500,4000)).resonance(12)
|
.cutoff(perlin.range(500,4000)).resonance(12)
|
||||||
.gain("<.5 .8>*16")
|
.gain("<.5 .8>*16")
|
||||||
.decay(.16).sustain(0.5)
|
.decay(.16).sustain(0.5)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user