aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lvz/audioeffectx.h16
-rw-r--r--lvz/gendata.cpp47
-rw-r--r--src/mdaBandisto.cpp4
-rw-r--r--src/mdaBeatBox.cpp2
-rw-r--r--src/mdaDX10.cpp22
-rw-r--r--src/mdaDelay.cpp10
-rw-r--r--src/mdaDither.cpp6
-rw-r--r--src/mdaDubDelay.cpp8
-rw-r--r--src/mdaImage.cpp2
-rw-r--r--src/mdaJX10.cpp34
-rw-r--r--src/mdaLeslie.cpp2
-rw-r--r--src/mdaLooplex.cpp12
-rw-r--r--src/mdaMultiBand.cpp4
-rw-r--r--src/mdaOverdrive.cpp6
-rw-r--r--src/mdaRezFilter.cpp2
-rw-r--r--src/mdaShepard.cpp2
-rw-r--r--src/mdaTalkBox.cpp2
-rw-r--r--src/mdaTestTone.cpp2
-rw-r--r--src/mdaVocoder.cpp2
19 files changed, 94 insertions, 91 deletions
diff --git a/lvz/audioeffectx.h b/lvz/audioeffectx.h
index 07a6302..0030065 100644
--- a/lvz/audioeffectx.h
+++ b/lvz/audioeffectx.h
@@ -70,18 +70,21 @@ public:
, URI("NIL")
, curProgram(0)
, numPrograms(progs)
+ , numParams(params)
, numInputs(0)
, numOutputs(0)
, sampleRate(44100)
{
}
- const char* getURI() { return URI; }
- const char* getUniqueID() { return uniqueID; }
- float getSampleRate() { return sampleRate; }
- uint32_t getNumInputs() { return numInputs; }
- uint32_t getNumOutputs() { return numOutputs; }
-
+ const char* getURI() { return URI; }
+ const char* getUniqueID() { return uniqueID; }
+ float getSampleRate() { return sampleRate; }
+ uint32_t getNumInputs() { return numInputs; }
+ uint32_t getNumOutputs() { return numOutputs; }
+ uint32_t getNumParameters() { return numParams; }
+
+ virtual void getParameterName(LvzInt32 index, char *label) = 0;
virtual bool getProductString(char* text) = 0;
void canMono() {}
@@ -103,6 +106,7 @@ protected:
const char* URI;
uint32_t curProgram;
uint32_t numPrograms;
+ uint32_t numParams;
uint32_t numInputs;
uint32_t numOutputs;
float sampleRate;
diff --git a/lvz/gendata.cpp b/lvz/gendata.cpp
index f1337a1..c426b80 100644
--- a/lvz/gendata.cpp
+++ b/lvz/gendata.cpp
@@ -49,37 +49,36 @@ write_data(AudioEffectX* effect, const char* lib_file_name)
os << "\t:symbol \"" << effect->getUniqueID() << "\" ;" << endl;
os << "\tdoap:name \"" << name << "\"";
- if (effect->getNumInputs() + effect->getNumOutputs() == 0)
- os << " ." << endl;
+ uint32_t num_params = effect->getNumParameters();
+ uint32_t num_audio_ins = effect->getNumInputs();
+ uint32_t num_audio_outs = effect->getNumOutputs();
+ uint32_t num_ports = num_params + num_audio_ins + num_audio_outs;
+
+ if (num_ports > 0)
+ os << " ;" << endl << "\t:port [" << endl;
else
- os << " ;" << endl;
+ os << " ." << endl;
- for (uint32_t i = 0; i < effect->getNumInputs(); ++i) {
- if (i == 0)
- os << "\t:port [" << endl;
+ uint32_t idx = 0;
+
+ for (uint32_t i = idx; i < num_params; ++i, ++idx) {
+ effect->getParameterName(i, name);
+ os << "\t\ta :InputPort, :ControlPort ;" << endl;
+ os << "\t\t:index" << " " << idx << " ;" << endl;
+ os << "\t\t:name \"" << name << "\" ;" << endl;
+ os << ((idx == num_ports - 1) ? "\t] ." : "\t] , [") << endl;
+ }
+ for (uint32_t i = 0; i < num_audio_ins; ++i, ++idx) {
os << "\t\ta :InputPort, :AudioPort ;" << endl;
- os << "\t\t:index" << " " << i << " ;" << endl;
-
- if (i == effect->getNumInputs() - 1) {
- os << "\t] " << (effect->getNumOutputs() ? ";" : ".") << endl;
- } else {
- os << "\t] , [" << endl;
- }
+ os << "\t\t:index" << " " << idx << " ;" << endl;
+ os << ((idx == num_ports - 1) ? "\t] ." : "\t] , [") << endl;
}
- for (uint32_t i = 0; i < effect->getNumOutputs(); ++i) {
- if (i == 0)
- os << "\t:port [" << endl;
-
+ for (uint32_t i = 0; i < num_audio_outs; ++i, ++idx) {
os << "\t\ta :OutputPort, :AudioPort ;" << endl;
- os << "\t\t:index" << " " << effect->getNumInputs() + i << " ;" << endl;
-
- if (i == effect->getNumInputs() - 1) {
- os << "\t] ." << endl;
- } else {
- os << "\t] , [" << endl;
- }
+ os << "\t\t:index" << " " << idx << " ;" << endl;
+ os << ((idx == num_ports - 1) ? "\t] ." : "\t] , [") << endl;
}
os.close();
diff --git a/src/mdaBandisto.cpp b/src/mdaBandisto.cpp
index 2b8d23a..e334a93 100644
--- a/src/mdaBandisto.cpp
+++ b/src/mdaBandisto.cpp
@@ -154,7 +154,7 @@ void mdaBandisto::getParameterName(LvzInt32 index, char *label)
{
switch(index)
{
- case 0: strcpy(label, "Listen:"); break;
+ case 0: strcpy(label, "Listen"); break;
case 1: strcpy(label, "L <> M"); break;
case 2: strcpy(label, "M <> H"); break;
case 3: strcpy(label, "L Dist"); break;
@@ -163,7 +163,7 @@ void mdaBandisto::getParameterName(LvzInt32 index, char *label)
case 6: strcpy(label, "L Out"); break;
case 7: strcpy(label, "M Out"); break;
case 8: strcpy(label, "H Out"); break;
- case 9: strcpy(label, "Mode:"); break;
+ case 9: strcpy(label, "Mode"); break;
}
}
diff --git a/src/mdaBeatBox.cpp b/src/mdaBeatBox.cpp
index 7fdf6c3..5297278 100644
--- a/src/mdaBeatBox.cpp
+++ b/src/mdaBeatBox.cpp
@@ -223,7 +223,7 @@ void mdaBeatBox::getParameterName(LvzInt32 index, char *label)
case 7: strcpy(label, "Snr Trig"); break;
case 8: strcpy(label, "Snr Mix"); break;
case 9: strcpy(label, "Dynamics"); break;
- case 10: strcpy(label, "Record:"); break;
+ case 10: strcpy(label, "Record"); break;
case 11: strcpy(label, "Thru Mix"); break;
}
}
diff --git a/src/mdaDX10.cpp b/src/mdaDX10.cpp
index 3888222..f3b7714 100644
--- a/src/mdaDX10.cpp
+++ b/src/mdaDX10.cpp
@@ -244,18 +244,18 @@ void mdaDX10::getParameterName(LvzInt32 index, char *label)
{
switch (index)
{
- case 0: strcpy(label, "Attack "); break;
- case 1: strcpy(label, "Decay "); break;
- case 2: strcpy(label, "Release "); break;
- case 3: strcpy(label, "Coarse "); break;
- case 4: strcpy(label, "Fine "); break;
+ case 0: strcpy(label, "Attack"); break;
+ case 1: strcpy(label, "Decay"); break;
+ case 2: strcpy(label, "Release"); break;
+ case 3: strcpy(label, "Coarse"); break;
+ case 4: strcpy(label, "Fine"); break;
case 5: strcpy(label, "Mod Init"); break;
- case 6: strcpy(label, "Mod Dec "); break;
- case 7: strcpy(label, "Mod Sus "); break;
- case 8: strcpy(label, "Mod Rel "); break;
- case 9: strcpy(label, "Mod Vel "); break;
- case 10: strcpy(label, "Vibrato "); break;
- case 11: strcpy(label, "Octave "); break;
+ case 6: strcpy(label, "Mod Dec"); break;
+ case 7: strcpy(label, "Mod Sus"); break;
+ case 8: strcpy(label, "Mod Rel"); break;
+ case 9: strcpy(label, "Mod Vel"); break;
+ case 10: strcpy(label, "Vibrato"); break;
+ case 11: strcpy(label, "Octave"); break;
case 12: strcpy(label, "FineTune"); break;
case 13: strcpy(label, "Waveform"); break;
case 14: strcpy(label, "Mod Thru"); break;
diff --git a/src/mdaDelay.cpp b/src/mdaDelay.cpp
index a02c932..d05f599 100644
--- a/src/mdaDelay.cpp
+++ b/src/mdaDelay.cpp
@@ -135,12 +135,12 @@ void mdaDelay::getParameterName(LvzInt32 index, char *label)
{
switch(index)
{
- case 0: strcpy(label, "L Delay "); break;
- case 1: strcpy(label, "R Delay "); break;
+ case 0: strcpy(label, "L Delay"); break;
+ case 1: strcpy(label, "R Delay"); break;
case 2: strcpy(label, "Feedback"); break;
- case 3: strcpy(label, "Fb Tone "); break;
- case 4: strcpy(label, "FX Mix "); break;
- case 5: strcpy(label, "Output "); break;
+ case 3: strcpy(label, "Fb Tone"); break;
+ case 4: strcpy(label, "FX Mix"); break;
+ case 5: strcpy(label, "Output"); break;
}
}
diff --git a/src/mdaDither.cpp b/src/mdaDither.cpp
index 03a2e09..4031104 100644
--- a/src/mdaDither.cpp
+++ b/src/mdaDither.cpp
@@ -110,10 +110,10 @@ void mdaDither::getParameterName(LvzInt32 index, char *label)
switch(index)
{
case 0: strcpy(label, "Word Len"); break;
- case 1: strcpy(label, "Dither "); break;
+ case 1: strcpy(label, "Dither"); break;
case 2: strcpy(label, "Dith Amp"); break;
- case 3: strcpy(label, "DC Trim "); break;
- case 4: strcpy(label, "Zoom... "); break;
+ case 3: strcpy(label, "DC Trim"); break;
+ case 4: strcpy(label, "Zoom"); break;
}
}
diff --git a/src/mdaDubDelay.cpp b/src/mdaDubDelay.cpp
index 7bfe8b8..19c4757 100644
--- a/src/mdaDubDelay.cpp
+++ b/src/mdaDubDelay.cpp
@@ -127,13 +127,13 @@ void mdaDubDelay::getParameterName(LvzInt32 index, char *label)
{
switch(index)
{
- case 0: strcpy(label, "Delay "); break;
+ case 0: strcpy(label, "Delay"); break;
case 1: strcpy(label, "Feedback"); break;
- case 2: strcpy(label, "Fb Tone "); break;
+ case 2: strcpy(label, "Fb Tone"); break;
case 3: strcpy(label, "LFO Dep."); break;
case 4: strcpy(label, "LFO Rate"); break;
- case 5: strcpy(label, "FX Mix "); break;
- case 6: strcpy(label, "Output "); break;
+ case 5: strcpy(label, "FX Mix"); break;
+ case 6: strcpy(label, "Output"); break;
}
}
diff --git a/src/mdaImage.cpp b/src/mdaImage.cpp
index b2b9019..0b42d35 100644
--- a/src/mdaImage.cpp
+++ b/src/mdaImage.cpp
@@ -126,7 +126,7 @@ void mdaImage::getParameterName(LvzInt32 index, char *label)
{
switch(index)
{
- case 0: strcpy(label, "Mode:"); break;
+ case 0: strcpy(label, "Mode"); break;
case 1: strcpy(label, "S Width"); break;
case 2: strcpy(label, "S Pan"); break;
case 3: strcpy(label, "M Level"); break;
diff --git a/src/mdaJX10.cpp b/src/mdaJX10.cpp
index 07c6e95..1a44e55 100644
--- a/src/mdaJX10.cpp
+++ b/src/mdaJX10.cpp
@@ -336,37 +336,37 @@ void mdaJX10::getParameterName(LvzInt32 index, char *label)
{
switch (index)
{
- case 0: strcpy(label, "OSC Mix "); break;
+ case 0: strcpy(label, "OSC Mix"); break;
case 1: strcpy(label, "OSC Tune"); break;
case 2: strcpy(label, "OSC Fine"); break;
- case 3: strcpy(label, "Glide "); break;
+ case 3: strcpy(label, "Glide"); break;
case 4: strcpy(label, "Gld Rate"); break;
case 5: strcpy(label, "Gld Bend"); break;
case 6: strcpy(label, "VCF Freq"); break;
case 7: strcpy(label, "VCF Reso"); break;
- case 8: strcpy(label, "VCF Env "); break;
+ case 8: strcpy(label, "VCF Env"); break;
- case 9: strcpy(label, "VCF LFO "); break;
- case 10: strcpy(label, "VCF Vel "); break;
- case 11: strcpy(label, "VCF Att "); break;
+ case 9: strcpy(label, "VCF LFO"); break;
+ case 10: strcpy(label, "VCF Vel"); break;
+ case 11: strcpy(label, "VCF Att"); break;
- case 12: strcpy(label, "VCF Dec "); break;
- case 13: strcpy(label, "VCF Sus "); break;
- case 14: strcpy(label, "VCF Rel "); break;
+ case 12: strcpy(label, "VCF Dec"); break;
+ case 13: strcpy(label, "VCF Sus"); break;
+ case 14: strcpy(label, "VCF Rel"); break;
- case 15: strcpy(label, "ENV Att "); break;
- case 16: strcpy(label, "ENV Dec "); break;
- case 17: strcpy(label, "ENV Sus "); break;
+ case 15: strcpy(label, "ENV Att"); break;
+ case 16: strcpy(label, "ENV Dec"); break;
+ case 17: strcpy(label, "ENV Sus"); break;
- case 18: strcpy(label, "ENV Rel "); break;
+ case 18: strcpy(label, "ENV Rel"); break;
case 19: strcpy(label, "LFO Rate"); break;
- case 20: strcpy(label, "Vibrato "); break;
+ case 20: strcpy(label, "Vibrato"); break;
- case 21: strcpy(label, "Noise "); break;
- case 22: strcpy(label, "Octave "); break;
- default: strcpy(label, "Tuning ");
+ case 21: strcpy(label, "Noise"); break;
+ case 22: strcpy(label, "Octave"); break;
+ default: strcpy(label, "Tuning");
}
}
diff --git a/src/mdaLeslie.cpp b/src/mdaLeslie.cpp
index 95ce97c..bb2c002 100644
--- a/src/mdaLeslie.cpp
+++ b/src/mdaLeslie.cpp
@@ -187,7 +187,7 @@ void mdaLeslie::getParameterName(LvzInt32 index, char *label)
{
switch(index)
{
- case 0: strcpy(label, "Speed:"); break;
+ case 0: strcpy(label, "Mode"); break;
case 1: strcpy(label, "Lo Width"); break;
case 2: strcpy(label, "Lo Throb"); break;
case 3: strcpy(label, "Hi Width"); break;
diff --git a/src/mdaLooplex.cpp b/src/mdaLooplex.cpp
index 67c3262..000aa0b 100644
--- a/src/mdaLooplex.cpp
+++ b/src/mdaLooplex.cpp
@@ -349,13 +349,13 @@ void mdaLooplex::getParameterName(LvzInt32 index, char *label)
{
switch (index)
{
- case 0: strcpy(label, "Max Del "); break;
- case 1: strcpy(label, "Reset "); break;
- case 2: strcpy(label, "Record "); break;
- case 3: strcpy(label, "In Mix "); break;
- case 4: strcpy(label, "In Pan "); break;
+ case 0: strcpy(label, "Max Del"); break;
+ case 1: strcpy(label, "Reset"); break;
+ case 2: strcpy(label, "Record"); break;
+ case 3: strcpy(label, "In Mix"); break;
+ case 4: strcpy(label, "In Pan"); break;
case 5: strcpy(label, "Feedback"); break;
- case 6: strcpy(label, "Out Mix "); break;
+ case 6: strcpy(label, "Out Mix"); break;
default: strcpy(label, " ");
}
diff --git a/src/mdaMultiBand.cpp b/src/mdaMultiBand.cpp
index af05c0c..ec9cae3 100644
--- a/src/mdaMultiBand.cpp
+++ b/src/mdaMultiBand.cpp
@@ -179,7 +179,7 @@ void mdaMultiBand::getParameterName(LvzInt32 index, char *label)
{
switch(index)
{
- case 0: strcpy(label, "Listen:"); break;
+ case 0: strcpy(label, "Listen"); break;
case 1: strcpy(label, "L <> M"); break;
case 2: strcpy(label, "M <> H"); break;
case 3: strcpy(label, "L Comp"); break;
@@ -191,7 +191,7 @@ void mdaMultiBand::getParameterName(LvzInt32 index, char *label)
case 9: strcpy(label, "Attack"); break;
case 10: strcpy(label, "Release"); break;
case 11: strcpy(label, "Stereo"); break;
- case 12: strcpy(label, "Process:"); break;
+ case 12: strcpy(label, "Process"); break;
}
}
diff --git a/src/mdaOverdrive.cpp b/src/mdaOverdrive.cpp
index e7b0440..9de651c 100644
--- a/src/mdaOverdrive.cpp
+++ b/src/mdaOverdrive.cpp
@@ -73,9 +73,9 @@ void mdaOverdrive::getParameterName(LvzInt32 index, char *label)
{
switch(index)
{
- case 0: strcpy(label, "Drive "); break;
- case 1: strcpy(label, "Muffle "); break;
- case 2: strcpy(label, "Output "); break;
+ case 0: strcpy(label, "Drive"); break;
+ case 1: strcpy(label, "Muffle"); break;
+ case 2: strcpy(label, "Output"); break;
}
}
diff --git a/src/mdaRezFilter.cpp b/src/mdaRezFilter.cpp
index 673171d..4556315 100644
--- a/src/mdaRezFilter.cpp
+++ b/src/mdaRezFilter.cpp
@@ -130,7 +130,7 @@ void mdaRezFilter::getParameterName(LvzInt32 index, char *label)
case 5: strcpy(label, "Release"); break;
case 6: strcpy(label, "LFO->VCF"); break;
case 7: strcpy(label, "LFO Rate"); break;
- case 8: strcpy(label, "Trigger:"); break;
+ case 8: strcpy(label, "Trigger"); break;
case 9: strcpy(label, "Max Freq"); break;
}
}
diff --git a/src/mdaShepard.cpp b/src/mdaShepard.cpp
index 08d1007..a6a0de8 100644
--- a/src/mdaShepard.cpp
+++ b/src/mdaShepard.cpp
@@ -108,7 +108,7 @@ void mdaShepard::getParameterName(LvzInt32 index, char *label)
{
switch(index)
{
- case 0: strcpy(label, "Mode:"); break;
+ case 0: strcpy(label, "Mode"); break;
case 1: strcpy(label, "Rate"); break;
case 2: strcpy(label, "Output"); break;
}
diff --git a/src/mdaTalkBox.cpp b/src/mdaTalkBox.cpp
index 5044031..b67bedc 100644
--- a/src/mdaTalkBox.cpp
+++ b/src/mdaTalkBox.cpp
@@ -146,7 +146,7 @@ void mdaTalkBox::getParameterName(LvzInt32 index, char *label)
{
case 0: strcpy(label, "Wet"); break;
case 1: strcpy(label, "Dry"); break;
- case 2: strcpy(label, "Carrier:"); break;
+ case 2: strcpy(label, "Carrier"); break;
case 3: strcpy(label, "Quality"); break;
default: strcpy(label, "");
}
diff --git a/src/mdaTestTone.cpp b/src/mdaTestTone.cpp
index 2aa5645..3f82ee1 100644
--- a/src/mdaTestTone.cpp
+++ b/src/mdaTestTone.cpp
@@ -307,7 +307,7 @@ void mdaTestTone::getParameterName(LvzInt32 index, char *label)
{
switch(index)
{
- case 0: strcpy(label, "Mode:"); break;
+ case 0: strcpy(label, "Mode"); break;
case 1: strcpy(label, "Level"); break;
case 2: strcpy(label, "Channel"); break;
case 3: strcpy(label, "F1"); break;
diff --git a/src/mdaVocoder.cpp b/src/mdaVocoder.cpp
index 5fca474..e4f1b5d 100644
--- a/src/mdaVocoder.cpp
+++ b/src/mdaVocoder.cpp
@@ -182,7 +182,7 @@ void mdaVocoder::getParameterName(LvzInt32 index, char *label)
{
switch(index)
{
- case 0: strcpy(label, "Mod In:"); break;
+ case 0: strcpy(label, "Mod In"); break;
case 1: strcpy(label, "Output"); break;
case 2: strcpy(label, "Hi Thru"); break;
case 3: strcpy(label, "Hi Band"); break;