Skip to content

Commit ec25e4c

Browse files
committed
added basic examples
1 parent ec3a3ab commit ec25e4c

12 files changed

+98
-0
lines changed

Diff for: examples-basic/01-sample.txt

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
2+
// make a new instrument named bamboo_a
3+
// played 4 times per bar 1/4
4+
5+
new sample bamboo_a time(1/4)

Diff for: examples-basic/02-tempo.txt

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
// change the total tempo of the environment
3+
// in beats per minute
4+
5+
set tempo 98
6+
7+
new sample bamboo_a time(1/4)

Diff for: examples-basic/03-time.txt

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
set tempo 98
2+
3+
// add another instrument with different
4+
// timing division
5+
6+
new sample bamboo_a time(1/5)
7+
new sample bamboo_c time(1/3)

Diff for: examples-basic/04-offset.txt

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
set tempo 105
2+
3+
// many divisions are possible
4+
// and with offset as 2nd argument
5+
6+
new sample pluck_a time(1/2)
7+
new sample pluck_c time(1/2 1/4)
8+
new sample pluck_e time(3/16)
9+

Diff for: examples-basic/05-rhythm-ring.txt

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
set tempo 105
2+
3+
// a list with 1's and 0's to play
4+
// as a rhythm
5+
ring myRhythm [1 0 0 1 0 1 0 1]
6+
7+
new sample pluck_a time(1/4)
8+
new sample pluck_e time(1/16) beat(myRhythm)
9+
10+

Diff for: examples-basic/06-probability.txt

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
set tempo 105
2+
3+
// play the instruments 90%, 40%,
4+
// and 20% of the time
5+
6+
// new sample pluck_a time(1/4) beat(0.9)
7+
// new sample pluck_c time(1/8) beat(0.4)
8+
// new sample pluck_e time(1/16) beat(0.2)
9+
10+
ring pl [[pluck_a pluck_c]]
11+
12+
new sample pl time(1/8) shape(1/16)

Diff for: examples-basic/07-synth.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
set tempo 97
2+
3+
new synth sine time(1/8) note(0 2)

Diff for: examples-basic/08-two-notes.txt

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
set tempo 113
2+
3+
new synth sine time(1/4) note(0 2)
4+
new synth sine time(1/5) note(7 2)
5+

Diff for: examples-basic/09-melody-ring.txt

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
set tempo 113
2+
3+
ring myMelody [0 4 5 4 7 5 2 -1]
4+
5+
new synth sine time(1/16) note(myMelody 2)
6+

Diff for: examples-basic/10-scale.txt

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
set tempo 97
2+
3+
// hear how numbers are mapped
4+
// to the scale (resulting in doubles)
5+
set scale pentatonic_major g
6+
7+
ring myMelody [0 1 2 3 4 5 6 7 8 9 10 11]
8+
9+
new synth sine time(1/16) note(myMelody 2)
10+
11+

Diff for: examples-basic/11-shape.txt

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
set tempo 83
2+
3+
ring myMelody [0 3 7 -1]
4+
ring lengths [100 1000 20 20 20]
5+
6+
new synth sine time(1/16) note(myMelody 2) shape(lengths)

Diff for: examples-basic/12-fx.txt

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
set tempo 83
2+
3+
ring myMelody [0 3 7 -1]
4+
5+
// use names to have more space
6+
// for functions
7+
8+
new synth sine name(one)
9+
set one time(1/16) note(myMelody 2)
10+
set one beat(0.8) shape(100)
11+
set one fx(drive)
12+
13+
new sample pluck_c name(two)
14+
set two time(5/8)
15+
set two fx(delay)
16+
17+
set all fx(reverb)

0 commit comments

Comments
 (0)