From 09cc4edf045c3a691a2af76556d0250433e51cff Mon Sep 17 00:00:00 2001 From: Eugene Petkevich Date: Wed, 14 Dec 2022 02:06:39 +0100 Subject: [PATCH] fix bind callbacks for Nodes --- extensions/classes/midibind.sc | 10 +++++----- startup.scd | 8 ++++++-- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/extensions/classes/midibind.sc b/extensions/classes/midibind.sc index ec82b63..2a07c64 100644 --- a/extensions/classes/midibind.sc +++ b/extensions/classes/midibind.sc @@ -1,6 +1,6 @@ + Node { bindMul {|param, divisor=1| - {|d| + ^{|d| this.get(param, { |v| var newVal = v*((d)/divisor).midiratio; this.set(param, newVal); @@ -10,7 +10,7 @@ } bindAdd {|param, divisor=1| - {|d| + ^{|d| this.get(param, { |v| var newVal = v+(d/divisor); this.set(param, newVal); @@ -20,7 +20,7 @@ } bindRange {|param, start, end| - {|v| + ^{|v| var newVal = v.linlin(0, 1, start, end); this.set(param, newVal); "%: % = %\n".postf(this, param, newVal); @@ -29,7 +29,7 @@ bindWarp {|param, warp=(\lin.asWarp), dict=nil| warp = warp.asWarp; - {|v| + ^{|v| var newVal = warp.map(v); this.set(param, newVal); "%: % = %\n".postf(this, param, newVal); @@ -37,4 +37,4 @@ } } -} \ No newline at end of file +} diff --git a/startup.scd b/startup.scd index a701012..410d5b4 100644 --- a/startup.scd +++ b/startup.scd @@ -2,14 +2,18 @@ //s.options.outDevice = "MA WFRIENDZ"; //s.options.outDevice = "MacBook Air Speakers"; //s.options.outDevice = "External Headphones"; +//s.options.outDevice = "EDIFIER R1080BT"; +s.options.outDevice = "Scarlett 2i4 USB"; +//s.options.inDevice = "MacBook Air Microphone"; +s.options.inDevice = "Scarlett 2i4 USB"; s.options.maxNodes = 128 * 1024; s.options.maxSynthDefs = 32 * 1024; s.options.memSize = 1024 * 1024; s.options.numBuffers = 32 * 1024; s.options.numAudioBusChannels = 32 * 1024; s.options.numControlBusChannels = 256 * 1024; -s.options.numInputBusChannels = 16; -s.options.numOutputBusChannels = 16; +s.options.numInputBusChannels = 2; +s.options.numOutputBusChannels = 4; // ==== Midi setup MIDIClient.init; -- 2.17.1