From a720f370fdb8a79a70a218c1d7bcb9069f50ff9d Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Wed, 29 May 2013 15:38:54 +0100 Subject: activate vamp --- src/ofxVamphost.cpp | 2 +- src/ofxVamphost.h | 1 + src/testApp.cpp | 31 ++++++++++++++++++++++++++++++- src/testApp.h | 1 + src/viewport.h | 6 +++--- 5 files changed, 36 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/ofxVamphost.cpp b/src/ofxVamphost.cpp index e5ef92b..7fd91d6 100644 --- a/src/ofxVamphost.cpp +++ b/src/ofxVamphost.cpp @@ -190,7 +190,7 @@ void Vamphost::process_frame(float *data,int samples_in_frame){ //I /think/ that the vamp plugin keeps processing through the plugbuf until it encounters 0s rt = RealTime::frame2RealTime(currentStep * stepSize, rate); - Plugin::FeatureSet feat=plugin->process(plugbuf, rt); + feat=plugin->process(plugbuf, rt); //if (feat[outputNo].size()>0) cerr<<"BEAT"<viewports[0].w; if (parent->viewports.size()==8&&dy>windowsize) which+=4; - cerr<<"drag received at "<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;iviewports.size()%4;i++){ + for (int j=0;jviewports.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 "<