diff options
| author | Tim Redfern <tim@getdrop.com> | 2022-11-16 00:13:00 +0000 |
|---|---|---|
| committer | Tim Redfern <tim@getdrop.com> | 2022-11-16 00:13:00 +0000 |
| commit | 21a7fe9d7d125be58c4dcfa09db469e83f16780d (patch) | |
| tree | 9d26961e8dff36adcbdaf8d203092ad70338c40c /audioin | |
| parent | 93048304a2e9be1dcc1dbd400b06472c6519f912 (diff) | |
better osc stat message
Diffstat (limited to 'audioin')
| -rw-r--r-- | audioin/src/ofApp.cpp | 20 | ||||
| -rw-r--r-- | audioin/src/ofApp.h | 1 |
2 files changed, 13 insertions, 8 deletions
diff --git a/audioin/src/ofApp.cpp b/audioin/src/ofApp.cpp index cf454ce..b2d9810 100644 --- a/audioin/src/ofApp.cpp +++ b/audioin/src/ofApp.cpp @@ -60,6 +60,8 @@ void ofApp::draw(){ frameNum++; + ofSetWindowTitle(ofToString(ofGetFrameRate())); + } @@ -78,43 +80,45 @@ void ofApp::audioIn(float * input, int blockSize, int nChannels){ } - +void ofApp::printOscParams(){ + ofLog()<<(1000.0f/(SAMPLERATE/(ofGetWidth()/hScale)))<<"ms, scale: "<<vScale<<", width "<<lineWidth; +} //-------------------------------------------------------------- void ofApp::keyPressed(int key){ switch(key){ - case 'f':{ + case 'f':{ ofToggleFullscreen(); break; } case 'i':{ vScale*=1.1f; - ofLog()<< "vScale: "<<vScale; + printOscParams(); break; } case 'm':{ vScale/=1.1f; - ofLog()<< "vScale: "<<vScale; + printOscParams(); break; } case 'j':{ hScale*=1.1f; - ofLog()<< "hScale: "<<hScale; + printOscParams(); break; } case 'k':{ hScale/=1.1f; - ofLog()<< "hScale: "<<hScale; + printOscParams(); break; } case ']':{ lineWidth*=1.1f; - ofLog()<< "lineWidth: "<<lineWidth; + printOscParams(); break; } case '[':{ lineWidth/=1.1f; - ofLog()<< "lineWidth: "<<lineWidth; + printOscParams(); break; } default: diff --git a/audioin/src/ofApp.h b/audioin/src/ofApp.h index 8965aef..eeb8d21 100644 --- a/audioin/src/ofApp.h +++ b/audioin/src/ofApp.h @@ -62,6 +62,7 @@ class ofApp : public ofBaseApp{ void gotMessage(ofMessage msg); void audioIn(float * input, int bufferSize, int nChannels); + void printOscParams(); ofSoundStream soundStream; int blockSize; |
