SketchPad

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

Daily Sketches

Sketch 2015-05-30

        ofxAudioUnitManager manager;
TALNoiseMakerChain talChain;
ofxBpm bpm;

void ofApp::setup(){
    manager.setup();
    manager.toggleDebugUI();
    manager.add(&talChain, "tal-one", ofColor::blue);

    playing = false;
    note = 60;
    
    ofAddListener(bpm.beatEvent, this, &ofApp::play);
    bpm.start();
    talChain.getFilter()->getUnit()->printParameterList();
}

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

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

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

    val = ofMap(sin(ofGetFrameNum() * 0.03), -1, 1, 0.4, 0.6);
    talChain.getSynth()->set(TALNoiseMaker_lfo2rate, val);

    val = ofMap(sin(ofGetFrameNum() * 0.06), -1, 1, 0.3, 0.8);
    talChain.getSynth()->set(TALNoiseMaker_envelopeeditoramount, val);

    val = ofMap(sin(ofGetFrameNum() * 0.45), -1, 1, 6900, 4000);
    talChain.getFilter()->set(kLowPassParam_CutoffFrequency, val);

    val = ofMap(sin(ofGetFrameNum() * 0.2), -1, 1, 10, 26);
    talChain.getFilter()->set(kLowPassParam_Resonance, val);
}

void ofApp::draw(){
    manager.draw();
}
    

First sound sketch. The result of a long journey finishing my own tools.