summaryrefslogtreecommitdiff
path: root/liveengine/src/testApp.h
blob: fbe853763813190b264f6416d3719396d8724b35 (plain)
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
#pragma once

#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?

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

can draw 

*/



#define OF_ADDON_USING_OFXMIDIIN

#define NUM_NOTES 64
#define START_NOTE 36
#define NUM_CONTROLLERS 6
#define START_CONTROLLER 102


#include "ofxMidi.h"
#include "ofxSVG.h"
#include "ofxSVGTiny.h"

class testApp : public ofBaseApp, public ofxMidiListener{

	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);

		void toggleFPS();
		bool showFPS;

		ofxXmlSettings XML;

		unsigned char* controllers;
		unsigned char note;
		ofColor* controller_colours;

		ofImage grab;

		int midiChannel;

		ofxMidiIn	midiIn;

		void newMidiMessage(ofxMidiEventArgs& eventArgs);

		//ofxSVG drawing;
		ofxSVGTiny svg;
};