This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// copy and paste me into your browser console to play music! | |
function createReverbNode(context, decayTime = 3, wetLevel = 0.33) { | |
const reverbNode = context.createConvolver(); | |
// Create an impulse response buffer for the reverb | |
const bufferLength = context.sampleRate * decayTime; | |
const impulseResponse = context.createBuffer(2, bufferLength, context.sampleRate); | |
// Fill the buffer with random noise for a simple reverb effect |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
( | |
// major scale | |
var freqs= [ 1.0, 1.0, 1.125, 1.25, 1.3333333333333, 1.5, 1.5, 1.6666666666667, 1.875 ]; | |
// whare are ur snares | |
var samples = PathName("~/stage/assets/samples/snare").files; | |
// for Promise-like behavior in supercollider, use a FlowVar | |
var flows = Array.fill(samples.size, {FlowVar.new}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Generate a list of new FM synths | |
This is a good preset for target frequencies in 50 - 600 Hz range. | |
Above that produces aliasing effects on the highs, and below on the lows. | |
*/ | |
( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(comment | |
" | |
Let the choir make the call! | |
I love Just Intonation and want it to be the absolute answer | |
for perfect composition. | |
However JI does not quite answer everything. Or does it? | |
For example a popular audio effect is detune, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
How to Emperically measure the Quality of Music, | |
or Applying Harmonics to Non-Musical Source to Produce a Musical Signal | |
When people ask for empirical evidence that Harmonic Theory works, | |
we must first agree on a method to measure the "musicality" of a signal. | |
Generally we can agree that a pure White Noise signal (even distribution of frequencies across the given range in Hertz) is not musical. In the domain of sound, it is the antithesis of music because there is no discrete rhythmic structure and no discrete harmonic structure (example 1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
Here we create a "sidechain compressor" effect. | |
Given two audio files, we are able to have one of the files change its volume in response to the other. | |
This is an extremely useful and versatile effect: All professional music mastering involves dynamic compression | |
at many scales. | |
In contemporary and art music, it is applied lightly. In dance music and popular styles, it is often heavy. | |
This is a heavy example, for drastic effect. Here we are: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
Routing dynamic effects for any Synth | |
The issue was that a list of arguments can not be passed in as args for SynthDef. | |
For examle say you want to apply both a reverb and delay to a hat sound. | |
One way is to write explicit args for each effect : | |
SynthDef(\hat, {|out=0, reverbChannel =4, delayChannel = 6| |