diff options
| author | Tim Redfern <tim@eclectronics.org> | 2013-05-29 15:38:54 +0100 |
|---|---|---|
| committer | Tim Redfern <tim@eclectronics.org> | 2013-05-29 15:38:54 +0100 |
| commit | a720f370fdb8a79a70a218c1d7bcb9069f50ff9d (patch) | |
| tree | aee6b8eaff2b7e39b041d69398c9a6e9120673ca /src/testApp.cpp | |
| parent | 809d05f2b17409c0b18951c0107c7fc275621b0c (diff) | |
activate vamp
Diffstat (limited to 'src/testApp.cpp')
| -rwxr-xr-x | src/testApp.cpp | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/src/testApp.cpp b/src/testApp.cpp index c24f1ac..e66f892 100755 --- a/src/testApp.cpp +++ b/src/testApp.cpp @@ -23,7 +23,7 @@ void previewWindow::dragEvent(ofDragInfo dragInfo, ofxFenster* win){ int which=dx/parent->viewports[0].w; if (parent->viewports.size()==8&&dy>windowsize) which+=4; - cerr<<"drag received at "<<dx<<","<<dy<<" ,loading into window "<<which<<endl; + //cerr<<"drag received at "<<dx<<","<<dy<<" ,loading into window "<<which<<endl; parent->loadPalette(f,which); } @@ -42,6 +42,20 @@ void guiWindow::draw(){ parent->gui.draw(); + ofSetColor(255,255,255); + + + int sy=ofGetHeight() -30; + int sx=10; + + for (int i=0;i<parent->viewports.size()%4;i++){ + for (int j=0;j<parent->viewports.size()/4;j++){ + if (parent->viewports[j*4+i].Palette.isLoaded()){ + ofDrawBitmapString(parent->viewports[j*4+i].Palette.name,sx+(i*50),sy+(j*12)); //why not working + } + } + } + } void testApp::loadPalette(string &filename,int whichport){ if (filename.length()) { @@ -219,6 +233,17 @@ void testApp::setup(){ soundStream.setup(this, 0, 2, 44100, bufferSize, 4); + + string soname="qm-vamp-plugins.so"; + string id="qm-keydetector"; + + int rate =44100; + int channels=1; + int outputNo=0; + + vamphost.init(soname,id,channels,rate,outputNo); + + } @@ -251,6 +276,8 @@ void testApp::audioIn(float * input, int bufferSize, int nChannels){ control.bufferCounter++; + vamphost.process_frame(input,bufferSize); + } @@ -266,6 +293,8 @@ void testApp::update(){ control.fillwave=fillwave; control.waveheight=slidWave; control.fade=(uint8_t)fadeSlider; + + if (vamphost.feat.size()) cerr<<"found "<<vamphost.feat.size()<<" feature(s)\n"; } //-------------------------------------------------------------- |
