aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHanspeter Portner <dev@open-music-kontrollers.ch>2019-07-10 19:21:00 +0200
committerHanspeter Portner <dev@open-music-kontrollers.ch>2019-07-10 19:21:00 +0200
commitf4eda7364c14459bcf9b7e7455d5267eef5f73f9 (patch)
treec7cfe0097e3f176dff91db9fa941bd79d324c0a6
parent90cdb7a6d4e44ad26cdb809573db8d513517bad9 (diff)
downloadmephisto.lv2-f4eda7364c14459bcf9b7e7455d5267eef5f73f9.tar.xz
add filter_gain and time_lfo presets.
-rw-r--r--bank-filter_gain.dsp7
-rw-r--r--bank-instrument_osc.dsp13
-rw-r--r--bank-time_lfo.dsp20
-rw-r--r--manifest.ttl.in25
-rw-r--r--meson.build10
-rw-r--r--presets.ttl.in46
6 files changed, 113 insertions, 8 deletions
diff --git a/bank-filter_gain.dsp b/bank-filter_gain.dsp
new file mode 100644
index 0000000..ad027f1
--- /dev/null
+++ b/bank-filter_gain.dsp
@@ -0,0 +1,7 @@
+import("stdfaust.lib");
+
+gain = hslider("parameter/gain[0]", 0, 0, 1, 0.01);
+
+process = _, _;
+
+// vim: set syntax=faust:
diff --git a/bank-instrument_osc.dsp b/bank-instrument_osc.dsp
index a3c2a72..47fb704 100644
--- a/bank-instrument_osc.dsp
+++ b/bank-instrument_osc.dsp
@@ -1,11 +1,14 @@
-import("stdfaust.lib");
declare options "[nvoices:48][midi:on]";
-freq = hslider("freq", 20, 20, 20000, 1);
-gain = hslider("gain", 0, 0, 1, 0.01);
-gate = button("gate");
+import("stdfaust.lib");
+
+freq = hslider("synth/freq", 20, 20, 20000, 1);
+gain = hslider("synth/gain", 0, 0, 1, 0.01);
+gate = button("synth/gate");
+
+env = en.adsr(0.01, 1.0, 0.8, 0.1, gate) * gain;
-inst = os.osc(freq) * gain;
+inst = os.triangle(freq) * env;
process = inst, inst;
diff --git a/bank-time_lfo.dsp b/bank-time_lfo.dsp
new file mode 100644
index 0000000..cd57e15
--- /dev/null
+++ b/bank-time_lfo.dsp
@@ -0,0 +1,20 @@
+declare options "[time:on]";
+
+import("stdfaust.lib");
+
+barBeat = hslider("time/barBeat[time:barBeat]", 0, 0, 32, 1);
+beatsPerBar = hslider("time/beatsPerBar[time:beatsPerBar]", 1, 1, 32, 1);
+gate = button("time/speed[time:speed]");
+
+mul = hslider("parameter/mul[0]", 0, 0, 1000, 1);
+add = hslider("parameter/add[1]", 0, 0, 1000, 1);
+
+freq = sin(barBeat / beatsPerBar * ma.PI) * mul + add;
+
+env = en.adsr(0.01, 1.0, 0.8, 0.1, gate);
+
+instr = os.triangle(freq) * env;
+
+process = instr, instr;
+
+// vim: set syntax=faust:
diff --git a/manifest.ttl.in b/manifest.ttl.in
index b41f004..2eb48ba 100644
--- a/manifest.ttl.in
+++ b/manifest.ttl.in
@@ -66,6 +66,9 @@ mephisto:bank-filter
mephisto:bank-instrument
a pset:Bank ;
rdfs:label "Instrument bank" .
+mephisto:bank-time
+ a pset:Bank ;
+ rdfs:label "Time bank" .
# Filter bank
mephisto:bank-filter_through
@@ -73,14 +76,30 @@ mephisto:bank-filter_through
lv2:appliesTo mephisto:mono ,
mephisto:stereo ;
pset:bank mephisto:bank-filter ;
- rdfs:label "Through" ;
+ rdfs:label "[Filter] Through" ;
+ rdfs:seeAlso <presets.ttl> .
+mephisto:bank-filter_gain
+ a pset:Preset ;
+ lv2:appliesTo mephisto:mono ,
+ mephisto:stereo ;
+ pset:bank mephisto:bank-filter ;
+ rdfs:label "[Filter] Gain" ;
rdfs:seeAlso <presets.ttl> .
-# Filter bank
+# Time bank
+mephisto:bank-time_lfo
+ a pset:Preset ;
+ lv2:appliesTo mephisto:mono ,
+ mephisto:stereo ;
+ pset:bank mephisto:bank-time ;
+ rdfs:label "[Time] Simple LFO" ;
+ rdfs:seeAlso <presets.ttl> .
+
+# Instrument bank
mephisto:bank-instrument_osc
a pset:Preset ;
lv2:appliesTo mephisto:mono ,
mephisto:stereo ;
pset:bank mephisto:bank-instrument ;
- rdfs:label "Oscillator" ;
+ rdfs:label "[Instrument] Simple Oscillator" ;
rdfs:seeAlso <presets.ttl> .
diff --git a/meson.build b/meson.build
index 4ea6658..4301e93 100644
--- a/meson.build
+++ b/meson.build
@@ -77,6 +77,12 @@ conf_data.set('MICRO_VERSION', version[2])
bank_filter_through = run_command('cat', 'bank-filter_through.dsp').stdout()
conf_data.set('BANK-FILTER_THROUGH', bank_filter_through)
+bank_filter_gain = run_command('cat', 'bank-filter_gain.dsp').stdout()
+conf_data.set('BANK-FILTER_GAIN', bank_filter_gain)
+
+bank_time_lfo = run_command('cat', 'bank-time_lfo.dsp').stdout()
+conf_data.set('BANK-TIME_LFO', bank_time_lfo)
+
bank_instrument_osc = run_command('cat', 'bank-instrument_osc.dsp').stdout()
conf_data.set('BANK-INSTRUMENT_OSC', bank_instrument_osc)
@@ -123,6 +129,10 @@ endif
if faust.found()
test('FAUST bank-filter_through', faust,
args : ['../bank-filter_through.dsp']) #FIXME path
+ test('FAUST bank-filter_gain', faust,
+ args : ['../bank-filter_gain.dsp']) #FIXME path
+ test('FAUST bank-time_lfo', faust,
+ args : ['../bank-time_lfo.dsp']) #FIXME path
test('FAUST bank-instrument_osc', faust,
args : ['../bank-instrument_osc.dsp']) #FIXME path
endif
diff --git a/presets.ttl.in b/presets.ttl.in
index 7015499..211ac57 100644
--- a/presets.ttl.in
+++ b/presets.ttl.in
@@ -49,6 +49,52 @@ mephisto:bank-filter_through
mephisto:control_16 "0.0"^^xsd:float ;
] .
+mephisto:bank-filter_gain
+ a pset:Preset ;
+ doap:license lic:Artistic-2.0 ;
+ state:state [
+ mephisto:code """@BANK-FILTER_GAIN@""" ;
+ mephisto:control_1 "0.0"^^xsd:float ;
+ mephisto:control_2 "0.0"^^xsd:float ;
+ mephisto:control_3 "0.0"^^xsd:float ;
+ mephisto:control_4 "0.0"^^xsd:float ;
+ mephisto:control_5 "0.0"^^xsd:float ;
+ mephisto:control_6 "0.0"^^xsd:float ;
+ mephisto:control_7 "0.0"^^xsd:float ;
+ mephisto:control_8 "0.0"^^xsd:float ;
+ mephisto:control_9 "0.0"^^xsd:float ;
+ mephisto:control_10 "0.0"^^xsd:float ;
+ mephisto:control_11 "0.0"^^xsd:float ;
+ mephisto:control_12 "0.0"^^xsd:float ;
+ mephisto:control_13 "0.0"^^xsd:float ;
+ mephisto:control_14 "0.0"^^xsd:float ;
+ mephisto:control_15 "0.0"^^xsd:float ;
+ mephisto:control_16 "0.0"^^xsd:float ;
+ ] .
+
+mephisto:bank-time_lfo
+ a pset:Preset ;
+ doap:license lic:Artistic-2.0 ;
+ state:state [
+ mephisto:code """@BANK-TIME_LFO@""" ;
+ mephisto:control_1 "0.0"^^xsd:float ;
+ mephisto:control_2 "0.0"^^xsd:float ;
+ mephisto:control_3 "0.0"^^xsd:float ;
+ mephisto:control_4 "0.0"^^xsd:float ;
+ mephisto:control_5 "0.0"^^xsd:float ;
+ mephisto:control_6 "0.0"^^xsd:float ;
+ mephisto:control_7 "0.0"^^xsd:float ;
+ mephisto:control_8 "0.0"^^xsd:float ;
+ mephisto:control_9 "0.0"^^xsd:float ;
+ mephisto:control_10 "0.0"^^xsd:float ;
+ mephisto:control_11 "0.0"^^xsd:float ;
+ mephisto:control_12 "0.0"^^xsd:float ;
+ mephisto:control_13 "0.0"^^xsd:float ;
+ mephisto:control_14 "0.0"^^xsd:float ;
+ mephisto:control_15 "0.0"^^xsd:float ;
+ mephisto:control_16 "0.0"^^xsd:float ;
+ ] .
+
mephisto:bank-instrument_osc
a pset:Preset ;
doap:license lic:Artistic-2.0 ;