1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
|
#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<viewport*> viewports;
outputWindow *outWin;
previewWindow *prevWin;
int midiChannel;
ofxMidiIn midiIn;
void newMidiMessage(ofxMidiMessage& eventArgs);
playlist list;
ofxPanel gui;
ofParameter<bool> reverse;
//ofxToggle reverse;
ofParameter<bool> reversemain;
ofParameter<bool> controlColours;
ofParameter<bool> noteRandomiseColours;
ofParameter<bool> transparentBlack;
ofxButton resetDrawscale;
ofxButton resetFBscale;
ofxIntSlider fS;
ofParameter<int> fadeScale;
ofxIntSlider fB;
ofParameter<int> fadeBackground;
ofxFloatSlider dT;
ofParameter<float> decayTime;
ofxToggle oscScale;
ofxToggle breakOsc;
ofxToggle randomOsc;
ofxFloatSlider sA;
ofParameter<float> scaleAmplitude;
ofxFloatSlider sF;
ofParameter<float> scaleFrequency;
float randOffs;
};
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;
};
*/
|