SketchPad

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

Daily Sketches

Sketch 2015-06-02

        void ofApp::setup(){
    playing = true;
    note = 60;

    manager.setup();
    manager.toggleDebugUI();
    manager.add(&chain1, "tal-1", ofColor::blue);
    manager.add(&chain2, "tal-2", ofColor::red);

    bpm.setBpm(160);
    ofAddListener(bpm.beatEvent, this, &ofApp::play);
    bpm.start();
}

void ofApp::play(void){
    if(playing) {
        chain1.midi()->sendNoteOn(1, note);
    }
}

void ofApp::togglePlaying() {
    playing = !playing;
    if(!playing) {
        chain1.midi()->sendNoteOff(1, note);
    }
}

void ofApp::update(){
    manager.update();

    val = ofMap(sin(ofGetFrameNum() * 0.04), -1, 1, 30, 59);
    chain1.getReverb()->set(kReverbParam_DryWetMix, val);

    val = ofMap(cos(ofGetFrameNum() * 0.005), -1, 1, 0, 100);
    chain1.getSynth()->set(TALNoiseMaker_osc1tune, val);
    
    val = ofMap(cos(ofGetFrameNum() * 0.0005), -1, 1, 50  , 2 50);
    chain1.getFilter()->set(kLowPassParam_CutoffFrequency, val);
}
    

I don't even remember making this one. I think I'll be as surprised as anyone when I hear it. #eyeo