diff options
| author | Comment <tim@gray.(none)> | 2013-01-24 18:07:04 +0000 |
|---|---|---|
| committer | Comment <tim@gray.(none)> | 2013-01-24 18:07:04 +0000 |
| commit | 3bf0663e94b6335cb748a50a8b95e8a98d2a0630 (patch) | |
| tree | a82627776c3bdeedbc99e2b6dcf97b78328a5047 /liveengine | |
| parent | e54790009e0d7b6ae5cc4d3e54880ff0bdc63f86 (diff) | |
folded kinect into main branch
Diffstat (limited to 'liveengine')
35 files changed, 541 insertions, 244 deletions
diff --git a/liveengine/addons.make b/liveengine/addons.make index 98f5fd6..8d01bd5 100755 --- a/liveengine/addons.make +++ b/liveengine/addons.make @@ -3,4 +3,7 @@ ofxMidi ofxSVGTiny ofxFenster ofxGui +ofxAssets +ofxExtras +ofxSpriteManager ofxOpenNI diff --git a/liveengine/bin/data/american_football.xml b/liveengine/bin/data/american_football.xml index 4a52a30..4a52a30 100644..100755 --- a/liveengine/bin/data/american_football.xml +++ b/liveengine/bin/data/american_football.xml diff --git a/liveengine/bin/data/barcelona.xml b/liveengine/bin/data/barcelona.xml index 29d0a81..29d0a81 100644..100755 --- a/liveengine/bin/data/barcelona.xml +++ b/liveengine/bin/data/barcelona.xml diff --git a/liveengine/bin/data/birds.xml b/liveengine/bin/data/birds.xml index 8ffd4d6..8ffd4d6 100644..100755 --- a/liveengine/bin/data/birds.xml +++ b/liveengine/bin/data/birds.xml diff --git a/liveengine/bin/data/computers.xml b/liveengine/bin/data/computers.xml index d9be7e8..d9be7e8 100644..100755 --- a/liveengine/bin/data/computers.xml +++ b/liveengine/bin/data/computers.xml diff --git a/liveengine/bin/data/crests.xml b/liveengine/bin/data/crests.xml index 6f5103c..6f5103c 100644..100755 --- a/liveengine/bin/data/crests.xml +++ b/liveengine/bin/data/crests.xml diff --git a/liveengine/bin/data/cricket.xml b/liveengine/bin/data/cricket.xml index b6f1123..b6f1123 100644..100755 --- a/liveengine/bin/data/cricket.xml +++ b/liveengine/bin/data/cricket.xml diff --git a/liveengine/bin/data/dancing.xml b/liveengine/bin/data/dancing.xml index 74901dd..74901dd 100644..100755 --- a/liveengine/bin/data/dancing.xml +++ b/liveengine/bin/data/dancing.xml diff --git a/liveengine/bin/data/food.xml b/liveengine/bin/data/food.xml index 44c1514..44c1514 100644..100755 --- a/liveengine/bin/data/food.xml +++ b/liveengine/bin/data/food.xml diff --git a/liveengine/bin/data/insects.xml b/liveengine/bin/data/insects.xml index 534e45c..0d78831 100644..100755 --- a/liveengine/bin/data/insects.xml +++ b/liveengine/bin/data/insects.xml @@ -1,68 +1,67 @@ -<?xml version='1.0' encoding='utf-8'?> -<playlist name="Insects"> - <svglayer note="36" file="insects/Ag01036x.wmf.svg"/> - <svglayer note="37" file="insects/Bit1120.wmf.svg"/> - <svglayer note="38" file="insects/Bit1123.wmf.svg"/> - <svglayer note="39" file="insects/Bit1139.wmf.svg"/> - <svglayer note="40" file="insects/MMA00001.wmf.svg"/> - <svglayer note="41" file="insects/MMA00002.wmf.svg"/> - <svglayer note="42" file="insects/MMA00003.wmf.svg"/> - <svglayer note="43" file="insects/MMA00004.wmf.svg"/> - <svglayer note="44" file="insects/MMA00005.wmf.svg"/> - <svglayer note="45" file="insects/MMA00006.wmf.svg"/> - <svglayer note="46" file="insects/MMA00007.wmf.svg"/> - <svglayer note="47" file="insects/MMA00008.wmf.svg"/> - <svglayer note="48" file="insects/MMA00009.wmf.svg"/> - <svglayer note="49" file="insects/MMA00010.wmf.svg"/> - <svglayer note="50" file="insects/MMA00011.wmf.svg"/> - <svglayer note="51" file="insects/MMA00012.wmf.svg"/> - <svglayer note="52" file="insects/MMA00013.wmf.svg"/> - <svglayer note="53" file="insects/MMA00014.wmf.svg"/> - <svglayer note="54" file="insects/MMA00015.wmf.svg"/> - <svglayer note="55" file="insects/MMA00016.wmf.svg"/> - <svglayer note="56" file="insects/MMA00017.wmf.svg"/> - <svglayer note="57" file="insects/MMA00018.wmf.svg"/> - <svglayer note="58" file="insects/MMA00019.wmf.svg"/> - <svglayer note="59" file="insects/MMA00020.wmf.svg"/> - <svglayer note="60" file="insects/MMA00021.wmf.svg"/> - <svglayer note="61" file="insects/MMA00022.wmf.svg"/> - <svglayer note="62" file="insects/MMA00023.wmf.svg"/> - <svglayer note="63" file="insects/MMA00024.wmf.svg"/> - <svglayer note="64" file="insects/MMA00025.wmf.svg"/> - <svglayer note="65" file="insects/MMA00026.wmf.svg"/> - <svglayer note="66" file="insects/MMA00027.wmf.svg"/> - <svglayer note="67" file="insects/MMA00028.wmf.svg"/> - <svglayer note="68" file="insects/MMA00029.wmf.svg"/> - <svglayer note="69" file="insects/MMA00030.wmf.svg"/> - <svglayer note="70" file="insects/MMA00031.wmf.svg"/> - <svglayer note="71" file="insects/MMA00032.wmf.svg"/> - <svglayer note="72" file="insects/MMA00033.wmf.svg"/> - <svglayer note="73" file="insects/MMA00034.wmf.svg"/> - <svglayer note="74" file="insects/MMA00035.wmf.svg"/> - <svglayer note="75" file="insects/MMA00036.wmf.svg"/> - <svglayer note="76" file="insects/MMA00037.wmf.svg"/> - <svglayer note="77" file="insects/MMA00038.wmf.svg"/> - <svglayer note="78" file="insects/MMA00039.wmf.svg"/> - <svglayer note="79" file="insects/MMA00040.wmf.svg"/> - <svglayer note="80" file="insects/MMA00041.wmf.svg"/> - <svglayer note="81" file="insects/MMA00042.wmf.svg"/> - <svglayer note="82" file="insects/MMA00043.wmf.svg"/> - <svglayer note="83" file="insects/MMA00044.wmf.svg"/> - <svglayer note="84" file="insects/MMA00045.wmf.svg"/> - <svglayer note="85" file="insects/MMA00046.wmf.svg"/> - <svglayer note="86" file="insects/MMA00047.wmf.svg"/> - <svglayer note="87" file="insects/MMA00048.wmf.svg"/> - <svglayer note="88" file="insects/MMA00049.wmf.svg"/> - <svglayer note="89" file="insects/MMA00050.wmf.svg"/> - <svglayer note="90" file="insects/MMA00051.wmf.svg"/> - <svglayer note="91" file="insects/MMA00052.wmf.svg"/> - <svglayer note="92" file="insects/ag01501a.wmf.svg"/> - <svglayer note="93" file="insects/ag01502a.wmf.svg"/> - <svglayer note="94" file="insects/ag01503a.wmf.svg"/> - <svglayer note="95" file="insects/ag01504a.wmf.svg"/> - <svglayer note="96" file="insects/ag01505a.wmf.svg"/> - <svglayer note="97" file="insects/ag01506a.wmf.svg"/> - <svglayer note="98" file="insects/ag01507a.wmf.svg"/> - <svglayer note="99" file="insects/ag35003b.wmf.svg"/> - <svglayer note="100" file="insects/ag35004b.wmf.svg"/> +<?xml version='1.0' encoding='UTF-8'?> +<playlist name="insects"> + <svglayer note="64" file="insects/Ag01036x.wmf.svg"/> + <svglayer note="44" file="insects/Bit1139.wmf.svg"/> + <svglayer note="69" file="insects/MMA00001.wmf.svg"/> + <svglayer note="90" file="insects/MMA00002.wmf.svg"/> + <svglayer note="98" file="insects/MMA00003.wmf.svg"/> + <svglayer note="93" file="insects/MMA00004.wmf.svg"/> + <svglayer note="52" file="insects/MMA00005.wmf.svg"/> + <svglayer note="41" file="insects/MMA00006.wmf.svg"/> + <svglayer note="40" file="insects/MMA00007.wmf.svg"/> + <svglayer note="59" file="insects/MMA00008.wmf.svg"/> + <svglayer note="86" file="insects/MMA00009.wmf.svg"/> + <svglayer note="54" file="insects/MMA00010.wmf.svg"/> + <svglayer note="91" file="insects/MMA00011.wmf.svg"/> + <svglayer note="53" file="insects/MMA00012.wmf.svg"/> + <svglayer note="99" file="insects/MMA00013.wmf.svg"/> + <svglayer note="68" file="insects/MMA00014.wmf.svg"/> + <svglayer note="81" file="insects/MMA00015.wmf.svg"/> + <svglayer note="63" file="insects/MMA00016.wmf.svg"/> + <svglayer note="62" file="insects/MMA00017.wmf.svg"/> + <svglayer note="49" file="insects/MMA00018.wmf.svg"/> + <svglayer note="43" file="insects/MMA00019.wmf.svg"/> + <svglayer note="36" file="insects/MMA00020.wmf.svg"/> + <svglayer note="97" file="insects/MMA00021.wmf.svg"/> + <svglayer note="72" file="insects/MMA00022.wmf.svg"/> + <svglayer note="94" file="insects/MMA00023.wmf.svg"/> + <svglayer note="45" file="insects/MMA00024.wmf.svg"/> + <svglayer note="37" file="insects/MMA00025.wmf.svg"/> + <svglayer note="48" file="insects/MMA00026.wmf.svg"/> + <svglayer note="38" file="insects/MMA00027.wmf.svg"/> + <svglayer note="76" file="insects/MMA00028.wmf.svg"/> + <svglayer note="95" file="insects/MMA00029.wmf.svg"/> + <svglayer note="89" file="insects/MMA00030.wmf.svg"/> + <svglayer note="80" file="insects/MMA00031.wmf.svg"/> + <svglayer note="46" file="insects/MMA00032.wmf.svg"/> + <svglayer note="61" file="insects/MMA00033.wmf.svg"/> + <svglayer note="85" file="insects/MMA00034.wmf.svg"/> + <svglayer note="66" file="insects/MMA00035.wmf.svg"/> + <svglayer note="82" file="insects/MMA00036.wmf.svg"/> + <svglayer note="50" file="insects/MMA00037.wmf.svg"/> + <svglayer note="96" file="insects/MMA00038.wmf.svg"/> + <svglayer note="84" file="insects/MMA00039.wmf.svg"/> + <svglayer note="56" file="insects/MMA00040.wmf.svg"/> + <svglayer note="42" file="insects/MMA00041.wmf.svg"/> + <svglayer note="70" file="insects/MMA00042.wmf.svg"/> + <svglayer note="47" file="insects/MMA00043.wmf.svg"/> + <svglayer note="73" file="insects/MMA00044.wmf.svg"/> + <svglayer note="60" file="insects/MMA00045.wmf.svg"/> + <svglayer note="65" file="insects/MMA00046.wmf.svg"/> + <svglayer note="58" file="insects/MMA00047.wmf.svg"/> + <svglayer note="74" file="insects/MMA00048.wmf.svg"/> + <svglayer note="83" file="insects/MMA00049.wmf.svg"/> + <svglayer note="77" file="insects/MMA00050.wmf.svg"/> + <svglayer note="57" file="insects/MMA00051.wmf.svg"/> + <svglayer note="71" file="insects/MMA00052.wmf.svg"/> + <svglayer note="75" file="insects/ag01501a.wmf.svg"/> + <svglayer note="88" file="insects/ag01502a.wmf.svg"/> + <svglayer note="39" file="insects/ag01503a.wmf.svg"/> + <svglayer note="67" file="insects/ag01506a.wmf.svg"/> + <svglayer note="92" file="insects/ag35003b.wmf.svg"/> + <svglayer note="87" file="insects/ag35004b.wmf.svg"/> + <svglayer note="51" file="insects/Ag01036x.wmf.svg"/> + <svglayer note="78" file="insects/Bit1139.wmf.svg"/> + <svglayer note="79" file="insects/MMA00001.wmf.svg"/> + <svglayer note="55" file="insects/MMA00002.wmf.svg"/> </playlist> diff --git a/liveengine/bin/data/knights.xml b/liveengine/bin/data/knights.xml index 3b4d5f1..3b4d5f1 100644..100755 --- a/liveengine/bin/data/knights.xml +++ b/liveengine/bin/data/knights.xml diff --git a/liveengine/bin/data/mil_historic.xml b/liveengine/bin/data/mil_historic.xml index 20101c3..20101c3 100644..100755 --- a/liveengine/bin/data/mil_historic.xml +++ b/liveengine/bin/data/mil_historic.xml diff --git a/liveengine/bin/data/military_ethnic.xml b/liveengine/bin/data/military_ethnic.xml index 01486b8..01486b8 100644..100755 --- a/liveengine/bin/data/military_ethnic.xml +++ b/liveengine/bin/data/military_ethnic.xml diff --git a/liveengine/bin/data/organs.xml b/liveengine/bin/data/organs.xml index 3b1c530..3b1c530 100644..100755 --- a/liveengine/bin/data/organs.xml +++ b/liveengine/bin/data/organs.xml diff --git a/liveengine/bin/data/panel.xml b/liveengine/bin/data/panel.xml index ee87c83..ee87c83 100644..100755 --- a/liveengine/bin/data/panel.xml +++ b/liveengine/bin/data/panel.xml diff --git a/liveengine/bin/data/reptiles.xml b/liveengine/bin/data/reptiles.xml index ca38f60..ca38f60 100644..100755 --- a/liveengine/bin/data/reptiles.xml +++ b/liveengine/bin/data/reptiles.xml diff --git a/liveengine/bin/data/settings.xml b/liveengine/bin/data/settings.xml index 8b82c1a..5fc4912 100755 --- a/liveengine/bin/data/settings.xml +++ b/liveengine/bin/data/settings.xml @@ -1,9 +1,6 @@ <?xml version="1.0" encoding="UTF-8" ?> <liveEngine port="1" channel="0"> - <viewport mapped="0" w="768" h="1024" x="0" y="0" rot="-90" ox="-256" oy="-384"> - <settings fov="17.500000" roll="0.000000" targX="-247.713226" targY="212.727859" targZ="0.000000" lat="0.000000" lng="180.000000" dolly="600.000000" /> - </viewport> - <viewport mapped="0" w="768" h="1024" x="512" y="0" rot="-90" ox="-256" oy="-384"> + <viewport mapped="1" w="768" h="1024" x="0" y="0" rot="-90" ox="-256" oy="-384"> <settings fov="17.500000" roll="0.000000" targX="-247.713226" targY="212.727859" targZ="0.000000" lat="0.000000" lng="180.000000" dolly="600.000000" /> </viewport> </liveEngine> diff --git a/liveengine/bin/data/tai_chi.xml b/liveengine/bin/data/tai_chi.xml index 4488753..dc0bfbe 100644..100755 --- a/liveengine/bin/data/tai_chi.xml +++ b/liveengine/bin/data/tai_chi.xml @@ -1,68 +1,67 @@ -<?xml version='1.0' encoding='utf-8'?> -<playlist name="Tai Chi"> - <svglayer note="36" file="tai_chi/RG01030A.WMF.svg"/> - <svglayer note="37" file="tai_chi/RG01031A.WMF.svg"/> - <svglayer note="38" file="tai_chi/RG01032A.WMF.svg"/> - <svglayer note="39" file="tai_chi/RG01033A.WMF.svg"/> - <svglayer note="40" file="tai_chi/RG01034A.WMF.svg"/> - <svglayer note="41" file="tai_chi/RG01035A.WMF.svg"/> - <svglayer note="42" file="tai_chi/RG01036A.WMF.svg"/> - <svglayer note="43" file="tai_chi/RG01037A.WMF.svg"/> - <svglayer note="44" file="tai_chi/RG01038A.WMF.svg"/> - <svglayer note="45" file="tai_chi/RG01039A.WMF.svg"/> - <svglayer note="46" file="tai_chi/RG01040A.WMF.svg"/> - <svglayer note="47" file="tai_chi/RG01041A.WMF.svg"/> - <svglayer note="48" file="tai_chi/RG01042A.WMF.svg"/> - <svglayer note="49" file="tai_chi/RG01043A.WMF.svg"/> - <svglayer note="50" file="tai_chi/RG01044A.WMF.svg"/> - <svglayer note="51" file="tai_chi/RG01045A.WMF.svg"/> - <svglayer note="52" file="tai_chi/RG01046A.WMF.svg"/> - <svglayer note="53" file="tai_chi/RG01047A.WMF.svg"/> - <svglayer note="54" file="tai_chi/RG01048A.WMF.svg"/> - <svglayer note="55" file="tai_chi/RG01049A.WMF.svg"/> - <svglayer note="56" file="tai_chi/RG01050A.WMF.svg"/> - <svglayer note="57" file="tai_chi/RG01051A.WMF.svg"/> - <svglayer note="58" file="tai_chi/RG01052A.WMF.svg"/> - <svglayer note="59" file="tai_chi/RG01053A.WMF.svg"/> - <svglayer note="60" file="tai_chi/RG01054A.WMF.svg"/> - <svglayer note="61" file="tai_chi/RG01055A.WMF.svg"/> - <svglayer note="62" file="tai_chi/RG01056A.WMF.svg"/> - <svglayer note="63" file="tai_chi/RG01057A.WMF.svg"/> - <svglayer note="64" file="tai_chi/RG01058A.WMF.svg"/> - <svglayer note="65" file="tai_chi/RG01059A.WMF.svg"/> - <svglayer note="66" file="tai_chi/RG01060A.WMF.svg"/> - <svglayer note="67" file="tai_chi/RG01061A.WMF.svg"/> - <svglayer note="68" file="tai_chi/RG01062A.WMF.svg"/> - <svglayer note="69" file="tai_chi/RG01063A.WMF.svg"/> - <svglayer note="70" file="tai_chi/RG01064A.WMF.svg"/> - <svglayer note="71" file="tai_chi/RG01065A.WMF.svg"/> - <svglayer note="72" file="tai_chi/RG01066A.WMF.svg"/> - <svglayer note="73" file="tai_chi/RG01067A.WMF.svg"/> - <svglayer note="74" file="tai_chi/RG01068A.WMF.svg"/> - <svglayer note="75" file="tai_chi/RG01069A.WMF.svg"/> - <svglayer note="76" file="tai_chi/RG01070A.WMF.svg"/> - <svglayer note="77" file="tai_chi/RG01071A.WMF.svg"/> - <svglayer note="78" file="tai_chi/RG01072A.WMF.svg"/> - <svglayer note="79" file="tai_chi/RG01073A.WMF.svg"/> - <svglayer note="80" file="tai_chi/RG01074A.WMF.svg"/> - <svglayer note="81" file="tai_chi/RG01075A.WMF.svg"/> - <svglayer note="82" file="tai_chi/RG01076A.WMF.svg"/> - <svglayer note="83" file="tai_chi/RG01077A.WMF.svg"/> - <svglayer note="84" file="tai_chi/RG01078A.WMF.svg"/> - <svglayer note="85" file="tai_chi/RG01079A.WMF.svg"/> - <svglayer note="86" file="tai_chi/RG01080A.WMF.svg"/> - <svglayer note="87" file="tai_chi/RG01081A.WMF.svg"/> - <svglayer note="88" file="tai_chi/RG01082A.WMF.svg"/> - <svglayer note="89" file="tai_chi/RG01083A.WMF.svg"/> - <svglayer note="90" file="tai_chi/RG01084A.WMF.svg"/> - <svglayer note="91" file="tai_chi/RG01085A.WMF.svg"/> - <svglayer note="92" file="tai_chi/RG01086A.WMF.svg"/> - <svglayer note="93" file="tai_chi/RG01087A.WMF.svg"/> - <svglayer note="94" file="tai_chi/RG01088A.WMF.svg"/> - <svglayer note="95" file="tai_chi/RG01089A.WMF.svg"/> - <svglayer note="96" file="tai_chi/RG01090A.WMF.svg"/> - <svglayer note="97" file="tai_chi/RG01095A.WMF.svg"/> - <svglayer note="98" file="tai_chi/RG01096A.WMF.svg"/> - <svglayer note="99" file="tai_chi/RG01097A.WMF.svg"/> - <svglayer note="100" file="tai_chi/RG01098A.WMF.svg"/> +<?xml version='1.0' encoding='UTF-8'?> +<playlist name="tai_chi"> + <svglayer note="38" file="tai_chi/RG01030A.WMF.svg"/> + <svglayer note="69" file="tai_chi/RG01031A.WMF.svg"/> + <svglayer note="58" file="tai_chi/RG01032A.WMF.svg"/> + <svglayer note="84" file="tai_chi/RG01033A.WMF.svg"/> + <svglayer note="95" file="tai_chi/RG01034A.WMF.svg"/> + <svglayer note="59" file="tai_chi/RG01035A.WMF.svg"/> + <svglayer note="44" file="tai_chi/RG01036A.WMF.svg"/> + <svglayer note="40" file="tai_chi/RG01037A.WMF.svg"/> + <svglayer note="52" file="tai_chi/RG01038A.WMF.svg"/> + <svglayer note="41" file="tai_chi/RG01039A.WMF.svg"/> + <svglayer note="67" file="tai_chi/RG01040A.WMF.svg"/> + <svglayer note="77" file="tai_chi/RG01041A.WMF.svg"/> + <svglayer note="86" file="tai_chi/RG01042A.WMF.svg"/> + <svglayer note="90" file="tai_chi/RG01043A.WMF.svg"/> + <svglayer note="79" file="tai_chi/RG01044A.WMF.svg"/> + <svglayer note="42" file="tai_chi/RG01045A.WMF.svg"/> + <svglayer note="82" file="tai_chi/RG01046A.WMF.svg"/> + <svglayer note="97" file="tai_chi/RG01047A.WMF.svg"/> + <svglayer note="36" file="tai_chi/RG01048A.WMF.svg"/> + <svglayer note="48" file="tai_chi/RG01049A.WMF.svg"/> + <svglayer note="76" file="tai_chi/RG01050A.WMF.svg"/> + <svglayer note="46" file="tai_chi/RG01051A.WMF.svg"/> + <svglayer note="61" file="tai_chi/RG01052A.WMF.svg"/> + <svglayer note="74" file="tai_chi/RG01053A.WMF.svg"/> + <svglayer note="63" file="tai_chi/RG01054A.WMF.svg"/> + <svglayer note="71" file="tai_chi/RG01055A.WMF.svg"/> + <svglayer note="72" file="tai_chi/RG01056A.WMF.svg"/> + <svglayer note="53" file="tai_chi/RG01057A.WMF.svg"/> + <svglayer note="94" file="tai_chi/RG01058A.WMF.svg"/> + <svglayer note="43" file="tai_chi/RG01059A.WMF.svg"/> + <svglayer note="64" file="tai_chi/RG01060A.WMF.svg"/> + <svglayer note="99" file="tai_chi/RG01061A.WMF.svg"/> + <svglayer note="88" file="tai_chi/RG01062A.WMF.svg"/> + <svglayer note="66" file="tai_chi/RG01063A.WMF.svg"/> + <svglayer note="60" file="tai_chi/RG01064A.WMF.svg"/> + <svglayer note="91" file="tai_chi/RG01065A.WMF.svg"/> + <svglayer note="75" file="tai_chi/RG01066A.WMF.svg"/> + <svglayer note="49" file="tai_chi/RG01067A.WMF.svg"/> + <svglayer note="85" file="tai_chi/RG01068A.WMF.svg"/> + <svglayer note="45" file="tai_chi/RG01069A.WMF.svg"/> + <svglayer note="70" file="tai_chi/RG01070A.WMF.svg"/> + <svglayer note="92" file="tai_chi/RG01072A.WMF.svg"/> + <svglayer note="96" file="tai_chi/RG01074A.WMF.svg"/> + <svglayer note="47" file="tai_chi/RG01076A.WMF.svg"/> + <svglayer note="78" file="tai_chi/RG01077A.WMF.svg"/> + <svglayer note="65" file="tai_chi/RG01078A.WMF.svg"/> + <svglayer note="83" file="tai_chi/RG01079A.WMF.svg"/> + <svglayer note="37" file="tai_chi/RG01080A.WMF.svg"/> + <svglayer note="62" file="tai_chi/RG01081A.WMF.svg"/> + <svglayer note="73" file="tai_chi/RG01082A.WMF.svg"/> + <svglayer note="80" file="tai_chi/RG01083A.WMF.svg"/> + <svglayer note="51" file="tai_chi/RG01084A.WMF.svg"/> + <svglayer note="50" file="tai_chi/RG01085A.WMF.svg"/> + <svglayer note="87" file="tai_chi/RG01086A.WMF.svg"/> + <svglayer note="54" file="tai_chi/RG01087A.WMF.svg"/> + <svglayer note="93" file="tai_chi/RG01088A.WMF.svg"/> + <svglayer note="81" file="tai_chi/RG01089A.WMF.svg"/> + <svglayer note="98" file="tai_chi/RG01090A.WMF.svg"/> + <svglayer note="55" file="tai_chi/RG01099A.WMF.svg"/> + <svglayer note="39" file="tai_chi/RG01100A.WMF.svg"/> + <svglayer note="89" file="tai_chi/RG01101A.WMF.svg"/> + <svglayer note="57" file="tai_chi/RG01102A.WMF.svg"/> + <svglayer note="68" file="tai_chi/RG01103A.WMF.svg"/> + <svglayer note="56" file="tai_chi/RG01104A.WMF.svg"/> </playlist> diff --git a/liveengine/bin/data/teamsports.xml b/liveengine/bin/data/teamsports.xml index 0d16db2..0d16db2 100644..100755 --- a/liveengine/bin/data/teamsports.xml +++ b/liveengine/bin/data/teamsports.xml diff --git a/liveengine/bin/data/tools.xml b/liveengine/bin/data/tools.xml index 7cca131..7cca131 100644..100755 --- a/liveengine/bin/data/tools.xml +++ b/liveengine/bin/data/tools.xml diff --git a/liveengine/bin/data/trainers.xml b/liveengine/bin/data/trainers.xml index 51520c6..51520c6 100644..100755 --- a/liveengine/bin/data/trainers.xml +++ b/liveengine/bin/data/trainers.xml diff --git a/liveengine/bin/data/women_ethnic.xml b/liveengine/bin/data/women_ethnic.xml index 629ce55..629ce55 100644..100755 --- a/liveengine/bin/data/women_ethnic.xml +++ b/liveengine/bin/data/women_ethnic.xml diff --git a/liveengine/bin/data/yoga.xml b/liveengine/bin/data/yoga.xml index 1fe9793..1fe9793 100644..100755 --- a/liveengine/bin/data/yoga.xml +++ b/liveengine/bin/data/yoga.xml diff --git a/liveengine/config.make b/liveengine/config.make index 4202b4a..821a73a 100755 --- a/liveengine/config.make +++ b/liveengine/config.make @@ -28,9 +28,9 @@ USER_COMPILER_OPTIMIZATION = -march=native -mtune=native -Os # android specific, in case you want to use different optimizations -USER_LIBS_ARM = -USER_LIBS_ARM7 = -USER_LIBS_NEON = +USER_LIBS_ARM = +USER_LIBS_ARM7 = +USER_LIBS_NEON = # android optimizations diff --git a/liveengine/liveengine.cbp b/liveengine/liveengine.cbp index 428e2dc..6dd6db0 100755 --- a/liveengine/liveengine.cbp +++ b/liveengine/liveengine.cbp @@ -27,6 +27,12 @@ <Option projectLinkerOptionsRelation="2" /> </Target> </Build> + <Unit filename="addons.make"> + <Option virtualFolder="build config/" /> + </Unit> + <Unit filename="bin/data/dancing.xml"> + <Option virtualFolder="build config/" /> + </Unit> <Unit filename="bin/data/settings.xml"> <Option virtualFolder="build config/" /> </Unit> diff --git a/liveengine/liveengine.layout b/liveengine/liveengine.layout index d2474ee..6762492 100755 --- a/liveengine/liveengine.layout +++ b/liveengine/liveengine.layout @@ -1,28 +1,49 @@ <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <CodeBlocks_layout_file> <ActiveTarget name="Debug" /> - <File name="bin/data/settings.xml" open="1" top="1" tabpos="1"> - <Cursor position="359" topLine="0" /> + <File name="addons.make" open="0" top="0" tabpos="7"> + <Cursor position="92" topLine="0" /> </File> - <File name="config.make" open="0" top="0" tabpos="2"> + <File name="bin/data/dancing.xml" open="1" top="0" tabpos="1"> <Cursor position="0" topLine="0" /> </File> - <File name="src/main.cpp" open="1" top="0" tabpos="4"> - <Cursor position="267" topLine="0" /> + <File name="bin/data/settings.xml" open="0" top="0" tabpos="5"> + <Cursor position="93" topLine="0" /> </File> - <File name="src/testApp.cpp" open="1" top="0" tabpos="2"> - <Cursor position="4118" topLine="91" /> + <File name="config.make" open="1" top="0" tabpos="2"> + <Cursor position="451" topLine="3" /> </File> - <File name="src/testApp.h" open="0" top="0" tabpos="1"> - <Cursor position="3971" topLine="162" /> + <File name="src/keyVar.cpp" open="0" top="0" tabpos="9"> + <Cursor position="510" topLine="8" /> + </File> + <File name="src/keyVar.h" open="0" top="0" tabpos="10"> + <Cursor position="0" topLine="3" /> + </File> + <File name="src/layers.cpp" open="1" top="0" tabpos="3"> + <Cursor position="2434" topLine="46" /> + </File> + <File name="src/layers.h" open="1" top="0" tabpos="4"> + <Cursor position="3260" topLine="76" /> + </File> + <File name="src/main.cpp" open="0" top="0" tabpos="6"> + <Cursor position="290" topLine="0" /> </File> - <File name="src/threadNI.h" open="0" top="0" tabpos="2"> - <Cursor position="1488" topLine="52" /> + <File name="src/playlist.cpp" open="0" top="0" tabpos="0"> + <Cursor position="1621" topLine="40" /> + </File> + <File name="src/playlist.h" open="0" top="0" tabpos="0"> + <Cursor position="536" topLine="0" /> + </File> + <File name="src/testApp.cpp" open="1" top="0" tabpos="5"> + <Cursor position="14329" topLine="409" /> + </File> + <File name="src/testApp.h" open="0" top="0" tabpos="1"> + <Cursor position="3028" topLine="105" /> </File> - <File name="src/viewport.cpp" open="1" top="0" tabpos="3"> - <Cursor position="11259" topLine="296" /> + <File name="src/viewport.cpp" open="1" top="1" tabpos="7"> + <Cursor position="4344" topLine="34" /> </File> - <File name="src/viewport.h" open="0" top="0" tabpos="3"> - <Cursor position="283" topLine="0" /> + <File name="src/viewport.h" open="1" top="0" tabpos="6"> + <Cursor position="42" topLine="36" /> </File> </CodeBlocks_layout_file> diff --git a/liveengine/src/layers.cpp b/liveengine/src/layers.cpp index 4ac0c59..a0fb213 100755 --- a/liveengine/src/layers.cpp +++ b/liveengine/src/layers.cpp @@ -63,53 +63,167 @@ void svglayer::draw(float a,unsigned char* controllers,int cx,int cy,bool transp getCentre(cx,cy);
//draw layers grouped by controllers
float layerspercontroller=((float)svg.getNumPath())/6.0f;
-
+
for (int i=0;i<6;i++) {
+ //for (int j=(int)((i+1)*layerspercontroller)-1;j>(int)(i*layerspercontroller);j--) { for (int j=(int)(i*layerspercontroller);j<(int)((i+1)*layerspercontroller);j++) {
- svg.getPathAt(j).setFillColor(fills[i]*a*controllers[i]);
- if (!transparentBlack||((a*controllers[i])/127.0)>0.1) {
+ svg.getPathAt(j).setFillColor(fills[j]*a*(((float)controllers[5-i])/127.0f)); //try to reverse order of these
+ if (!transparentBlack||((a*controllers[5-i])/127.0f)>0.1) {
svg.getPathAt(j).draw(xo,yo);
}
}
- }
+ } + //printf("counted %i layers of %i\n",(int)(6*layerspercontroller),svg.getNumPath());
} svglayer::~svglayer()
{
//dtor
-}
-
+} + +//------------------------------------------------------------------------ imglayer::imglayer() { - //img.setUseTexture(false); + //sprite.setUseTexture(false); }
-imglayer::imglayer(string _f)
-{
- load(_f);
+imglayer::imglayer(string _filename,int _frames,int _start,float _rate,int n, int e){
+ load(_filename,_frames,_start,_rate,n,e);
}
-void imglayer::load(string _f){
- bool success=img.loadImage(_f);
- printf("%s\n",success?"loaded":"not loaded");
+void imglayer::load(string _filename,int _frames,int _start,float _rate,int n, int e){ + startNote=n; + endNote=e;
+ sprite.load(_filename,_frames,_start);
+ sprite.setFrameRate(_rate);
}
-/* -WTF is going on with the image drawing - - -*/
+
void imglayer::draw(float a,int cx,int cy,float colShift) { - //if (img.isAllocated()) if (!img.isUsingTexture()) img.setUseTexture(true); //has to be done from the main thread? still doesn't work
- img.draw(0,0,ofGetWidth(),ofGetHeight()); - printf("drawing %f\n",ofGetElapsedTimef());
+ //if (sprite.isAllocated()) if (!sprite.isUsingTexture()) sprite.setUseTexture(true); //has to be done from the main thread? still doesn't work
+ + sprite.update();
+ int x,y,w,h;
+ if ((((float)cx)/cy)<(((float)sprite.getWidth())/sprite.getHeight())){
+ x=0;
+ w=cx;
+ h=((float)cx)*(((float)sprite.getHeight())/sprite.getWidth());
+ y=(cy-h)/2;
+ }
+ else {
+ y=0;
+ h=cy;
+ w=((float)cy)*(((float)sprite.getWidth())/sprite.getHeight());
+ x=(cx-w)/2;
+ }
+ ofEnableAlphaBlending(); + sprite.draw(x,y,w,h);
+ ofDisableAlphaBlending();
} void imglayer::draw(float a,unsigned char* controllers,int cx,int cy,bool transparentBlack=false,float colShift=0.0f) { imglayer::draw(a,cx,cy,colShift);
-} +}
+
+void imglayer::setNote(int note)
+{ + //is called rerpeatedly no startNote,endNote + //printf("note %i (%i - %i)\n",note,startNote,endNote);
+ if ((startNote<=note)&&(endNote>=note)) {
+ if (!sprite.getIsPlaying()) {
+
+ sprite.play();
+
+ } + //printf("triggered frame %i of %i\n",(int)(((((float)note-startNote)/((float)endNote-startNote)))*sprite.getTotalFrames()),sprite.getTotalFrames());
+ sprite.setCurrentFrame((int)(((((float)note-startNote)/((float)endNote-startNote)))*sprite.getTotalFrames()));
+ //printf("movie %i (%i - %i) frame: %i\n",note,startNote,endNote,(int)(((((float)note-startNote)/((float)endNote-startNote)))*mov.getTotalNumFrames()));
+ }
+ else {
+ if (sprite.getIsPlaying()) {
+ sprite.stop();
+ }
+ }
+
+}; imglayer::~imglayer()
{
- //img.setUseTexture(false); //free texture
+ //sprite.setUseTexture(false); //free texture
+} +//------------------------------------------------------------------------ +videolayer::videolayer() { + //sprite.setUseTexture(false); +}
+videolayer::videolayer(string _f,int n,int e,float s)
+{ + startNote=n; + endNote=e;
+ speed=s;
+ load(_f);
+}
+
+void videolayer::load(string _f){
+ name=_f;
+ mov.setPixelFormat(OF_PIXELS_BGRA);
+ mov.setUseTexture(false);
+ bool success=mov.loadMovie(_f);
+ if (success) {
+ mov.stop();
+ }
+ printf("%s %s %i bpp\n",success?"loaded":"not loaded",_f.c_str(),success?mov.getPixelsRef().getBytesPerPixel():0);
+}
+
+void videolayer::draw(float a,int cx,int cy,float colShift) { + if (mov.isPlaying()) { + mov.update();
+ //unsigned char *pix=mov.getPixels();
+ //for (int i=0;i<mov.getWidth()*mov.getHeight()*4;i+=4) pix[i+3]=(pix[i]>>2)+(pix[i+1]>>1)+(pix[i+2]>>2);
+ int x,y,w,h;
+ if ((((float)cx)/cy)<(((float)mov.getWidth())/mov.getHeight())){
+ x=0;
+ w=cx;
+ h=((float)cx)*(((float)mov.getHeight())/mov.getWidth());
+ y=(cy-h)/2;
+ }
+ else {
+ y=0;
+ h=cy;
+ w=((float)cy)*(((float)mov.getWidth())/mov.getHeight());
+ x=(cx-w)/2;
+ }
+ ofEnableAlphaBlending();
+ mov.draw(x,y,w,h);
+ ofDisableAlphaBlending(); + }
+} + +void videolayer::draw(float a,unsigned char* controllers,int cx,int cy,bool transparentBlack=false,float colShift=0.0f) { + draw(a,cx,cy,colShift);
+} + +void videolayer::setNote(int note) +{
+ + if ((startNote<=note)&&(endNote>=note)) { + if (!mov.isPlaying()) {
+ //printf("starting movie!\n");
+ mov.setUseTexture(true);
+ mov.play();
+ mov.setSpeed(speed);
+ } + mov.setFrame((int)(((((float)note-startNote)/((float)endNote-startNote)))*mov.getTotalNumFrames()));
+ //printf("movie %i (%i - %i) frame: %i\n",note,startNote,endNote,(int)(((((float)note-startNote)/((float)endNote-startNote)))*mov.getTotalNumFrames())); + } + else { + if (mov.isPlaying()) { + mov.stop(); + } + } + +}; +
+
+videolayer::~videolayer()
+{
}
diff --git a/liveengine/src/layers.h b/liveengine/src/layers.h index c6f4171..f8ed650 100755 --- a/liveengine/src/layers.h +++ b/liveengine/src/layers.h @@ -3,6 +3,7 @@ #include "ofxSVGTiny.h" #include "ofMain.h"
+#include "ofxSprite.h"
class layer
{
@@ -13,7 +14,10 @@ class layer virtual void load(string _f){};
virtual void draw(float a,int cx,int cy,float colShift){}; virtual void draw(float a,unsigned char* controllers,int cx,int cy,bool transparentBlack=false,float colShift=0.0f){ draw(a,cx,cy,colShift);}; - bool getLoaded() {return isLoaded;};
+ bool getLoaded() {return isLoaded;}; + virtual void setNote(int note) {};
+ string name;
+ int startNote,endNote;
protected: bool isLoaded;
private:
@@ -37,18 +41,91 @@ class svglayer: public layer vector <ofColor> strokes; float xo,yo;
};
+ +class sunkenSprite: public ofxSprite { + public: + float playhead,frameRate;
+ void setFrameRate(float frameRate) { this->frameRate = frameRate;}; + void play() { + startTime=ofGetElapsedTimef(); + ofxSprite::play(); + } + void update() { + if (!getIsPlaying()) return;
+ playhead=fmod(speed * frameRate * (ofGetElapsedTimef()-startTime),(float)getTotalFrames()); + ofxSprite::setCurrentFrame(playhead); + + } + void setCurrentFrame(float frame) {
+ //this idea doesn't work - fucks up when frameRate is 0 -
+ //need to rethink
+
+ //when frameRate is 0 startTime doesn't matter
+ //this still might not be not entirely correct
+ if (frameRate>0) startTime-=(frame-pos) / ((float)(frameRate * speed ));
+ //printf("sunkensprite setting frame %i of %i\n",(int)frame,getTotalFrames());
+ //printf("1 checking frame %i of %i\n",(int)frame,getTotalFrames()); + ofxSprite::setCurrentFrame(frame);
+ /*
+ pos = frame;
+ printf("2 checking frame %i of %i\n",(int)frame,getTotalFrames());
+ printf("requesting movie frame %i of %i\n",(int)pos,getTotalFrames());
+ if (pos<0) if (loop) { pos += totalFrames; } else stop();
+ if (pos>=totalFrames) if (loop) {
+ while (pos>=totalFrames) pos -= totalFrames;
+ } else { pos = totalFrames-.00001f; isPlaying=false; }
+ printf("set movie frame %i of %i\n",(int)pos,totalFrames);
+ */ + } + void draw(int x,int y,int w,int h) { + + int f=playhead; + float fr=fmod(playhead,1.0); + ofSetColor(255,255,255,(1.0-fr)*255); + //not always? + getImageAtFrame(f).setUseTexture(true); + getImageAtFrame(f).reloadTexture();
+ getImageAtFrame(f).draw(x,y,w,h); + ofSetColor(255,255,255,fr*255);
+ f=(f+1)%getTotalFrames(); + getImageAtFrame(f).setUseTexture(true);
+ getImageAtFrame(f).reloadTexture();
+ getImageAtFrame(f).draw(x,y,w,h); + } + + private: + float startTime; + +}; class imglayer: public layer
{
public:
imglayer();
- imglayer(string _f);
+ imglayer(string _f,int _frames=1,int _start=1,float _rate=0,int note=0,int endnote=0);
virtual ~imglayer();
- void load(string _f);
+ void load(string _filename,int _frames=1,int _start=1,float _rate=0.0,int note=0,int endnote=0);
void draw(float a,int cx,int cy,float colShift); void draw(float a,unsigned char* controllers,int cx,int cy,bool transparentBlack,float colShift);
+ void setNote(int n);
protected:
private:
- ofImage img;
+ sunkenSprite sprite;
+}; + +class videolayer: public layer
+{
+ public:
+ videolayer();
+ videolayer(string _f,int n,int e,float s);
+ virtual ~videolayer();
+ void load(string _f);
+ void draw(float a,int cx,int cy,float colShift); + void draw(float a,unsigned char* controllers,int cx,int cy,bool transparentBlack,float colShift); + void setNote(int n); + protected:
+ private: + float speed;
+ ofVideoPlayer mov;
};
#endif // SVGLAYER_H
diff --git a/liveengine/src/main.cpp b/liveengine/src/main.cpp index 6f40023..f0c0c0f 100755 --- a/liveengine/src/main.cpp +++ b/liveengine/src/main.cpp @@ -7,7 +7,7 @@ int main( ){ ofAppGlutWindow window; - ofSetupOpenGL(ofxFensterManager::get(),2048,768, OF_WINDOW); //2048,768 + ofSetupOpenGL(ofxFensterManager::get(),1024,768, OF_WINDOW); //2048,768 //ofSetupOpenGL(&window, 1024,768, OF_WINDOW); // <-------- setup the GL context //ofSetupOpenGL(&window, 1024,768, OF_WINDOW); diff --git a/liveengine/src/playlist.cpp b/liveengine/src/playlist.cpp index 51bd852..683cd3c 100755 --- a/liveengine/src/playlist.cpp +++ b/liveengine/src/playlist.cpp @@ -25,26 +25,61 @@ void playlist::load(string _name){ void playlist::threadedFunction(){ if( lock() ){ - loadsvg(); + loadLayers(); unlock(); } }
-void playlist::loadsvg(){ +void playlist::loadLayers(){ int numLayers=0; layers.clear(); name=XML.getAttribute("playlist", "name", ""); + float speed=XML.getAttribute("playlist", "speed", 0); if(XML.pushTag("playlist")) {
numLayers=XML.getNumTags("svglayer");
if(numLayers) {
for (int i=0;i<numLayers;i++) {
string s=XML.getAttribute("svglayer", "file", "",i);
- printf("loading %s: ",s.c_str());
+ printf("loading %s: \n",s.c_str());
layers[XML.getAttribute("svglayer", "note", 0,i)]=new svglayer(XML.getAttribute("svglayer", "file", "",i));
} thumbnailed=false;
- }
- else printf("no SVG layers loaded!\n"); + } + numLayers=XML.getNumTags("movlayer");
+ if(numLayers) {
+ for (int i=0;i<numLayers;i++) {
+ string s=XML.getAttribute("movlayer", "file", "",i);
+ printf("loading %s: \n",s.c_str()); + int note=XML.getAttribute("movlayer", "note", 0,i); + int endnote=XML.getAttribute("movlayer", "endnote", 0,i);
+ layers[note]=new videolayer(XML.getAttribute("movlayer", "file", "",i),note,endnote,speed); + if (endnote>note) { + for (int j=note+1;j<endnote;j++) { + layers[j]=layers[note]; + } + }
+ } + thumbnailed=false;
+ } + numLayers=XML.getNumTags("imglayer"); + if(numLayers) { + for (int i=0;i<numLayers;i++) { + string s=XML.getAttribute("imglayer", "files", "",i); + printf("loading %s: \n",s.c_str()); + int note=XML.getAttribute("imglayer", "note", 0,i); + int endnote=XML.getAttribute("imglayer", "endnote", 0,i); + float rate=XML.getAttribute("imglayer", "rate", 0.0,i); + int frames=XML.getAttribute("imglayer", "frames", 0,i); + int start=XML.getAttribute("imglayer", "start", 1,i); + layers[note]=new imglayer(s,frames,start,rate,note,endnote); + if (endnote>note) { + for (int j=note+1;j<=endnote;j++) { + layers[j]=layers[note]; + } + } + } + thumbnailed=false; + } XML.popTag();
} diff --git a/liveengine/src/playlist.h b/liveengine/src/playlist.h index 846de74..2790835 100755 --- a/liveengine/src/playlist.h +++ b/liveengine/src/playlist.h @@ -12,17 +12,17 @@ class playlist : public ofThread { playlist();
virtual ~playlist(); void loadimg(); - void loadsvg(); + void loadLayers(); void load(string _name); void threadedFunction();
- void makeThumbnail(); + void makeThumbnail(); - ofFbo thumbnail;
- bool thumbnailed;
+ ofFbo thumbnail;
+ bool thumbnailed;
ofxXmlSettings XML; map<int,layer*> layers;
- string name;
+ string name;
protected:
private:
};
diff --git a/liveengine/src/testApp.cpp b/liveengine/src/testApp.cpp index cdff1af..c69ac66 100755 --- a/liveengine/src/testApp.cpp +++ b/liveengine/src/testApp.cpp @@ -58,7 +58,7 @@ void kinectWindow::draw(){ //-------------------------------------------------------------- void testApp::setup(){
int midiPort=0;
- midiChannel=0; + midiChannel=0;
useKinect=false;
if( !XML.loadFile("settings.xml") ){
printf("unable to load settings.xml check data/ folder\n");
@@ -91,7 +91,7 @@ void testApp::setup(){ kw->addListener(kinectWin); kinectWin->setup(); kinectWin->setParent(this); - + NIinstance.start(); } @@ -106,9 +106,9 @@ void testApp::setup(){ settings[keys[k]]=XML.getAttribute("settings",keys[k],"none",0); } viewports[i]->setcam(settings); - XML.popTag(); + XML.popTag(); - } + } else viewports.push_back(new viewport(w,h,x,y,rot,ox,oy)); } } @@ -116,23 +116,22 @@ void testApp::setup(){ XML.popTag(); - } -
+ }
} - +
activeView=-1; midiIn.listPorts();
midiIn.openPort(midiPort);
midiIn.addListener(this);
- //to register only to one controller pass the id as first argument
+ // to register only to one controller pass the id as first argument
// midiIn.addListener(84,this);
// to debug
// midiIn.setVerbose(true); controllers=new unsigned char[NUM_CONTROLLERS]; - memset(controllers,127,NUM_CONTROLLERS); + memset(controllers,NUM_CONTROLLERS,0); note=0; makeColours(); @@ -198,8 +197,20 @@ void testApp::setup(){ gui.add(transparentBlack.setup("transparent black", false)); gui.add(resetDrawscale.setup("reset draw scale")); gui.add(resetFBscale.setup("reset FB scale")); + fadeScale=128; + gui.add(fS.setup("fade scale",fadeScale,0,255,255)); + decayTime=1.0f; + gui.add(dT.setup("decay time",decayTime,0,10.0,255)); + + gui.add(oscScale.setup("scale size LFO", false)); + gui.add(breakOsc.setup("break oscillators", false)); + gui.add(randomOsc.setup("randomise oscillators", false)); + scaleAmplitude=0.5f; + gui.add(sA.setup("fade scale",scaleAmplitude,0,2.0,255)); + scaleFrequency=1.0f; + gui.add(sF.setup("fade freq",scaleFrequency,0,5.0,255)); gui.add(drawCloud.setup("draw pointCloud",false)); - //gui.add(drawSkel.setup("draw Skeleton",false)); + gui.add(drawSkel.setup("draw Skeleton",false)); resetDrawscale.addListener(this,&testApp::resetDrawscalePressed); resetFBscale.addListener(this,&testApp::resetFBscalePressed); @@ -214,6 +225,7 @@ void testApp::setup(){ guiWin->setup(); guiWin->setParent(this); + debug=false; } @@ -231,8 +243,7 @@ void testApp::makeColours() { } //-------------------------------------------------------------- void testApp::update(){
- - + //for (int i=0;i<numLayers;i++) layers[i]->update(); } void testApp::saveSettings(string filename){ @@ -258,14 +269,17 @@ void testApp::draw(){ float lambda=max(0.0f,1.0f-((ofGetElapsedTimef()-lastnoteTime)/decayTime)); - ofSetColor(255-fadetime,255-fadetime,255-fadetime); //for feedback
+ int ft=255-(fadetime*((float)fadeScale)*0.1f); + //if(ofGetFrameNum()%25==0) printf("fadeScale %i\n",(int)fadeScale); + ofSetColor(ft,ft,ft); //for feedback
+ float os=oscScale?(sin((breakOsc?ofGetElapsedTimef()-(randomOsc?randOffs:lastnoteTime):ofGetElapsedTimef()))*scaleFrequency)*scaleAmplitude:0.0f; //vp1.draw(lambda,controllers,xshift,yshift,list,transparentBlack,note,mode,controller_colours,controlColours,scale,fscale,noteRandomiseColours?colShift:0.0f); //vp2.draw(lambda,controllers,reversemain?-xshift:xshift,yshift,list,transparentBlack,note,mode,controller_colours,controlColours,reversemain?1.0f/scale:scale,reversemain?1.0f/fscale:fscale,noteRandomiseColours?colShift:0.0f); for (int i=0;i<viewports.size();i++) { bool even=!(i%2); - if (viewports[i]->isMapped) viewports[i]->mapdraw(lambda,controllers,even&&reversemain?-xshift:xshift,yshift,list,transparentBlack,note,mode,controller_colours,controlColours,even&&reversemain?1.0f/scale:scale,even&&reversemain?1.0f/fscale:fscale,noteRandomiseColours?colShift:0.0f,drawCloud,drawSkel); - else viewports[i]->draw(lambda,controllers,even&&reversemain?-xshift:xshift,yshift,list,transparentBlack,note,mode,controller_colours,controlColours,even&&reversemain?1.0f/scale:scale,even&&reversemain?1.0f/fscale:fscale,noteRandomiseColours?colShift:0.0f); + if (viewports[i]->isMapped) viewports[i]->mapdraw(lambda,controllers,even&&reversemain?-xshift:xshift,yshift,list,transparentBlack,note,mode,controller_colours,controlColours,even&&reversemain?1.0f/(scale+os):scale+os,even&&reversemain?1.0f/fscale:fscale,noteRandomiseColours?colShift:0.0f,drawCloud,drawSkel); + else viewports[i]->draw(lambda,controllers,even&&reversemain?-xshift:xshift,yshift,list,transparentBlack,note,mode,controller_colours,controlColours,even&&reversemain?1.0f/(scale+os):scale+os,even&&reversemain?1.0f/fscale:fscale,noteRandomiseColours?colShift:0.0f); } ofSetColor(255,255,255); @@ -413,8 +427,8 @@ void testApp::keyPressed(int key, ofxFenster* win){ } void testApp::keyPressed(int key){ - if (activeView<0) for (int i=0;i<viewports.size();i++) viewports[i]->keyPressed(key); - else if (activeView<viewports.size()) viewports[activeView]->keyPressed(key); + if (activeView<0) for (int i=0;i<viewports.size();i++) if (viewports[i]->isMapped) viewports[i]->keyPressed(key); + else if (activeView<viewports.size()&&viewports[activeView]->isMapped) viewports[activeView]->keyPressed(key); if (key>='0' && key <='5'){ @@ -434,7 +448,9 @@ void testApp::keyPressed(int key){ break; } } - + if(key =='q'){
+ nmidiMessage(144,ofRandom(64)+36,127); + } if(key == 'p'){ saveSettings("settings.xml"); printf("settings saved!\n"); @@ -480,10 +496,14 @@ void testApp::keyPressed(int key){ } - if (key=='.') { + if(key == 'd'){ + debug=!debug; + } + + if (key=='j') { fscale=1.0f; } - if (key=='/') { + if (key=='h') { scale=1.0f; } @@ -567,7 +587,11 @@ void testApp::toggleFPS(){ showFPS=!showFPS;
} -void testApp::newMidiMessage(ofxMidiEventArgs& eventArgs){
+void testApp::newMidiMessage(ofxMidiEventArgs& eventArgs){ + if ((midiChannel==0)||(eventArgs.channel==midiChannel)) { + nmidiMessage(eventArgs.status,eventArgs.byteOne,eventArgs.byteTwo); + } +}
//newMessage(eventArgs.port, eventArgs.channel, eventArgs.byteTwo, eventArgs.timestamp);
@@ -583,30 +607,38 @@ void testApp::newMidiMessage(ofxMidiEventArgs& eventArgs){ */
//printf("%d %d %d %d %d\n",eventArgs.port,eventArgs.channel,eventArgs.status,eventArgs.byteOne,eventArgs.byteTwo);
-
+void testApp::nmidiMessage(int event,int data1, int data2) { + if (debug) printf("midi: %i %i\n",event,data1);
bool noteOn; //this old thing!
-
- if ((midiChannel==0)||(eventArgs.channel==midiChannel)) {
- switch(eventArgs.status) {
+ int i;
+ switch(event) {
case 144: //noteon-off channel 0
- noteOn=(eventArgs.byteTwo==0?false:true);
+ noteOn=(data2==0?false:true);
//for (int i=0;i<numLayers;i++){
// if (layers[i]->note==eventArgs.byteOne) layers[i]->setActive(noteOn);
//} - if (debug) printf("note: %i %i\n",eventArgs.byteOne,eventArgs.byteTwo); - note=eventArgs.byteOne; + + note=data1; lastnoteTime=ofGetElapsedTimef(); - if (noteRandomiseColours) { - makeColours(); // - }
+ if (list.layers.size()&&list.lock()) { //if playlist is loaded + map<int, layer*>::iterator itr; + //for(itr = list.layers.begin(); itr != list.layers.end(); ++itr){ + // list.layers[itr->first]->setNote(note); + //} + list.layers[note]->setNote(note); + list.unlock();
+ } + if (noteRandomiseColours) { + makeColours(); // + } + randOffs=ofRandom(100.0f);
break;
case 176: //control change channel 0
//for (int i=0;i<numLayers;i++){
// if (layers[i]->mix==eventArgs.byteOne) layers[i]->setMixAmt(((float)eventArgs.byteTwo)/127.0f);
//} - if (debug) printf("cc: %i %i\n",eventArgs.byteOne,eventArgs.byteTwo); - controllers[eventArgs.byteOne-START_CONTROLLER]=eventArgs.byteTwo;
+ if (debug) printf("cc: %i %i\n",data1,data2); + if (data1>=START_CONTROLLER) controllers[data1-START_CONTROLLER]=data2;
}
- }
}
diff --git a/liveengine/src/testApp.h b/liveengine/src/testApp.h index 689fb18..fa04e0b 100755 --- a/liveengine/src/testApp.h +++ b/liveengine/src/testApp.h @@ -2,7 +2,6 @@ //#include <GL/glxew.h> - #include "ofMain.h" #include "ofxXmlSettings.h" @@ -127,6 +126,8 @@ class testApp : public ofxFensterListener, public ofxMidiListener{ void keyPressedEvent(ofKeyEventArgs &args); void windowEvent(ofResizeEventArgs &args); + void nmidiMessage(int event,int data1, int data2); + void makeColours(); void toggleFPS(); @@ -144,7 +145,6 @@ class testApp : public ofxFensterListener, public ofxMidiListener{ bool fullscreenoutput; float lastnoteTime; - float decayTime; int fadetime; int rotate; @@ -182,9 +182,22 @@ class testApp : public ofxFensterListener, public ofxMidiListener{ ofxToggle transparentBlack; ofxButton resetDrawscale; ofxButton resetFBscale; + ofxIntSlider fS; + ofxParameter<int> fadeScale; + ofxFloatSlider dT; + ofxParameter<float> decayTime; + ofxToggle oscScale; + ofxToggle breakOsc; + ofxToggle randomOsc; + ofxFloatSlider sA; + ofxParameter<float> scaleAmplitude; + ofxFloatSlider sF; + ofxParameter<float> scaleFrequency; ofxToggle drawCloud; ofxToggle drawSkel; + float randOffs; + void resetDrawscalePressed(bool & pressed); void resetFBscalePressed(bool & pressed); diff --git a/liveengine/src/viewport.cpp b/liveengine/src/viewport.cpp index 0311d30..ddd1450 100755 --- a/liveengine/src/viewport.cpp +++ b/liveengine/src/viewport.cpp @@ -1,4 +1,4 @@ -#include "viewport.h" +#include "viewport.h"
#define DEBUG 0
//texture binding with normalised coords
@@ -76,9 +76,9 @@ void viewport::setup(int _w,int _h,int _x,int _y,float _r,int _ox,int _oy) { }
void viewport::draw(float a,unsigned char* controllers,int xshift,int yshift,playlist &list,bool transparentBlack,int note,int mode,ofColor* controller_colours,bool controlColours,float scale,float fscale,float colShift){
-
-
-
+
+
+
// test screen shape
/*
ofSetColor(255,0,0);
@@ -88,7 +88,7 @@ void viewport::draw(float a,unsigned char* controllers,int xshift,int yshift,pla ofRect(0,h/2,w/2,h/2);
ofRect(w/2,0,w/2,h/2);
*/
-
+
rb1.begin();
//can be done with texture offset?
@@ -97,7 +97,7 @@ void viewport::draw(float a,unsigned char* controllers,int xshift,int yshift,pla while (startx>0) startx-=(w*fscale);
int starty=((h-(h*fscale))/2)+yshift;
while (starty>0) starty-=(h*fscale);
-
+
for (int i=startx;i<w*2;i+=(w*fscale)) {
for (int j=starty;j<h*2;j+=(h*fscale)) {
rb2.draw(i,j,w*fscale,h*fscale);
@@ -110,7 +110,7 @@ void viewport::draw(float a,unsigned char* controllers,int xshift,int yshift,pla ofPushStyle();
if (note>0||mode==SOLID) {
- switch(mode) { + switch(mode) {
case SOLID: ofSetColor(255,0,0); ofRect(0,0,ofGetWidth(),ofGetHeight()); @@ -128,6 +128,7 @@ void viewport::draw(float a,unsigned char* controllers,int xshift,int yshift,pla ofTranslate(w/2,h/2);
ofScale(scale,scale,scale);
ofTranslate(-w/2,-h/2);
+ ofSetColor(255,255,255);
if (controlColours) list.layers[note]->draw(a,controllers,w,h,transparentBlack,colShift);
else list.layers[note]->draw(a,w,h,colShift);
ofPopMatrix();
@@ -144,7 +145,7 @@ void viewport::draw(float a,unsigned char* controllers,int xshift,int yshift,pla ofSetColor(255,255,255);
rb1.draw(0,0);
rb2.end();
-
+
ofPushMatrix();
ofTranslate(x+(w/2),y+(h/2));
ofRotate(r);
@@ -152,9 +153,9 @@ void viewport::draw(float a,unsigned char* controllers,int xshift,int yshift,pla ofTranslate(ox,oy);
rb2.draw(0,0);
-
+
ofPopStyle();
-
+
ofPopMatrix();
}
diff --git a/liveengine/src/viewport.h b/liveengine/src/viewport.h index 4e439b1..c401c17 100755 --- a/liveengine/src/viewport.h +++ b/liveengine/src/viewport.h @@ -7,19 +7,19 @@ #define NUM_NOTES 64
#define START_NOTE 36
-#define NUM_CONTROLLERS 6
+#define NUM_CONTROLLERS 26
#define START_CONTROLLER 102
#define NOTHING 0
#define BLOCKS 1
-#define LIST 2 +#define LIST 2
#define SOLID 3
void bindTexture(ofBaseHasTexture &t);
void unbindTexture(ofBaseHasTexture &t);
void bindTex(ofTexture &tex);
void unbindTex(ofTexture &tex); - +
#include "keyVar.h"
class viewport
@@ -63,7 +63,7 @@ class mappedviewport: public viewport { void mapdraw(float a,unsigned char* controllers,int xshift,int yshift,playlist &list,bool transparentBlack,int note,int mode,ofColor* controller_colours,bool controlColours,float scale,float fscale,float colShift);
ofxUserGenerator *rUser; private: - +
};
#endif // VIEWPORT_H
|
