annotate src/main.cpp @ 25:f4ebb87adec1
Added code to keep track of true position of voices in information space;
Two voice drawing methods display both true position target position while dragging;
string to Voice::status code no longer required;
refactored OSC message sending code;
added keys to control subdivision ratio for period and shift controls.
author |
samer |
date |
Sun, 05 Feb 2012 18:13:30 +0000 |
parents |
460c05dd74d0 |
children |
|
rev |
line source |
hekeus@6
|
1 #include "ofMain.h"
|
hekeus@6
|
2 #include "melodyTriangle.h"
|
hekeus@6
|
3 #include "ofAppGlutWindow.h"
|
hekeus@6
|
4
|
hekeus@6
|
5 #define HOST "localhost"
|
hekeus@6
|
6 #define PORT 7770
|
samer@23
|
7 #define NUMVOICES 4
|
samer@9
|
8 #define RECEIVEPORT 7771
|
hekeus@6
|
9
|
hekeus@6
|
10 //========================================================================
|
hekeus@6
|
11 int main(int argc, const char **argv ){
|
hekeus@6
|
12
|
hekeus@6
|
13 ofAppGlutWindow window;
|
hekeus@6
|
14
|
hekeus@6
|
15 if (argc>4 ? atoi(argv[4]) : false){
|
hekeus@6
|
16 ofSetupOpenGL(&window, 1280,800, OF_FULLSCREEN); // <-------- setup the GL context
|
hekeus@6
|
17 }else{
|
hekeus@6
|
18 ofSetupOpenGL(&window, 800,600, OF_WINDOW);
|
hekeus@6
|
19 }
|
hekeus@6
|
20 // this kicks off the running of my app
|
hekeus@6
|
21 // can be OF_WINDOW or OF_FULLSCREEN
|
hekeus@6
|
22 // pass in width and height too:
|
hekeus@6
|
23 ofRunApp( new melodyTriangle(argc>1 ? argv[1] : HOST,
|
hekeus@6
|
24 argc>2 ? atoi(argv[2]) : PORT,
|
hekeus@6
|
25 argc>3 ? atoi(argv[3]) : NUMVOICES,
|
hekeus@6
|
26 argc>5 ? atoi(argv[5]) : true,
|
hekeus@8
|
27 argc>6 ? atoi(argv[6]) : 0,
|
hekeus@8
|
28 argc>7 ? atoi(argv[7]) : RECEIVEPORT)
|
hekeus@8
|
29 );
|
hekeus@6
|
30
|
hekeus@6
|
31 }
|