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
cat *.mp3 > nome-file.mp3 # join files |
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
fun void makeTable(float root, float partials[], float amps[], ADSR env, NRev rev, Pan2 pan) | |
{ | |
SinOsc s[partials.cap()]; | |
for (0 => int j; j < partials.cap(); 1 +=> j) | |
{ | |
Math.random2f(0.1,0.5) => rev.mix; | |
Math.random2f(-1.0,1.0) => pan.pan; | |
root*partials[j] => s[j].freq; | |
amps[j] => s[j].gain; |
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
fun void mongol() | |
{ | |
addsyn s1; | |
[1.0,5.0,6.0,7.0,8.0,9.0,10.0] @=> float partials[]; | |
[.04,.02,.02,.02,.02,.02,.02] @=> float amps[]; | |
risset(s1, .03, 100.0, partials, amps); | |
s1.play(); | |
10::second => now; | |
s1.stop(); | |
2::second => now; |
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
// Risset's Arpeggio aka spectral scan with beats | |
fun void risset(addsyn syn, float delta, float root, float partials[], float amps[]) | |
{ | |
syn.maketable(root, partials, amps); | |
for (1 => int i; i <= 4; 1 +=> i) | |
{ | |
syn.maketable(root+(delta*i), partials, amps); | |
syn.maketable(root-(delta*i), partials, amps); | |
} | |
} |
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
public class addsyn | |
{ | |
ADSR env => NRev rev => Pan2 pan => dac; | |
( 3::second, 100::ms, .5, 3::second ) => env.set; | |
// an additive synth to create wavetables | |
fun void maketable(float root, float partials[], float amps[]) | |
{ | |
SinOsc s[partials.cap()]; | |