History

buffer commands in LIL

Paul Batchelor committed 5 years ago

Commit 93158fc1 parent b45a0c95 files · +78 −0Browse files

Showing the changes to examples (1 of 5 files). Show all

Unified · Split

examples/sines.lil+33−0
@@ -0,0 +1,33 @@
1+# mainly testing out hold/unhold functionality
2+# one LFO controls the frequency of 4 oscillators
3+
4+# function to create a voice
5+func voice {min max} {
6+ osc [regget 0] \
7+ [biscale [regget 1] $min $max] \
8+ [param 0.1] [param 0]
9+}
10+
11+# generate sine table in register 0
12+regset [gensine [tabnew 8192]] 0
13+
14+# generate held LFO signal in register 1
15+regset [hold [osc [regget 0] 0.1 1 0]] 1
16+
17+# create 4 voices and add them together
18+voice 400 500
19+voice 400 600
20+add zz zz
21+voice 400 300
22+add zz zz
23+voice 400 200
24+add zz zz
25+
26+# write output to wav file
27+wavout zz "sines.wav"
28+
29+# release LFO signal
30+unhold [regget 1]
31+
32+# compute ~30 seconds of sound
33+computes 30

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t