‹ SC: Fixed Number of DecimalsMIDI Pedals ›

anneVideotracking4

2019-01-21 22:33:44 visuals

A much-improved version of my old MaxMSPJitter application anneVideotracking

anneVideotracking4 screenshot

With this version, you can use 12 zones on a web camera video input to trigger MIDI, sound files, audio input (mics) and OSC messages (send to SuperCollider for example).

The zones include filters and different types of thresholds and calibration. The data can be on/off triggers and or continuous values.

(sorry for the terrible GUI design.)

Download the macOS standalone from /code/apps/#annevideotracking.

and here's the updated SuperCollider example that demonstrates how to use the OSC data to control some sine oscillators.

//to start: select all & cmd+enter
//to stop: cmd + .
(
n= 12;
s.latency= 0.05;
s.waitForBoot{
    var dlast= 0.dup(n);
    d= {Bus.control(s, 1)}.dup(n);
    e= {Bus.control(s, 1)}.dup(n);
    OSCFunc({|m|
        var index= m[1], val= m[2], diff= (val-dlast[index]).abs;
        //m.postln;
        d[index].set(val);
        e[index].set(diff);
        dlast.put(index, val);
    }, \anneVideoTracking);
    CmdPeriod.doOnce({d.do{|x| x.free}; e.do{|x| x.free}});
    SynthDef(\annetest, {
        var src= Mix({|i| SinOsc.ar(i*100+400, 0, LagUD.kr(In.kr(e[i].index), 0.01, 0.1))}.dup(n));
        Out.ar(0, Pan2.ar(src));
    }).add;
    s.sync;
    Synth(\annetest);
};
)
‹ SC: Fixed Number of DecimalsMIDI Pedals ›