SketchPad

Some web space to sketch, doodle and make notes. Made using these tools. See more of my work here.

Daily Sketches

Sketch 2015-07-05

        void ofApp::setup(){
    ofSetWindowShape(1000, 900);
    bpm = 60;
    playing = false;

    utils.setup();
    manager.setup();
    manager.toggleDebugUI();
    setupAudioUnits();
    setupTimeline();
}

void ofApp::setupAudioUnits() {
    manager.add(&chain1, "tal-one", ofColor::blue);
    chain1.link(&noiseMaker1).toMixer();
    manager.loadPresets(&chain1);
}

void ofApp::setupTimeline() {
    timeline.setup();
    timeline.setLoopType(OF_LOOP_NORMAL);
    timeline.setShowBPMGrid(true);
    timeline.enableSnapToBPM(true);
    timeline.setBPM(bpm);
    timeline.setDurationInSeconds(30);
    timeline.setOffset(ofVec2f(10, 480));
    timeline.setWidth(ofGetWidth() - 400);
    timeline.addCurves("lfo rate");
    timeline.addCurves("delay wet");
    timeline.addSwitches("midi events");
    ofAddListener(timeline.events().switched, this, &ofApp::switchFired);
}

void ofApp::update(){
    noiseMaker1.set(TALNoiseMaker_lfo2rate, timeline.getValue("lfo rate"));
    noiseMaker1.set(TALNoiseMaker_delaywet, timeline.getValue("delay wet"));
}

void ofApp::switchFired(ofxTLSwitchEventArgs &args) {
    string command = args.switchName + (args.on ? " ON" : " OFF");
    cout << endl << ofGetTimestampString() << endl;
    cout << "switch fired: " << command << endl;
    utils.executeMidiCommand(command, chain1.midi());
}
    

Dubstep wobble with echo

Sketch 2015-07-05