summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mdaPiano.cpp9
-rw-r--r--src/mdaPiano.h2
2 files changed, 8 insertions, 3 deletions
diff --git a/src/mdaPiano.cpp b/src/mdaPiano.cpp
index 29b9404..1110c56 100644
--- a/src/mdaPiano.cpp
+++ b/src/mdaPiano.cpp
@@ -52,10 +52,15 @@ void mdaPiano::update() {
}
-void mdaPiano::setParameter(uint32_t index, float value)
+void mdaPiano::setParameter(unsigned char id, float value)
{
- programs[curProgram].param[index] = value;
+ if(id>=NPARAMS)
+ return;
+ *p(id+PARAM_OFFSET) = value;
update();
+#ifdef DEBUG
+ printf("changed %i to %f\n", id, value);
+#endif
}
diff --git a/src/mdaPiano.h b/src/mdaPiano.h
index ecfeba6..73f1404 100644
--- a/src/mdaPiano.h
+++ b/src/mdaPiano.h
@@ -20,7 +20,7 @@ public:
void load_samples(short**);
void handle_midi(uint32_t size, unsigned char* data);
- virtual void setParameter(uint32_t index, float value);
+ void setParameter(unsigned char, float);
private: