-
Notifications
You must be signed in to change notification settings - Fork 0
Language Sketch
Rodri Pizarro edited this page Aug 4, 2020
·
5 revisions
sound a = sample(W_BASS);
sound b = sample("myGuitarSample.wav");
sound c = S_SQUARED;
sound c = myFunction;
a.decay(ratio).sustain(ratio);
b.lowpassfiler(order,fc);
b.reverb(R_HALL);
b.effect((argv)myEffect);
1 whole = T_W
2 half = T_H
3 = 1+2 dotted whole
4 quarter = T_Q
..
6 = 2+4 dotted half
..
8 eighth = T_E
..
12 = 4+8 dotted quarter
..
16 sixteenth = T_S
32 thirty second = T_TS
64 sixty fourth = T_SF
.3 triplet
a.loop(
([N_S],4),
([N_C],4),
([N_S],4),
([N_C],4)
);
a.play(
([N_A3,N_C3,N_E3,N_G3],6),
([N_S],2),
([N_D3],4)
);
a.stop(); # This functionality has sense in live coding
Grouping is useful for setting parameters for several sounds at once
group myGroup = [a,b,snare,kick];
myGroup.bpm(110);
myGroup.reverb(R_HALL);
part verse = [
([N_A3,N_C3,N_E2],T_Q),
([N_G3,N_D3,N_B3],T_Q),
([N_C3,N_E3,N_G3],T_Q),
([N_C3,N_E3,N_G3],T_E+T_TS), #This is the way to make a ligature of notes
([N_S],T_S+T_TS) # The same way for silences
];
part chorus = [
([N_FS3,N_B3,N_DS2],4).envelope([0.0,0.0],[0.2,1.0],[0.5,0.8],[0.7,0.4],[1.0,0.4]),
([N_G3,N_D3,N_B3],4).envelope(function), #Same as applying an LFO
([N_C3,N_E3,N_G3],4).attack(0.3).release(1.0),
([N_C3,N_E3,N_G3],4)
];
part mySong = [verse * 2, chorus, verse];
a.play(song);
- sample
- string
- sound
- real
- number
- argument ()
- group
- function
- boolean
- buffer
- if (else)
- for
- break
- return
- Arithmetical
+ - * /
- Assignation
=
- Boolean
== < <= > >= != | &
- N_ for notes
- T_ for times or notes duration
- S_ for sounds and synthesized functions
- W_ for wav files or samples
- R_ for reverb functions