FFLV2Ktl a class for handling mappings of the Faderfox LV2

Inherits from: MIDIKtl

The Faderfox LV2 produces mainly MIDI control messages.

It has several switchable areas, and some controllers send 

increment values rather than values between 1-127. 

The list of  control names (ctlNames) is not complete yet, 

as there are multiple modes which all send different controller numbers.

(Needs more time and patience to finish.)  

// to do: how to map to editor? 

// how to map to proxymixer?

// support incremental controllers in proxies? 

// proxy.change(<param>, 0.03 (normalized range)); 

f = FFLV2Ktl.new();

f = FFLV2Ktl.new(-1097703516); // just that USB location

Class variables 

FFLV2Ktl.verbose = true;

FFLV2Ktl.verbose = false;

f.mapCC(\sl1, { |ch, cc, val| val.postln })

f.mapCC(\joyXfx1, { |ch, cc, val| val.postln })

f.mapCC(\potAsend, { |ch, cc, val| val.postln })

// sends just up or down increments

f.mapCC(\potAclip, { |ch, cc, val| val.postln })



// first sketch for how to map to a proxymixer: 

n = NdefMixer();


[\sl1, \sl2, \sl3].do { |key, i|

f.mapCC(key, { |cc, chan, val| 

n.pxMons[i].proxy.softVol_((val / 127).squared);



Spec.add(\freq1, \freq);

Spec.add(\freq2, \freq);

[\potAsend, \potBsend, \potCsend].do { |key, i|

f.mapCC(key, { |cc, chan, val| 

var proxy = n.editor.proxy; 

var paramname = n.editor.editKeys[i].postcs;

proxy.set(paramname, paramname.asSpec.map(val / 127));