diff options
author | rekado <rekado@elephly.net> | 2013-01-14 21:22:24 +0800 |
---|---|---|
committer | rekado <rekado@elephly.net> | 2013-01-14 21:22:24 +0800 |
commit | f4e5570ed047b2975321786cb3093bcad8a3224f (patch) | |
tree | 28bab7c552bc84e6087e98fac1fec2352365ee75 /src | |
parent | 2b7b9db59fe837838df10b686c7aacd0e05f3d7a (diff) |
replace setParameter
Diffstat (limited to 'src')
-rw-r--r-- | src/mdaPiano.cpp | 9 | ||||
-rw-r--r-- | src/mdaPiano.h | 2 |
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: |