Submit
Browse
Anonymous
Login
RSS
SuperCollider Code
Fork Code: just a start with Livid BASE
name
code content
LividBASE{ classvar <>defKeys,<>defMap,<>base,<>baseOut,<>baseIn; *init{ arg settings; this.defKeys = [\slider1,\btn1,\scene1,\scene1LEDs,\pad1]; this.defMap = Dictionary[ \slider1 ->1, \btn1-> 10, \scene1 -> 18, \scene1LEDs -> #[18,26], \pad1 ->36 ]; settings.do{|a| if(a != nil && a.size==2, {this.defMap.put(a[0],a[1])} ) }; this.initMIDI; } *initMIDI{ var baseFound=false; if(MIDIClient.initialized==false,{MIDIClient.init}); MIDIClient.sources.do{|a,b| if( baseFound==false && a.device == "Base" && a.name == "Controls", { baseFound=true; this.base = b; this.baseIn=MIDIIn(b); this.baseOut = MIDIOut.newByName("Base","Controls"); } ) }; if(this.base == nil, {Post << "BASE not found! base=="<< this.base << Char.nl}, { // generic midi func MIDIFunc.noteOn({arg val,num,chan,src; val.postln;"ooo".postln;}); MIDIFunc.noteOff({arg val,num,chan,src; val.postln;}); // MIDIFunc({}, // give a confirmation light show //this.mapToNotes this.hiBASE; } ); } /* "BASE FOUND!" LED sequence */ *hiBASE{ var seq=Pbind( \type, \midi, \chan, 16, \midiout, this.baseOut, \midinote,Pseq(this.defMap.at(\pad1)+(0..31)), \dur,0.007//Pbrown(0.1,0.6,length:32) ).play; } }
code description
getting livid base communicating.
use markdown for formating
category tags
comma separated, i.g. "wild, siren" (do not enter default SC class names, please)
ancestor(s)
comma separated identificators, i.g. "1-C,1-1,1-4M,1-x"
Private?
the code will be accessible by direct url and not visible in public activity
signup to submit public code without captcha
comment of change