MCPcopy Create free account
hub / github.com/asb2m10/dexed / loadPreference

Method loadPreference

Source/PluginParam.cpp:783–851  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

781}
782
783void DexedAudioProcessor::loadPreference() {
784 File propFile = DexedAudioProcessor::dexedAppDir.getChildFile("Dexed.xml");
785 PropertiesFile::Options prefOptions;
786 PropertiesFile prop(propFile, prefOptions);
787
788 if ( ! prop.isValidFile() ) {
789 return;
790 }
791
792 if ( prop.containsKey( String("normalizeDxVelocity") ) ) {
793 normalizeDxVelocity = prop.getIntValue( String("normalizeDxVelocity") );
794 }
795
796 if ( prop.containsKey( String("pitchRange") ) ) {
797 controllers.values_[kControllerPitchRangeUp] = prop.getIntValue( String("pitchRange") );
798 }
799
800 if ( prop.containsKey( String("pitchRangeDn") ) ) {
801 controllers.values_[kControllerPitchRangeDn] = prop.getIntValue( String("pitchRangeDn") );
802 } else {
803 controllers.values_[kControllerPitchRangeDn] = controllers.values_[kControllerPitchRangeUp];
804 }
805
806 if ( prop.containsKey( String("pitchStep") ) ) {
807 controllers.values_[kControllerPitchStep] = prop.getIntValue( String("pitchStep") );
808 }
809
810 if ( prop.containsKey( String("sysexIn") ) ) {
811 sysexComm.setInput( prop.getValue("sysexIn") );
812 }
813
814 if ( prop.containsKey( String("sysexOut") ) ) {
815 sysexComm.setOutput( prop.getValue("sysexOut") );
816 }
817
818 if ( prop.containsKey( String("sysexChl") ) ) {
819 sysexComm.setChl( prop.getIntValue( String("sysexChl") ) );
820 }
821
822 if ( prop.containsKey( String("engineType") ) ) {
823 setEngineType(prop.getIntValue(String("engineType")));
824 }
825
826 if ( prop.containsKey( String("showKeyboard") ) ) {
827 showKeyboard = prop.getIntValue( String("showKeyboard") );
828 }
829
830 if ( prop.containsKey( String("wheelMod") ) ) {
831 controllers.wheel.parseConfig(prop.getValue(String("wheelMod")).toRawUTF8());
832 }
833
834 if ( prop.containsKey( String("footMod") ) ) {
835 controllers.foot.parseConfig(prop.getValue(String("footMod")).toRawUTF8());
836 }
837
838 if ( prop.containsKey( String("breathMod") ) ) {
839 controllers.breath.parseConfig(prop.getValue(String("breathMod")).toRawUTF8());
840 }

Callers

nothing calls this directly

Calls 6

setInputMethod · 0.80
getValueMethod · 0.80
setOutputMethod · 0.80
setChlMethod · 0.80
parseConfigMethod · 0.80
refreshMethod · 0.80

Tested by

no test coverage detected