Commit 4dcba462 authored by jhammen's avatar jhammen
Browse files

plugin preset, iterate over midi patterns

parent 9c6b10b6
......@@ -12,8 +12,6 @@ in real time using a physical control (fader, dial, etc.)
For this example we'll create two LV2 plugins: a software synthesizer and a reverb; we'll feed
the output of the synth into the reverb and connect the reverb to the main system outputs.
Also note that we set the initial value of the reverb amount to zero.
local synth = Lv2.Plugin("", "Velo Bee")
......@@ -24,6 +22,13 @@ reverb.control("amount", 0.0)
synth => reverb => Audio.StereoOutput("main", true)
Note that we create the synthesizer plugin with second argument after the plugin URL, this is the name
of an LV2 preset that will be loaded when the plugin is created. We can also change to a different
preset using the plugin _preset_ method.
Also note that we set the initial value of the reverb amount to zero using the plugin _control_ method
which allows changing the plugin's control port values.
## Controller Setup
First we'll show how to control the plugin by sending MIDI control messages.
......@@ -47,6 +47,20 @@ simpleBeat.add(snareNote, 1.75)
## Iterating over a Pattern
We can access the note events in a pattern by using array-like indexing:
simpleBeat[0] // the first event in the pattern
We can also iterate over all the events using the foreach loop:
foreach(event in simpleBeat) {
println(event.note.pitch + " @ " + event.measure)
## Copying a Pattern
Now we want to create another version of this same pattern that has additional
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment