-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshowcase.flow
More file actions
66 lines (53 loc) · 3.18 KB
/
Copy pathshowcase.flow
File metadata and controls
66 lines (53 loc) · 3.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
use "@std"
use "@audio"
use "@composition"
(print "Flow Showcase -- v1.3 Polyrhythmic Minimal")
(print "Generating examples/output/flow_showcase.{wav,mid} ...")
tempo 120 {
timesig 4/4 {
key Cmajor {
// Dict-driven drum kit -- Symbol keys with INSERTION-ORDER iteration (DICT-03).
// Construct in the order you want iteration to happen: kick -> snare -> hihat.
Dict<Symbol, Note> kit = (dict #kick C2 #snare D2 #hihat F#3)
// Tuplet groove leading the genre -- {3:2 ...}q triplets on beats 1 and 3
// against straight kicks on the off-beats. Polyrhythmic feel without losing the downbeat.
// No ties INSIDE tuplet brackets (RESEARCH Pitfall 3 -- the 100ms tied-overlap can
// over-extend short tuplet members; safest form is plain notes inside the bracket).
Sequence drumTriplets = | {3:2 _ C2 _}q C2 {3:2 _ C2 D2}q C2 |
// Sparse euclidean drum on the kick -- humanized, fixed seed for byte-identical reruns.
Sequence drums = (euclidean 5 16 (get kit #kick) 0.18 0.12 7)
// Soft mezzo-piano melody humanized via Gaussian -- fixed seed for byte-identical reruns.
Sequence melody = (humanizeGaussian | mp _ _ E5q G5q | A5h E5h | _ _ G5q B5q | A5w | 0.08 314)
// Ambient pad bed -- long whole notes outline the I / IV / V / I shape
Sequence pad = | C4w | F4w | G4w | C4w |
// Progression DSL demo (D-12) -- voice-led I / IV / V / I in the active key.
// NON-RENDERED on purpose: progDemo is NOT fed into `section showcase` or the
// Song below, so the pinned flow_showcase.wav stays byte-identical. This line
// just shows the `progression | ... |` surface alongside the hand-written pad
// (voice-led chords differ from the pad's root whole-notes).
Sequence progDemo = progression | I IV V I |
(print "Progression DSL demo: progression | I IV V I | (voice-led, non-rendered)")
section showcase {
Sequence groove = drums
Sequence triplets = drumTriplets
Sequence lead = melody
Sequence bed = pad
}
Song piece = [showcase]
Buffer rawMix = (renderSong piece "strings")
// Phase 26.2 audible features chained on the rendered Buffer (per D-103):
// 1. (lowpass _ 1.2kHz) Hertz literal -- filter sweep tightens the top
// 2. (delay _ 250ms _ _) Ms-typed delay -- adds a quarter-note slap
// 3. (reverb _ 0.5 1.8s) Second-decay reverb -- 1.8s tail
// 4. (volume _ 0.7) linear post-render trim (NOT gain -- gain is dB)
Buffer filtered = rawMix -> (lowpass 1.2kHz)
Buffer delayed = filtered -> (delay 250ms 0.5 0.4)
Buffer reverbed = delayed -> (reverb 0.5 1.8s)
Buffer finalMix = (volume reverbed 0.7)
(writeWav "examples/output/flow_showcase.wav" finalMix)
(writeMidi "examples/output/flow_showcase.mid" piece)
}
}
}
(print "WAV: examples/output/flow_showcase.wav")
(print "MIDI: examples/output/flow_showcase.mid")