This file contains 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
d = Drums("xoxo", _4); // x = kick, o = snare, quarter note (_4) gets the beat | |
s = Synth(); // create an oscillator accepting note messages | |
s.fx.add( Reverb() ); // add Reverb to our synth | |
s.note("A#4"); // test synth by telling it to play a note | |
a = Arp("C2m7", _4); // arpeggiate a C minor 7 chord with quarter notes | |
a.slave(s); // control the synth with our arpeggiator |
This file contains 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
d = Drums("xoxo", _4); // x = kick, o = snare, quarter note (_4) gets the beat | |
s = Synth(); // create an oscillator accepting note messages | |
s.fx.add( Reverb() ); // add Reverb to our synth | |
s.note("A#4"); // test synth by telling it to play a note | |
a = Arp("C2m7", _4); // arpeggiate a C minor 7 chord with quarter notes | |
a.slave(s); // control the synth with our arpeggiator |
This file contains 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
s = Synth(); // create a synth | |
// sequence a four note phrase | |
seq = Seq(["A4", "B4", "C4", "C#4"], _4); | |
// tell the sequencer to control the synth. Using introspection, | |
// the sequencer knows it should call the note method of the | |
// synth | |
seq.slave(s); |
This file contains 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
s = Sine(440, .2); | |
lfo = LFO(8,10); | |
s.mod("freq", lfo, "+"); | |
lfo.mod("mix", LFO(.05, 10), "*"); |
This file contains 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
s = Synth(); | |
seq = Seq(["A4", "D4", "E4", "B4"], _4); | |
seq.slave(s); | |
// add one or many fx at the same time | |
s.fx.add( Trunc(5) ); | |
s.fx.add( Delay(_16), Reverb() ); | |
// remove a named effect | |
s.fx.remove("Trunc"); |
This file contains 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
{ | |
"esnext": true, | |
"maximumLineLength": null, | |
"disallowTrailingWhitespace": null, | |
"requireSpacesInsideParentheses": { | |
"all": true, | |
"except": [ "{", "}" ] | |
}, | |
"disallowSemicolons": true, | |
"validateQuoteMarks": { "mark": "'", "escape": true }, |
This file contains 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
let a = d => d * 4 | |
const test13 = 'TESTING ! 2 3' | |
let e = [1,2,3] | |
let f = e.map( v => v * 2 ) | |
let test = { | |
a : 'me', |
This file contains 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
window.max.outlet( 1 ) |
This file contains 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
<html> | |
<body></body> | |
<script>window.max.outlet( 1 )</script> | |
</html> |
This file contains 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
<!-- | |
This file demonstrates how to create an audiocontext and AudioWorklet node to use with genish.js. | |
If AudioWorklet is unavailable (for example, in Safari) a ScriptProcessor node will be used. | |
Most of the code consists of setup; the synthesis (a FM synthesized gong) is only six lines of code. | |
--> | |
<!doctype html> | |
<html lang='en'> | |
<head> | |
<meta charset='utf-8'> | |
<title>genish.js AudioWorklet FM demo</title> |
OlderNewer