コード例 #1
0
void bankManager::saveZone(ofxXmlSettings & XML, ofPtr<triggerZone> z){
    
    XML.addValue("NAME", z->getName());
    
    
    XML.addValue("POS_X", z->getPos().x);
    XML.addValue("POS_Y", z->getPos().y);
    XML.addValue("POS_Z", z->getPos().z);
    
    XML.addValue("SHAPE", z->getShape());
    
    XML.addValue("DIM_X", z->getBoxDims().x);
    XML.addValue("DIM_Y", z->getBoxDims().y);
    XML.addValue("DIM_Z", z->getBoxDims().z);
    XML.addValue("RADIUS", z->getRadius());
    XML.addValue("SOUNDFILE", z->getSoundFileName());
    XML.addValue("IS_LOOP", z->getIsLoop());
    XML.addValue("IS_PLAY_TO_END", z->getIsPlayToEnd());
    XML.addValue("INVERTED", z->getIsOccInvert()); //left as is for compatability
    XML.addValue("MOV_ENABLED", z->getIsMovEnabled());
    XML.addValue("MOV_INVERTED", z->getIsMovInvert());
    XML.addValue("ENABLED", z->getIsEnabled());
    //XML.addValue("SENSITIVITY", z->getSensitivity());
    XML.addValue("MIN_REPLAY", z->getMinReplaySecs());
    XML.addValue("CHANGE_BUFF", z->getChangeBuff());
    XML.addValue("SYNTH_TYPE", z->getSynthType());
    XML.addValue("SELECTOR_TYPE", z->getSelectorType());
    
    saveSynth(XML, z);
    

}
コード例 #2
0
void bankManager::loadZone(ofxXmlSettings & XML, ofPtr<triggerZone> z){
    
    z->setName(XML.getValue("NAME", ""));
    z->setShape(XML.getValue("SHAPE", 0));
    z->setPosX(XML.getValue("POS_X", 0.0));
    z->setPosY(XML.getValue("POS_Y", 0.0));
    z->setPosZ(XML.getValue("POS_Z", 0.0));
    z->setBoxDimsX( XML.getValue("DIM_X", 0.5));
    z->setBoxDimsY( XML.getValue("DIM_Y", 0.5));
    z->setBoxDimsZ( XML.getValue("DIM_Z", 0.5));
    z->setRadius(XML.getValue("RADIUS",1.0));
    z->setSoundFile(XML.getValue("SOUNDFILE", ""));
    z->setIsPlayToEnd(XML.getValue("IS_PLAY_TO_END", false));
    z->setIsOccInvert(XML.getValue("INVERTED", false));
    z->setIsMovEnabled(XML.getValue("MOV_ENABLED", false));
    z->setIsMovInvert(XML.getValue("MOV_INVERTED", false));
    z->setIsLoop(XML.getValue("IS_LOOP", true));
    z->setIsEnabled(XML.getValue("ENABLED", false), true);
    //z->setSensitivity(XML.getValue("SENSITIVITY", 1.0));
    z->setMinReplaySecs(XML.getValue("MIN_REPLAY", 0.0));
    z->setChangeBuff(XML.getValue("CHANGE_BUFF", z->getChangeBuff()));
    z->setSynthType(XML.getValue("SYNTH_TYPE", 0)); //loading flag to prevent OSC update
    z->setSelectorType(XML.getValue("SELECTOR_TYPE", z->getSelectorType()));
    
    loadSynth(XML, z);

}
コード例 #3
0
ファイル: testApp.cpp プロジェクト: kimon-satan/danceTracker
void testApp::updateTZGuiElements(ofPtr<triggerZone> zn){
    
    sc2TextInput[1]->setTextString(zn->getName());
    sc2TextInput[2]->setTextString(zn->getSoundFileName());
    
    ofVec3f tp = zn->getPos();
    tPosX->setValue(tp.x);
    tPosY->setValue(tp.y);
    tPosZ->setValue(tp.z);
    
    radSlid->setValue(zn->getRadius());
    eblTog->setValue(zn->getIsEnabled());
    loopTog->setValue(zn->getIsLoop());
    playToEndTog->setValue(zn->getIsPlayToEnd());
    occInvTog->setValue(zn->getIsOccInvert());
    movEnaTog->setValue(zn->getIsMovEnabled());
    movInvTog->setValue(zn->getIsMovInvert());
    
    xDimSlid->setValue(zn->getBoxDims().x);
    yDimSlid->setValue(zn->getBoxDims().y);
    zDimSlid->setValue(zn->getBoxDims().z);
    
    
    //sensSlider->setValue(zn->getSensitivity());
    repSlider->setValue(zn->getMinReplaySecs());
    cbSlider->setValue(zn->getChangeBuff());
    synthTypeDisp->setLabel("SYNTH_TYPE: " + synthDictionary::getSynthString(zn->getSynthType()));
    selTypeDisp->setLabel("SELECTOR_TYPE: " + synthDictionary::getSelectorString(zn->getSelectorType()));
    shapeText->setTextString(zn->getShapeString());
    zn->setIsSelected(true);
    
    
}