summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xnotes.txt5
-rw-r--r--src/ofxVamphost.cpp2
-rw-r--r--src/ofxVamphost.h1
-rwxr-xr-xsrc/testApp.cpp31
-rwxr-xr-xsrc/testApp.h1
-rwxr-xr-xsrc/viewport.h6
6 files changed, 40 insertions, 6 deletions
diff --git a/notes.txt b/notes.txt
index ee38915..bffc32f 100755
--- a/notes.txt
+++ b/notes.txt
@@ -63,7 +63,10 @@ phase offset affect scroll angle
onset randomise phase
retain palettes ---> load palettes into windows
+draw palettes names into GUI
no fill option
-http://design-seeds.com/index.php/search \ No newline at end of file
+http://design-seeds.com/index.php/search
+
+blanks ports? \ No newline at end of file
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"<<endl;
diff --git a/src/ofxVamphost.h b/src/ofxVamphost.h
index 245b7ff..637032b 100644
--- a/src/ofxVamphost.h
+++ b/src/ofxVamphost.h
@@ -41,6 +41,7 @@ class Vamphost{
PluginLoader::PluginKey key;
PluginLoader::PluginKeyList list;
+ Plugin::FeatureSet feat;
private:
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";
}
//--------------------------------------------------------------
diff --git a/src/testApp.h b/src/testApp.h
index 250198e..90bc4fc 100755
--- a/src/testApp.h
+++ b/src/testApp.h
@@ -102,6 +102,7 @@ class testApp : public ofxFensterListener {
ofSoundStream soundStream;
+ Vamphost vamphost;
};
diff --git a/src/viewport.h b/src/viewport.h
index 88e9835..b7b8910 100755
--- a/src/viewport.h
+++ b/src/viewport.h
@@ -4,8 +4,8 @@
#include "ofMain.h"
#include "ofxXmlSettings.h"
-static int bufferSize = 2048;
-static int oversample = 8;
+static int bufferSize = 1024;
+static int oversample = 4;
static int windowsize = 32;
static int previewscale = 5;
@@ -131,7 +131,7 @@ class viewport
void drawport(vpcontrol &control);
void draw(uint8_t brightness,float scale=1.0f);
ofFbo rb1,rb2;
- palette Palette;
+ palette Palette;
int w,h;
protected:
private: