Repository Public
1// ORIX Sonata2// File: Examples/fx_parallel_compression.sonata3// Description: Drums mixed three ways, four bars each: dry, then with a heavily compressed copy on a bus blended underneath (the "New York" trick), then with the crushed bus alone, so the difference can be seen on the meters.4//5// Author: Simon-Pierre Boucher6// Contact: contact@spboucher.ai7//8// category: Effects and mixing9// title: Parallel Compression10// teaches: pre-fader sends, a compression bus, automating a bus fader, mute by automation11//12// expect: notes 16813// expect: tracks 314// expect: duration 27.6923s15// expect: deterministic16pattern beat() {17 repeat 4 {18 rhythm(C2, euclid(3, 8), step: 1/8, vel: 0.9)19 }20}2122composition "Parallel Compression" {23 tempo 104bpm2425 bus dry {26 gain -3dB27 // Dry for 8 bars, silent for the last 4.28 automate gain {29 0bars: -3dB30 8bars: -3dB step31 8bars: -80dB step32 }33 }3435 bus crush {36 effects {37 compressor(threshold: -34dB, ratio: 12, attack: 2ms, release: 90ms, makeup: 16dB)38 saturation tape(mix: 0.5)39 }40 // Silent for 4 bars, blended under for 4, alone for 4.41 automate gain {42 0bars: -80dB43 4bars: -80dB step44 4bars: -12dB step45 8bars: -12dB step46 8bars: -6dB step47 }48 }4950 instrument kick: AcousticKick {51 output dry52 send crush 0dB pre53 repeat 3 {54 beat()55 }56 }5758 instrument snare: FatSnare {59 output dry60 send crush 0dB pre61 gain -4dB62 repeat 12 {63 rest 1/464 play D2 duration 1/465 rest 1/466 play D2 duration 1/867 play D2 duration 1/8 velocity 0.468 }69 }7071 instrument hat: ClosedHat {72 output dry73 send crush -6dB pre74 gain -12dB75 pan 0.376 repeat 12 {77 for i in 0..8 {78 play F#2 duration 1/8 velocity if i % 2 == 0 then 0.7 else 0.3579 }80 }81 }82}83