diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2012-09-11 16:22:07 +0200 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2012-09-11 16:22:07 +0200 |
commit | ed15304dbbfc62b3da2b5c7bf5770efa1ffa6457 (patch) | |
tree | 2589de2875df3632efc93dc2a401491048e6b78e | |
parent | 0a5cb89744cbd737b73e2687fd546952caae0661 (diff) | |
download | digitale-debutanten-ed15304dbbfc62b3da2b5c7bf5770efa1ffa6457.tar.gz |
added comments clarifing that scaling target ranges may be inversed
-rw-r--r-- | lib/GenEvent.ck | 3 | ||||
-rw-r--r-- | lib/Scale.ck | 5 |
2 files changed, 8 insertions, 0 deletions
diff --git a/lib/GenEvent.ck b/lib/GenEvent.ck index ba73445..142b1a3 100644 --- a/lib/GenEvent.ck +++ b/lib/GenEvent.ck @@ -39,6 +39,9 @@ public class GenEvent extends Event { /* * Getter functions to scale `value' + * Note that "min" can be greater than "max", resulting in the + * desired inversion of scaling + * (just like min < max and 1-value was used). */ fun float getFloat() diff --git a/lib/Scale.ck b/lib/Scale.ck index 9eeea0a..c6b1a24 100644 --- a/lib/Scale.ck +++ b/lib/Scale.ck @@ -14,6 +14,11 @@ public class Scale extends Chubgraph { fun void __update() /* pseudo-private */ { + /* + * Note that "__out_from" can be greater than "__out_to", resulting in the + * desired inversion of scaling + * (just like __out_from < __out_to and -SAMPLE was used). + */ (__out_to-__out_from)/(__in_to-__in_from) => inlet.gain; __out_from - __in_from*inlet.gain() => __base.next; } |