diff options
-rw-r--r-- | client.py | 1 | ||||
-rw-r--r-- | drums.py | 1 |
2 files changed, 2 insertions, 0 deletions
@@ -67,6 +67,7 @@ def lin_interp(frm, to, p): return p*to + (1-p)*frm def rgb_for_freq_amp(f, a): + a = max((min((a, 1.0)), 0.0)) pitchval = float(f - options.low_freq) / (options.high_freq - options.low_freq) if options.log_base == 0: try: @@ -38,6 +38,7 @@ if not args: def rgb_for_freq_amp(f, a): pitchval = float(f - options.low_freq) / (options.high_freq - options.low_freq) + a = max((min((a, 1.0)), 0.0)) if options.log_base == 0: try: pitchval = math.log(pitchval) / math.log(options.log_base) |