#pragma once #include "ofMain.h" #include "ofEvents.h" #include "ofxXmlSettings.h" #include "ofxFensterManager.h" #define OF_ADDON_USING_OFXMIDIIN #include "ofxMidi.h" #include "ofxGui.h" #include "viewport.h" //converting to new fenster // class previewWindow; class outputWindow; class ofApp : public ofBaseApp, public ofxMidiListener{ public: void setup(); void update(); void draw(); void keyPressed(int key, ofxFenster* win); void keyPressed(int key); void keyReleased(int key); void mouseMoved(int x, int y ); void mouseDragged(int x, int y, int button); void mousePressed(int x, int y, int button); void mouseReleased(int x, int y, int button); void windowResized(int w, int h); void gotMessage(ofMessage msg); void dragEvent(ofDragInfo dragInfo); void dragEvent(ofDragInfo dragInfo,ofxFenster* win); void previewMouse(int x, int y, int button); void mousePressedEvent(ofMouseEventArgs &args); void keyPressedEvent(ofKeyEventArgs &args); void windowEvent(ofResizeEventArgs &args); void nmidiMessage(int event,int data1, int data2); void makeColours(); void toggleFPS(); bool showFPS; ofxXmlSettings XML; unsigned char* controllers; int note, mode; //to be moved into svg object gui bool debug; bool fullscreenoutput; float lastnoteTime; int fadetime; int rotate; float scale,fscale; int xshift,yshift; ofColor* controller_colours; float colShift; viewport vp1,vp2; vector viewports; outputWindow *outWin; previewWindow *prevWin; int midiChannel; ofxMidiIn midiIn; void newMidiMessage(ofxMidiMessage& eventArgs); playlist list; ofxPanel gui; ofParameter reverse; //ofxToggle reverse; ofParameter reversemain; ofParameter controlColours; ofParameter noteRandomiseColours; ofParameter transparentBlack; ofxButton resetDrawscale; ofxButton resetFBscale; ofxIntSlider fS; ofParameter fadeScale; ofxIntSlider fB; ofParameter fadeBackground; ofxFloatSlider dT; ofParameter decayTime; ofxToggle oscScale; ofxToggle breakOsc; ofxToggle randomOsc; ofxFloatSlider sA; ofParameter scaleAmplitude; ofxFloatSlider sF; ofParameter scaleFrequency; float randOffs; void resetDrawscalePressed(bool & pressed); void resetFBscalePressed(bool & pressed); }; class previewWindow: public ofxFenster{ public: ~previewWindow(); ofFbo *rb; ofApp *parent; void setParent(ofBaseApp *p); void setup(); void setBuffer(ofFbo *buffer); void draw(); }; class outputWindow: public ofxFenster{ public: ~outputWindow(); ofApp *parent; void setup(); void setParent(ofApp *p); void draw(); void windowMoved(int x, int y); void keyPressed(int key, ofxFenster* win); }; /* class CustomWindow : public ofxFenster{ public: void setup(){ setWindowShape(1280, 720); setWindowPosition(310, 0); setWindowTitle("SECOND WINDOW"); } void update(){ radius = sin(ofGetFrameNum()*.06)*100; } void draw(){ ofBackground(0); ofNoFill(); ofSetColor(100); ofLine(mouseX, 0, mouseX, getHeight()); ofLine(0, mouseY, getWidth(), mouseY); ofSetColor(255); ofCircle(getWidth()*.5, getHeight()*.5, radius); } void keyPressed(int key){ cout << "KEY PRESSED " << (char)key << endl; } void keyReleased(int key){ cout << "KEY RELEASED " << (char)key << endl; } float radius; }; class ofApp : public ofBaseApp{ public: void setup(); void update(); void draw(); void keyPressed(int key); void keyReleased(int key); void mouseMoved(int x, int y ); void mouseDragged(int x, int y, int button); void mousePressed(int x, int y, int button); void mouseReleased(int x, int y, int button); void windowResized(int w, int h); void dragEvent(ofDragInfo dragInfo); void gotMessage(ofMessage msg); CustomWindow window; }; */