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
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
|
#pragma once
//#include <GL/glxew.h>
#include "ofMain.h"
#include "ofxXmlSettings.h"
/*
modprobe snd-virmidi
have had problems with it not being recognised - rebuild seemed to fix it
6 controllers
each note switches in 6 new visuals which are at the same strengths
as the previous bunch
is it necessary to represent them seperately?
maybe take them all in, but initially modulate one picture on the strength of the strongest
maybe each object is a plugin and the 6 controllers affect 6 parameters of it
ie speed, matting type, colour tweak
object that plays when a note is received can be called a track, a sample, a bank, a layer?
object remembers playback head/ heads
initial footage set for each track: program change?
(does this leave any room for creative input) or set via gui?
video playback object
still image object
load files in gui - loadable area
creative input - alter layers live via AVS compatible system which also allows local MIDI control,
scripting, manipulating layers etc
probably pretty tricky to create a .ape loader - difficulty in recreating the windows GUI
probably a lot easier to think about a way of making a modular editor that can be manipulated live
nice to think about making scripted layers - using nseel or other
initially - divide screen into grid - play notes with fade
class that loads an svg and maps controllers to layers
layers are there but maybe its best to draw all of the colours mapped in some way rather than cutting out layers - colour transformation based on a hue angle
fix feedback - direction etc
all drawn/ scaled from middle
colours for svgs
multi screen
loader/ programme changer - seperate xml for main programme and for each content section
script engine for scaling
more specific colour filtering for photos
auto masks based on colour
wrap around/ scale textures
3d blocks
non random colours
option to randomise colours on each note
--make transparent
--interface for exploring and saving - swapping?
*/
#define OF_ADDON_USING_OFXMIDIIN
#include "ofxMidi.h"
#include "ofxFensterManager.h"
#include "ofxGui.h"
#include "viewport.h"
/*
enum PropertyAttribute {
None = 0,
ReadOnly = 1 << 0,
DontEnum = 1 << 1,
DontDelete = 1 << 2
};
*/
class previewWindow;
class guiWindow;
//#define GRAB_TEXTURE
class testApp : public ofxFensterListener, 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 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;
previewWindow *prevWin;
guiWindow *guiWin;
ofxFenster* win;
int midiChannel;
ofxMidiIn midiIn;
void newMidiMessage(ofxMidiMessage& eventArgs);
playlist list;
ofxPanel gui;
ofxToggle reverse;
ofxToggle reversemain;
ofxToggle controlColours;
ofxToggle noteRandomiseColours;
ofxToggle transparentBlack;
ofxButton resetDrawscale;
ofxButton resetFBscale;
ofxIntSlider fS;
ofxParameter<int> fadeScale;
ofxIntSlider fB;
ofxParameter<int> fadeBackground;
ofxFloatSlider dT;
ofxParameter<float> decayTime;
ofxToggle oscScale;
ofxToggle breakOsc;
ofxToggle randomOsc;
ofxFloatSlider sA;
ofxParameter<float> scaleAmplitude;
ofxFloatSlider sF;
ofxParameter<float> scaleFrequency;
float randOffs;
void resetDrawscalePressed(bool & pressed);
void resetFBscalePressed(bool & pressed);
};
class previewWindow: public ofxFensterListener{
public:
~previewWindow();
ofFbo *rb;
testApp *parent;
void setParent(testApp *p);
void setup();
void setBuffer(ofFbo *buffer);
void draw();
void keyPressed(int key, ofxFenster* win);
};
class guiWindow: public ofxFensterListener{
public:
~guiWindow();
testApp *parent;
void setup();
void setParent(testApp *p);
void draw();
void dragEvent(ofDragInfo dragInfo,ofxFenster* win);
void windowMoved(int x, int y);
};
|