comparison Source/Mappings/Control/TouchkeyControlMappingFactory.cpp @ 43:fa39caec190b

Fix to default values of MIDI controllers
author Andrew McPherson <andrewm@eecs.qmul.ac.uk>
date Sat, 23 Aug 2014 21:39:46 +0100
parents 85577160a0d4
children 90ce403d0dc5
comparison
equal deleted inserted replaced
42:1526d2fbe01e 43:fa39caec190b
238 properties.setValue("outputDefault", outputDefault_); 238 properties.setValue("outputDefault", outputDefault_);
239 properties.setValue("threshold", threshold_); 239 properties.setValue("threshold", threshold_);
240 properties.setValue("ignoresTwoFingers", ignoresTwoFingers_); 240 properties.setValue("ignoresTwoFingers", ignoresTwoFingers_);
241 properties.setValue("ignoresThreeFingers", ignoresThreeFingers_); 241 properties.setValue("ignoresThreeFingers", ignoresThreeFingers_);
242 properties.setValue("direction", direction_); 242 properties.setValue("direction", direction_);
243 properties.setValue("use14Bit", use14BitControl_);
243 244
244 XmlElement* preset = properties.createXml("MappingFactory"); 245 XmlElement* preset = properties.createXml("MappingFactory");
245 preset->setAttribute("type", "Control"); 246 preset->setAttribute("type", "Control");
246 247
247 return preset; 248 return preset;
275 threshold_ = properties.getDoubleValue("threshold"); 276 threshold_ = properties.getDoubleValue("threshold");
276 ignoresTwoFingers_ = properties.getBoolValue("ignoresTwoFingers"); 277 ignoresTwoFingers_ = properties.getBoolValue("ignoresTwoFingers");
277 ignoresThreeFingers_ = properties.getBoolValue("ignoresThreeFingers"); 278 ignoresThreeFingers_ = properties.getBoolValue("ignoresThreeFingers");
278 direction_ = properties.getIntValue("direction"); 279 direction_ = properties.getIntValue("direction");
279 280
281 // These values added to later versions of the presets so check
282 // whether they actually exist or not
283 if(properties.containsKey("use14Bit"))
284 use14BitControl_ = properties.getBoolValue("use14Bit");
285
280 // Update MIDI information; this doesn't actually change the controller 286 // Update MIDI information; this doesn't actually change the controller
281 // (which is already set) but it adds a listener and updates the ranges 287 // (which is already set) but it adds a listener and updates the ranges
282 setController(midiControllerNumber_); 288 setController(midiControllerNumber_);
283 289
284 return true; 290 return true;