From ed15304dbbfc62b3da2b5c7bf5770efa1ffa6457 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Tue, 11 Sep 2012 16:22:07 +0200 Subject: added comments clarifing that scaling target ranges may be inversed --- lib/GenEvent.ck | 3 +++ lib/Scale.ck | 5 +++++ 2 files changed, 8 insertions(+) (limited to 'lib') 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; } -- cgit v1.2.3