diff --git a/docs/SuperCollider.md b/docs/SuperCollider.md index f98676e..400f095 100644 --- a/docs/SuperCollider.md +++ b/docs/SuperCollider.md @@ -137,4 +137,92 @@ Certainly! Let's dive into mastering sound synthesis basics, rhythm and beat pro ).play; ``` -Remember to experiment, explore, and build upon these examples to create your own unique sounds and compositions in SuperCollider. Happy music-making! \ No newline at end of file +Remember to experiment, explore, and build upon these examples to create your own unique sounds and compositions in SuperCollider. Happy music-making! + +--- + +Certainly! Here's a guide to producing down tempo music in minor keys using SuperCollider, incorporating the previously discussed mathematical concepts and ratios: + +I. Harmony and Chord Progressions + A. Use the `Scale` class to generate minor scales and chords + 1. `Scale.minor` for natural minor + 2. `Scale.harmonicMinor` for harmonic minor + 3. `Scale.melodicMinor` for melodic minor + B. Utilize `Pseq` and `Prand` to create chord progressions + C. Experiment with `Pswitch` and `Pif` to incorporate chromatic mediants + +II. Rhythm and Tempo + A. Use `TempoClock` to set the tempo between 60-90 BPM + B. Utilize `Pbind` to create rhythmic patterns and polyrhythms + 1. `\dur` for note durations (e.g., `Pseq([1/3, 1/6], inf)` for triplets against eighth notes) + 2. `\stretch` for rhythmic variations (e.g., `Pseq([2/3, 1/3], inf)` for dotted eighth notes against quarter notes) + C. Apply swing using `Pswing` or by manipulating durations + +III. Sound Design and Frequencies + A. Use `SinOsc`, `Saw`, `Pulse`, and other UGens for basic waveforms + B. Apply `RLPF`, `RHPF`, and `BPF` filters to focus on specific frequency ranges + C. Create layered textures using `Splay`, `Mix`, and `Splay` + D. Utilize the golden ratio for amplitude envelopes and modulation depths + +IV. Arrangement and Structure + A. Use the Fibonacci sequence for section lengths and transitions with `Pn`, `Pfin`, and `Pdef` + B. Create tension and release by alternating between sections using `Pseq` and `Ppar` + C. Use the rule of thirds for placing key elements and transitions with `Quant` + +V. Mixing and Mastering + A. Apply `AmpComp` and `FreqShift` to balance frequencies based on equal loudness contours + B. Use `Pan2` and `PanAz` for panning, following the "rule of sixths" + C. Adjust dynamics using `Compander`, `Limiter`, and `Normalizer` + D. Utilize `Meter` and `Loudness` UGens to monitor and control the dynamic range + +VI. Example Code + ```supercollider + ( + // Minor scale and chord progression + ~scale = Scale.minor; + ~chords = ~scale.degrees.collect(_.chord); + ~progression = Pseq([0, 3, 4, 0], inf); + + // Rhythm and tempo + ~tempo = 72; + ~rhythmPattern = Pseq([2/3, 1/3], inf); + + // Sound design and frequencies + ~synthDef = SynthDef(\pad, { + |freq = 440, amp = 0.5, cutoff = 500, rq = 0.5| + var osc1 = Saw.ar(freq); + var osc2 = Pulse.ar(freq * (1 + MouseX.kr(-0.1, 0.1))); + var env = EnvGen.kr(Env.perc(0.01, 1.618), doneAction: 2); + var filter = RLPF.ar(osc1 + osc2, cutoff * env, rq); + Out.ar(0, Pan2.ar(filter * env * amp)); + }).add; + + // Arrangement and structure + ~sections = [ + Pn(Ppar([ + Pbind(\instrument, \pad, \freq, Pseq((~chords[0] + 60).midicps, 1), \dur, 4), + Pbind(\instrument, \pad, \freq, Pseq((~chords[3] + 48).midicps, 1), \dur, 4), + ]), 8), + Pn(Ppar([ + Pbind(\instrument, \pad, \freq, Pseq((~chords[4] + 60).midicps, 1), \dur, 4), + Pbind(\instrument, \pad, \freq, Pseq((~chords[0] + 48).midicps, 1), \dur, 4), + ]), 13), + ]; + + // Mixing and mastering + ~master = { + var sig = In.ar(0, 2); + sig = CompanderD.ar(sig, 0.5, 1, 0.3, 0.01, 0.1); + sig = Limiter.ar(sig, 0.9, 0.01); + sig = Splay.ar(sig); + sig = Loudness.ar(sig); + Out.ar(0, sig * 0.8); + }.play; + + // Play the sections + ~sections[0].play(TempoClock(~tempo / 60)); + ~sections[1].play(TempoClock(~tempo / 60), quant: [8]); + ) + ``` + +Remember to experiment with different UGens, patterns, and parameters to achieve your desired sound. SuperCollider provides a powerful and flexible environment for creating generative and algorithmic music, so don't hesitate to explore and customize the code to suit your needs. \ No newline at end of file