| 781 | } |
| 782 | |
| 783 | void 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 | } |