afternoon.tidal 2.2 KB
Newer Older
PLN committed
1 2
import Sound.Tidal.ParVagues.Control

PLN committed
3 4 5 6
-- Gauche si+mi/sol+re/la+fa/si+sol
-- Droite whatever autour ;)


7
resetCycles
8 9

do
10 11 12
setcps (60/60/4)
let mel = "<e3 [g3 <a3 f3>] e3 b3>"
let prog = "<e3 [g3'maj7'2 f3'min'2] e3 <b3'min7'2 b3'maj7'2>>"
PLN committed
13 14 15 16 17 18 19 20
let modIndex = pF "modIndex"
let gDJF = (midiDJF "^49" 0 10000 0 10000)
let gFreqL = (# lpq (range 0 0.25 "^29"))
let gFreqH = (# hpq (range 0 0.25 "^30"))
let gFreqs = (gFreqH . gFreqL)
let g = (gDJF . gFreqs)
d1 $ g -- BEAT
  $ fast 2
PLN committed
21 22 23
  $ midiOn "^41" (<| "k k k <k [<~ k> k]>")
  $ midiOff "^41" (<| "k . ~ k ~ ~ ")
  $ "[jazz,cpu2,hh27:6]"
PLN committed
24 25 26 27 28 29 30 31 32 33 34 35 36 37
  # release "<0.7!3 1>"
  # midiG' "^78" 0 1.8
d3 $ g -- Snare contretemps rushé
   $ whenmod 4 3 (ply "2 4")
   $ midiOn "^43" (fast 2)
   $ fast "<1!4 2!10 4 [4 8]>"
   $ "~ snare"
   # room 0.2
   # dry 1
   # speed (range 0.5 1.5 "^51")
   # n "[11,25]"
   # midiG' "^79" 0 1.5
d2 $ g -- BREAK
  $ degradeBy (range 0.1 0.99 "0 ^32!15")
38 39 40 41 42 43 44 45
  $ whenmod 32 16 (# djf (slow 32 (cosine + 0.5)))
  $ slice 8 (
    fast "<8 [8 16] 8 [16 <8 4>]>"
    -- "<0!4 [0 1]!4 <0 1 2 3 4 5 6 7>!4>"
    "<0 2 0 7 5 5 0 7>"
    )
  $ loopAt 2
  $ "break:3"
PLN committed
46 47
  # speed (range 0.5 1.5 "^52")
  # midiG' "^80" 0 2
48
  # cut 2
PLN committed
49
d6 $ g -- Nappes Rhodes
50 51 52 53
  $ note (
    prog
    + "0 12"
  )
54 55
  # "FMRhodes1"
  # pan 0.2
PLN committed
56 57
  # modIndex (range 0 100 "^54")
  # midiG' "^82" 0 1.8
PLN committed
58 59
d7 $ g -- Hello PWM!
  $ (|* gain "<1!15 0.8>")
PLN committed
60 61
  $ midiOn "^57" (chop "<[8 <4 16>]!15 1>")
  $ midiOn "^89" (superimpose $ segment 16)
62 63 64 65 66 67
  $ note (mel - 12)
  # "superpwm"
  # semitone "<7!3 5>" -- 2nd Oscillator quinte/quarte
  # accelerate "<0!7 <6 12>>"
  # rate "<1!5 2 4 <1 4>>"
  # resonance (slow 32 $ range 0.2 0.6 sine)
PLN committed
68
  # crush (range 10 3 "^53")
PLN committed
69
  # midiG' "^81" 0 2
PLN committed
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84

-- TODO MidiCloud
p "midiclock" $ midicmd "midiClock*48" # s "midi"

-- Your MIDI device should then adjust its BPM to Tidal's cps. Then it's worth sending a 'stop' message like this:

once $ midicmd "stop" # s "midi"

-- and then finally a start message to start the MIDI clock at the right time. The following sends a start message every fourth cycle:

p "midictl" $ midicmd "start/4" # s "midi"

-- Once everything's started and in sync, it's probably best to stop sending the start messages to avoid glitching:

p "midictl" $ silence