From 7ae1f870faebb65e9ee3a064fc43ef2fc6955a84 Mon Sep 17 00:00:00 2001 From: Comment Date: Thu, 29 Nov 2012 19:13:19 +0000 Subject: work on asterisk plugin --- vfg/src/testApp.cpp | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) (limited to 'vfg/src/testApp.cpp') diff --git a/vfg/src/testApp.cpp b/vfg/src/testApp.cpp index d1cb41c..53cfa95 100755 --- a/vfg/src/testApp.cpp +++ b/vfg/src/testApp.cpp @@ -3,14 +3,16 @@ //-------------------------------------------------------------- void testApp::setup(){ - songs.push_back(new song("WeWishYouAMerryChistmas_v.2.1/VODA_MUS_WEWISHU_Backing_v.2.1.mp3","WeWishYouAMerryChistmas_v.2.1/VODA_MUS_WEWISHU_Lead_v.2.1.mp3","VODA_MUS_WEWISHU_Midi_v.2.1.xml","Lyrics_WeWishYou.2.1.xml","Levels_WeWishYou.2.1.xml")); + //songs.push_back(new song("WeWishYouAMerryChistmas_v.2.1/VODA_MUS_WEWISHU_Backing_v.2.1.mp3","WeWishYouAMerryChistmas_v.2.1/VODA_MUS_WEWISHU_Lead_v.2.1.mp3","VODA_MUS_WEWISHU_Midi_v.2.1.xml","Lyrics_WeWishYou.2.1.xml","Levels_WeWishYou.2.1.xml")); + songs.push_back(new song("DeckTheHalls_v.4.0/VODA_MUS_DeckTheHalls-Backing_v.4.0.mp3","DeckTheHalls_v.4.0/VODA_MUS_DeckTheHalls-Lead_v.4.0.mp3","VODA_MIDI_DeckTheHalls-v.4.0.xml","Lyrics_DeckTheHalls.4.0.xml","Levels_DeckTheHalls.4.0.xml")); songs.push_back(new song("DingDong.v.2.2/VODA_MUS_DingDong_Backing_v.2.2.mp3","DingDong.v.2.2/VODA_MUS_DingDong_Melody_v.2.2.mp3","VODA_MIDI_DingDong_v.2.2.xml","Lyrics_DingDong.2.2.xml","Levels_DingDong.2.2.xml")); songs.push_back(new song("JingleBells_v.4.0/VODA_MUS_JingleBells_Backing_v.4.0.mp3","JingleBells_v.4.0/VODA_MUS_JingleBells_Melody_v.4.0.mp3","VODA_MUS_JingleBells_MIDI_v.4.0.xml","Lyrics_JingleBells.4.0.xml","Levels_JingleBells.4.0.xml")); - songs.push_back(new song("DeckTheHalls_v.4.0/VODA_MUS_DeckTheHalls-Backing_v.4.0.mp3","DeckTheHalls_v.4.0/VODA_MUS_DeckTheHalls-Lead_v.4.0.mp3","VODA_MIDI_DeckTheHalls-v.4.0.xml","Lyrics_DeckTheHalls.4.0.xml","Levels_DeckTheHalls.4.0.xml")); ofSetBackgroundAuto(false); ofBackground(0,0,0); - + + //printf("we wish you a merry xmas:\n"); + //songs[0]->notes.printNotes(); for (int i=0;i<3;i++) penguins.push_back(Animal()); penguins[0].load("Penguin-Blue.xml"); @@ -54,7 +56,8 @@ void testApp::setup(){ vignette.loadImage("Vignette.png"); - showFPS=false; + showFPS=true; + showVis=true; currentsong=0; nextsong=0; @@ -91,8 +94,10 @@ void testApp::update(){ currentsong=nextsong; songs[currentsong]->setTimeframe(3000); songs[currentsong]->setFlakeThresh(1000,100); + songs[currentsong]->setKeyThresh(1000); songs[currentsong]->preRoll(750); tags[0]->play(); + nextsong=(nextsong+1)%songs.size(); } else if (ret>48&&ret<52) { songs[currentsong]->playerControl(ret-48); @@ -133,7 +138,7 @@ void testApp::draw(){ if (songs[currentsong]->isPlaying) { ofSetColor(255,255,255); - songs[currentsong]->drawNotes(); + if (showVis) songs[currentsong]->drawNotes(); int missed=songs[currentsong]->missedNote(); if (missed>-1) (*playanimal)[missed].playNow("Shudder"); int hit=songs[currentsong]->hitNote(); @@ -167,14 +172,15 @@ void testApp::draw(){ void testApp::keyPressed(int key){ switch (key) { case ' ': - nextsong=(nextsong+1)%songs.size(); if (!songs[currentsong]->isPlaying) { currentlevel=0; currentsong=nextsong; - songs[currentsong]->setTimeframe(3000); - songs[currentsong]->setFlakeThresh(1000,100); + songs[currentsong]->setTimeframe(5000); + songs[currentsong]->setFlakeThresh(2000,500); + songs[currentsong]->setKeyThresh(1500); songs[currentsong]->preRoll(750); tags[0]->play(); + nextsong=(nextsong+1)%songs.size(); } break; case '1': @@ -189,6 +195,9 @@ void testApp::keyPressed(int key){ case 'f': showFPS=!showFPS; break; + case 'v': + showVis=!showVis; + break; case 'r': //loadanimals("Raccoons"); playanimal =&raccoons; -- cgit v1.2.3