use crate::{ audio_module::{ AudioModuleType, Oscillator::{self, RetriggerStyle, SmoothStyle, VoiceType}, }, fx::{ delay::{DelaySnapValues, DelayType}, saturation::SaturationType, ArduraFilter, StateVariableFilter::ResonanceType, }, ActuatePreset, FilterAlgorithms, FilterRouting, LFOController, ModulationDestination, ModulationSource, PitchRouting, PresetType, }; use serde::{Deserialize, Serialize}; // This file is supposed to contain all the long form preset formats and convert from older formats to newer by filling in missing fields // This will probably get messier in future but since it is outside the main lib.rs it should keep some of the changes simpler overall /// This is the structure that represents a storable preset value #[derive(Serialize, Deserialize, Clone)] pub struct ActuatePresetOld { // Information preset_name: String, preset_info: String, preset_category: PresetType, // Preset tag information - made into bools to make my life easier tag_acid: bool, tag_analog: bool, tag_bright: bool, tag_chord: bool, tag_crisp: bool, tag_deep: bool, tag_delicate: bool, tag_hard: bool, tag_harsh: bool, tag_lush: bool, tag_mellow: bool, tag_resonant: bool, tag_rich: bool, tag_sharp: bool, tag_silky: bool, tag_smooth: bool, tag_soft: bool, tag_stab: bool, tag_warm: bool, // Modules 1 /////////////////////////////////////////////////////////// mod1_audio_module_type: AudioModuleType, mod1_audio_module_level: f32, // Granulizer/Sampler mod1_loaded_sample: Vec<Vec<f32>>, mod1_sample_lib: Vec<Vec<Vec<f32>>>, mod1_loop_wavetable: bool, mod1_single_cycle: bool, mod1_restretch: bool, mod1_prev_restretch: bool, mod1_grain_hold: i32, mod1_grain_gap: i32, mod1_start_position: f32, mod1_end_position: f32, mod1_grain_crossfade: i32, // Osc module knob storage mod1_osc_type: VoiceType, mod1_osc_octave: i32, mod1_osc_semitones: i32, mod1_osc_detune: f32, mod1_osc_attack: f32, mod1_osc_decay: f32, mod1_osc_sustain: f32, mod1_osc_release: f32, mod1_osc_retrigger: RetriggerStyle, mod1_osc_atk_curve: SmoothStyle, mod1_osc_dec_curve: SmoothStyle, mod1_osc_rel_curve: SmoothStyle, mod1_osc_unison: i32, mod1_osc_unison_detune: f32, mod1_osc_stereo: f32, // Modules 2 /////////////////////////////////////////////////////////// mod2_audio_module_type: AudioModuleType, mod2_audio_module_level: f32, // Granulizer/Sampler mod2_loaded_sample: Vec<Vec<f32>>, mod2_sample_lib: Vec<Vec<Vec<f32>>>, mod2_loop_wavetable: bool, mod2_single_cycle: bool, mod2_restretch: bool, mod2_prev_restretch: bool, mod2_grain_hold: i32, mod2_grain_gap: i32, mod2_start_position: f32, mod2_end_position: f32, mod2_grain_crossfade: i32, // Osc module knob storage mod2_osc_type: VoiceType, mod2_osc_octave: i32, mod2_osc_semitones: i32, mod2_osc_detune: f32, mod2_osc_attack: f32, mod2_osc_decay: f32, mod2_osc_sustain: f32, mod2_osc_release: f32, mod2_osc_retrigger: RetriggerStyle, mod2_osc_atk_curve: SmoothStyle, mod2_osc_dec_curve: SmoothStyle, mod2_osc_rel_curve: SmoothStyle, mod2_osc_unison: i32, mod2_osc_unison_detune: f32, mod2_osc_stereo: f32, // Modules 3 /////////////////////////////////////////////////////////// mod3_audio_module_type: AudioModuleType, mod3_audio_module_level: f32, // Granulizer/Sampler mod3_loaded_sample: Vec<Vec<f32>>, mod3_sample_lib: Vec<Vec<Vec<f32>>>, mod3_loop_wavetable: bool, mod3_single_cycle: bool, mod3_restretch: bool, mod3_prev_restretch: bool, mod3_grain_hold: i32, mod3_grain_gap: i32, mod3_start_position: f32, mod3_end_position: f32, mod3_grain_crossfade: i32, // Osc module knob storage mod3_osc_type: VoiceType, mod3_osc_octave: i32, mod3_osc_semitones: i32, mod3_osc_detune: f32, mod3_osc_attack: f32, mod3_osc_decay: f32, mod3_osc_sustain: f32, mod3_osc_release: f32, mod3_osc_retrigger: RetriggerStyle, mod3_osc_atk_curve: SmoothStyle, mod3_osc_dec_curve: SmoothStyle, mod3_osc_rel_curve: SmoothStyle, mod3_osc_unison: i32, mod3_osc_unison_detune: f32, mod3_osc_stereo: f32, // Filters filter_wet: f32, filter_cutoff: f32, filter_resonance: f32, filter_res_type: ResonanceType, filter_lp_amount: f32, filter_hp_amount: f32, filter_bp_amount: f32, filter_env_peak: f32, filter_env_attack: f32, filter_env_decay: f32, filter_env_sustain: f32, filter_env_release: f32, filter_env_atk_curve: Oscillator::SmoothStyle, filter_env_dec_curve: Oscillator::SmoothStyle, filter_env_rel_curve: Oscillator::SmoothStyle, filter_alg_type: FilterAlgorithms, tilt_filter_type: ArduraFilter::ResponseType, filter_wet_2: f32, filter_cutoff_2: f32, filter_resonance_2: f32, filter_res_type_2: ResonanceType, filter_lp_amount_2: f32, filter_hp_amount_2: f32, filter_bp_amount_2: f32, filter_env_peak_2: f32, filter_env_attack_2: f32, filter_env_decay_2: f32, filter_env_sustain_2: f32, filter_env_release_2: f32, filter_env_atk_curve_2: Oscillator::SmoothStyle, filter_env_dec_curve_2: Oscillator::SmoothStyle, filter_env_rel_curve_2: Oscillator::SmoothStyle, filter_alg_type_2: FilterAlgorithms, tilt_filter_type_2: ArduraFilter::ResponseType, filter_routing: FilterRouting, // MISSING IN OLDER STRUCTS /////////////////////////////////////////////////////////////////////////// // filter_cutoff_link: bool, /////////////////////////////////////////////////////////////////////////// // LFOs lfo1_enable: bool, lfo2_enable: bool, lfo3_enable: bool, lfo1_freq: f32, lfo1_retrigger: LFOController::LFORetrigger, lfo1_sync: bool, lfo1_snap: LFOController::LFOSnapValues, lfo1_waveform: LFOController::Waveform, lfo1_phase: f32, lfo2_freq: f32, lfo2_retrigger: LFOController::LFORetrigger, lfo2_sync: bool, lfo2_snap: LFOController::LFOSnapValues, lfo2_waveform: LFOController::Waveform, lfo2_phase: f32, lfo3_freq: f32, lfo3_retrigger: LFOController::LFORetrigger, lfo3_sync: bool, lfo3_snap: LFOController::LFOSnapValues, lfo3_waveform: LFOController::Waveform, lfo3_phase: f32, // Modulation mod_source_1: ModulationSource, mod_source_2: ModulationSource, mod_source_3: ModulationSource, mod_source_4: ModulationSource, mod_dest_1: ModulationDestination, mod_dest_2: ModulationDestination, mod_dest_3: ModulationDestination, mod_dest_4: ModulationDestination, mod_amount_1: f32, mod_amount_2: f32, mod_amount_3: f32, mod_amount_4: f32, // EQ pre_use_eq: bool, pre_low_freq: f32, pre_mid_freq: f32, pre_high_freq: f32, pre_low_gain: f32, pre_mid_gain: f32, pre_high_gain: f32, // FX use_fx: bool, use_compressor: bool, comp_amt: f32, comp_atk: f32, comp_rel: f32, comp_drive: f32, use_abass: bool, abass_amount: f32, use_saturation: bool, sat_amount: f32, sat_type: SaturationType, use_delay: bool, delay_amount: f32, delay_time: DelaySnapValues, delay_decay: f32, delay_type: DelayType, use_reverb: bool, reverb_amount: f32, reverb_size: f32, reverb_feedback: f32, use_phaser: bool, phaser_amount: f32, phaser_depth: f32, phaser_rate: f32, phaser_feedback: f32, use_buffermod: bool, buffermod_amount: f32, buffermod_depth: f32, buffermod_rate: f32, buffermod_spread: f32, buffermod_timing: f32, use_flanger: bool, flanger_amount: f32, flanger_depth: f32, flanger_rate: f32, flanger_feedback: f32, use_limiter: bool, limiter_threshold: f32, limiter_knee: f32, } /// This is the structure that represents a storable preset value #[derive(Serialize, Deserialize, Clone)] pub struct ActuatePresetV114 { // Information preset_name: String, preset_info: String, preset_category: PresetType, // Preset tag information - made into bools to make my life easier tag_acid: bool, tag_analog: bool, tag_bright: bool, tag_chord: bool, tag_crisp: bool, tag_deep: bool, tag_delicate: bool, tag_hard: bool, tag_harsh: bool, tag_lush: bool, tag_mellow: bool, tag_resonant: bool, tag_rich: bool, tag_sharp: bool, tag_silky: bool, tag_smooth: bool, tag_soft: bool, tag_stab: bool, tag_warm: bool, // Modules 1 /////////////////////////////////////////////////////////// mod1_audio_module_type: AudioModuleType, mod1_audio_module_level: f32, // Granulizer/Sampler mod1_loaded_sample: Vec<Vec<f32>>, mod1_sample_lib: Vec<Vec<Vec<f32>>>, mod1_loop_wavetable: bool, mod1_single_cycle: bool, mod1_restretch: bool, mod1_prev_restretch: bool, mod1_grain_hold: i32, mod1_grain_gap: i32, mod1_start_position: f32, mod1_end_position: f32, mod1_grain_crossfade: i32, // Osc module knob storage mod1_osc_type: VoiceType, mod1_osc_octave: i32, mod1_osc_semitones: i32, mod1_osc_detune: f32, mod1_osc_attack: f32, mod1_osc_decay: f32, mod1_osc_sustain: f32, mod1_osc_release: f32, mod1_osc_retrigger: RetriggerStyle, mod1_osc_atk_curve: SmoothStyle, mod1_osc_dec_curve: SmoothStyle, mod1_osc_rel_curve: SmoothStyle, mod1_osc_unison: i32, mod1_osc_unison_detune: f32, mod1_osc_stereo: f32, // Modules 2 /////////////////////////////////////////////////////////// mod2_audio_module_type: AudioModuleType, mod2_audio_module_level: f32, // Granulizer/Sampler mod2_loaded_sample: Vec<Vec<f32>>, mod2_sample_lib: Vec<Vec<Vec<f32>>>, mod2_loop_wavetable: bool, mod2_single_cycle: bool, mod2_restretch: bool, mod2_prev_restretch: bool, mod2_grain_hold: i32, mod2_grain_gap: i32, mod2_start_position: f32, mod2_end_position: f32, mod2_grain_crossfade: i32, // Osc module knob storage mod2_osc_type: VoiceType, mod2_osc_octave: i32, mod2_osc_semitones: i32, mod2_osc_detune: f32, mod2_osc_attack: f32, mod2_osc_decay: f32, mod2_osc_sustain: f32, mod2_osc_release: f32, mod2_osc_retrigger: RetriggerStyle, mod2_osc_atk_curve: SmoothStyle, mod2_osc_dec_curve: SmoothStyle, mod2_osc_rel_curve: SmoothStyle, mod2_osc_unison: i32, mod2_osc_unison_detune: f32, mod2_osc_stereo: f32, // Modules 3 /////////////////////////////////////////////////////////// mod3_audio_module_type: AudioModuleType, mod3_audio_module_level: f32, // Granulizer/Sampler mod3_loaded_sample: Vec<Vec<f32>>, mod3_sample_lib: Vec<Vec<Vec<f32>>>, mod3_loop_wavetable: bool, mod3_single_cycle: bool, mod3_restretch: bool, mod3_prev_restretch: bool, mod3_grain_hold: i32, mod3_grain_gap: i32, mod3_start_position: f32, mod3_end_position: f32, mod3_grain_crossfade: i32, // Osc module knob storage mod3_osc_type: VoiceType, mod3_osc_octave: i32, mod3_osc_semitones: i32, mod3_osc_detune: f32, mod3_osc_attack: f32, mod3_osc_decay: f32, mod3_osc_sustain: f32, mod3_osc_release: f32, mod3_osc_retrigger: RetriggerStyle, mod3_osc_atk_curve: SmoothStyle, mod3_osc_dec_curve: SmoothStyle, mod3_osc_rel_curve: SmoothStyle, mod3_osc_unison: i32, mod3_osc_unison_detune: f32, mod3_osc_stereo: f32, // Filters filter_wet: f32, filter_cutoff: f32, filter_resonance: f32, filter_res_type: ResonanceType, filter_lp_amount: f32, filter_hp_amount: f32, filter_bp_amount: f32, filter_env_peak: f32, filter_env_attack: f32, filter_env_decay: f32, filter_env_sustain: f32, filter_env_release: f32, filter_env_atk_curve: Oscillator::SmoothStyle, filter_env_dec_curve: Oscillator::SmoothStyle, filter_env_rel_curve: Oscillator::SmoothStyle, filter_alg_type: FilterAlgorithms, tilt_filter_type: ArduraFilter::ResponseType, filter_wet_2: f32, filter_cutoff_2: f32, filter_resonance_2: f32, filter_res_type_2: ResonanceType, filter_lp_amount_2: f32, filter_hp_amount_2: f32, filter_bp_amount_2: f32, filter_env_peak_2: f32, filter_env_attack_2: f32, filter_env_decay_2: f32, filter_env_sustain_2: f32, filter_env_release_2: f32, filter_env_atk_curve_2: Oscillator::SmoothStyle, filter_env_dec_curve_2: Oscillator::SmoothStyle, filter_env_rel_curve_2: Oscillator::SmoothStyle, filter_alg_type_2: FilterAlgorithms, tilt_filter_type_2: ArduraFilter::ResponseType, filter_routing: FilterRouting, filter_cutoff_link: bool, /////////////////////////////////////////////////////////////////////////// // MISSING IN OLDER STRUCTS // PITCH STUFF // // pitch_enable: false, // pitch_env_peak: 0.0, // pitch_env_atk_curve: SmoothStyle::Linear, // pitch_env_dec_curve: SmoothStyle::Linear, // pitch_env_rel_curve: SmoothStyle::Linear, // pitch_env_attack: 0.0, // pitch_env_decay: 300.0, // pitch_env_release: 0.0, // pitch_env_sustain: 0.0, // pitch_routing: PitchRouting::Osc1, // pitch_enable_2: false, // pitch_env_peak_2: 0.0, // pitch_env_atk_curve_2: SmoothStyle::Linear, // pitch_env_dec_curve_2: SmoothStyle::Linear, // pitch_env_rel_curve_2: SmoothStyle::Linear, // pitch_env_attack_2: 0.0, // pitch_env_decay_2: 300.0, // pitch_env_release_2: 0.0, // pitch_env_sustain_2: 0.0, // pitch_routing_2: PitchRouting::Osc1, /////////////////////////////////////////////////////////////////////////// // LFOs lfo1_enable: bool, lfo2_enable: bool, lfo3_enable: bool, lfo1_freq: f32, lfo1_retrigger: LFOController::LFORetrigger, lfo1_sync: bool, lfo1_snap: LFOController::LFOSnapValues, lfo1_waveform: LFOController::Waveform, lfo1_phase: f32, lfo2_freq: f32, lfo2_retrigger: LFOController::LFORetrigger, lfo2_sync: bool, lfo2_snap: LFOController::LFOSnapValues, lfo2_waveform: LFOController::Waveform, lfo2_phase: f32, lfo3_freq: f32, lfo3_retrigger: LFOController::LFORetrigger, lfo3_sync: bool, lfo3_snap: LFOController::LFOSnapValues, lfo3_waveform: LFOController::Waveform, lfo3_phase: f32, // Modulation mod_source_1: ModulationSource, mod_source_2: ModulationSource, mod_source_3: ModulationSource, mod_source_4: ModulationSource, mod_dest_1: ModulationDestination, mod_dest_2: ModulationDestination, mod_dest_3: ModulationDestination, mod_dest_4: ModulationDestination, mod_amount_1: f32, mod_amount_2: f32, mod_amount_3: f32, mod_amount_4: f32, // EQ pre_use_eq: bool, pre_low_freq: f32, pre_mid_freq: f32, pre_high_freq: f32, pre_low_gain: f32, pre_mid_gain: f32, pre_high_gain: f32, // FX use_fx: bool, use_compressor: bool, comp_amt: f32, comp_atk: f32, comp_rel: f32, comp_drive: f32, use_abass: bool, abass_amount: f32, use_saturation: bool, sat_amount: f32, sat_type: SaturationType, use_delay: bool, delay_amount: f32, delay_time: DelaySnapValues, delay_decay: f32, delay_type: DelayType, use_reverb: bool, reverb_amount: f32, reverb_size: f32, reverb_feedback: f32, use_phaser: bool, phaser_amount: f32, phaser_depth: f32, phaser_rate: f32, phaser_feedback: f32, use_buffermod: bool, buffermod_amount: f32, buffermod_depth: f32, buffermod_rate: f32, buffermod_spread: f32, buffermod_timing: f32, use_flanger: bool, flanger_amount: f32, flanger_depth: f32, flanger_rate: f32, flanger_feedback: f32, use_limiter: bool, limiter_threshold: f32, limiter_knee: f32, } // This takes the deserialized message pack and converts it into the struct from 1.1.4 // This then attempts to return the newer preset format after pub fn load_unserialized_v114(file_data: Vec<u8>) -> ActuatePreset { let old_unserialized: ActuatePresetV114 = rmp_serde::from_slice(&file_data).unwrap_or(ActuatePresetV114 { preset_name: "Error Importing".to_string(), preset_info: "Corrupted preset or incompatible version".to_string(), preset_category: PresetType::Select, tag_acid: false, tag_analog: false, tag_bright: false, tag_chord: false, tag_crisp: false, tag_deep: false, tag_delicate: false, tag_hard: false, tag_harsh: false, tag_lush: false, tag_mellow: false, tag_resonant: false, tag_rich: false, tag_sharp: false, tag_silky: false, tag_smooth: false, tag_soft: false, tag_stab: false, tag_warm: false, mod1_audio_module_type: AudioModuleType::Osc, mod1_audio_module_level: 1.0, mod1_loaded_sample: vec![vec![0.0, 0.0]], mod1_sample_lib: vec![vec![vec![0.0, 0.0]]], mod1_loop_wavetable: false, mod1_single_cycle: false, mod1_restretch: true, mod1_prev_restretch: false, mod1_grain_hold: 200, mod1_grain_gap: 200, mod1_start_position: 0.0, mod1_end_position: 1.0, mod1_grain_crossfade: 50, mod1_osc_type: VoiceType::Sine, mod1_osc_octave: 0, mod1_osc_semitones: 0, mod1_osc_detune: 0.0, mod1_osc_attack: 0.0001, mod1_osc_decay: 0.0001, mod1_osc_sustain: 999.9, mod1_osc_release: 5.0, mod1_osc_retrigger: RetriggerStyle::Retrigger, mod1_osc_atk_curve: SmoothStyle::Linear, mod1_osc_dec_curve: SmoothStyle::Linear, mod1_osc_rel_curve: SmoothStyle::Linear, mod1_osc_unison: 1, mod1_osc_unison_detune: 0.0, mod1_osc_stereo: 0.0, mod2_audio_module_type: AudioModuleType::Off, mod2_audio_module_level: 1.0, mod2_loaded_sample: vec![vec![0.0, 0.0]], mod2_sample_lib: vec![vec![vec![0.0, 0.0]]], mod2_loop_wavetable: false, mod2_single_cycle: false, mod2_restretch: true, mod2_prev_restretch: false, mod2_grain_hold: 200, mod2_grain_gap: 200, mod2_start_position: 0.0, mod2_end_position: 1.0, mod2_grain_crossfade: 50, mod2_osc_type: VoiceType::Sine, mod2_osc_octave: 0, mod2_osc_semitones: 0, mod2_osc_detune: 0.0, mod2_osc_attack: 0.0001, mod2_osc_decay: 0.0001, mod2_osc_sustain: 999.9, mod2_osc_release: 5.0, mod2_osc_retrigger: RetriggerStyle::Retrigger, mod2_osc_atk_curve: SmoothStyle::Linear, mod2_osc_dec_curve: SmoothStyle::Linear, mod2_osc_rel_curve: SmoothStyle::Linear, mod2_osc_unison: 1, mod2_osc_unison_detune: 0.0, mod2_osc_stereo: 0.0, mod3_audio_module_type: AudioModuleType::Off, mod3_audio_module_level: 1.0, mod3_loaded_sample: vec![vec![0.0, 0.0]], mod3_sample_lib: vec![vec![vec![0.0, 0.0]]], mod3_loop_wavetable: false, mod3_single_cycle: false, mod3_restretch: true, mod3_prev_restretch: false, mod3_grain_hold: 200, mod3_grain_gap: 200, mod3_start_position: 0.0, mod3_end_position: 1.0, mod3_grain_crossfade: 50, mod3_osc_type: VoiceType::Sine, mod3_osc_octave: 0, mod3_osc_semitones: 0, mod3_osc_detune: 0.0, mod3_osc_attack: 0.0001, mod3_osc_decay: 0.0001, mod3_osc_sustain: 999.9, mod3_osc_release: 5.0, mod3_osc_retrigger: RetriggerStyle::Retrigger, mod3_osc_atk_curve: SmoothStyle::Linear, mod3_osc_dec_curve: SmoothStyle::Linear, mod3_osc_rel_curve: SmoothStyle::Linear, mod3_osc_unison: 1, mod3_osc_unison_detune: 0.0, mod3_osc_stereo: 0.0, filter_wet: 1.0, filter_cutoff: 20000.0, filter_resonance: 1.0, filter_res_type: ResonanceType::Default, filter_lp_amount: 1.0, filter_hp_amount: 0.0, filter_bp_amount: 0.0, filter_env_peak: 0.0, filter_env_attack: 0.0, filter_env_decay: 0.0001, filter_env_sustain: 999.9, filter_env_release: 5.0, filter_env_atk_curve: SmoothStyle::Linear, filter_env_dec_curve: SmoothStyle::Linear, filter_env_rel_curve: SmoothStyle::Linear, filter_alg_type: FilterAlgorithms::SVF, tilt_filter_type: ArduraFilter::ResponseType::Lowpass, filter_wet_2: 1.0, filter_cutoff_2: 20000.0, filter_resonance_2: 1.0, filter_res_type_2: ResonanceType::Default, filter_lp_amount_2: 1.0, filter_hp_amount_2: 0.0, filter_bp_amount_2: 0.0, filter_env_peak_2: 0.0, filter_env_attack_2: 0.0, filter_env_decay_2: 0.0001, filter_env_sustain_2: 999.9, filter_env_release_2: 5.0, filter_env_atk_curve_2: SmoothStyle::Linear, filter_env_dec_curve_2: SmoothStyle::Linear, filter_env_rel_curve_2: SmoothStyle::Linear, filter_alg_type_2: FilterAlgorithms::SVF, tilt_filter_type_2: ArduraFilter::ResponseType::Lowpass, filter_routing: FilterRouting::Parallel, filter_cutoff_link: false, // LFOs lfo1_enable: false, lfo2_enable: false, lfo3_enable: false, lfo1_freq: 2.0, lfo1_retrigger: LFOController::LFORetrigger::None, lfo1_sync: true, lfo1_snap: LFOController::LFOSnapValues::Half, lfo1_waveform: LFOController::Waveform::Sine, lfo1_phase: 0.0, lfo2_freq: 2.0, lfo2_retrigger: LFOController::LFORetrigger::None, lfo2_sync: true, lfo2_snap: LFOController::LFOSnapValues::Half, lfo2_waveform: LFOController::Waveform::Sine, lfo2_phase: 0.0, lfo3_freq: 2.0, lfo3_retrigger: LFOController::LFORetrigger::None, lfo3_sync: true, lfo3_snap: LFOController::LFOSnapValues::Half, lfo3_waveform: LFOController::Waveform::Sine, lfo3_phase: 0.0, // Modulations mod_source_1: ModulationSource::None, mod_source_2: ModulationSource::None, mod_source_3: ModulationSource::None, mod_source_4: ModulationSource::None, mod_dest_1: ModulationDestination::None, mod_dest_2: ModulationDestination::None, mod_dest_3: ModulationDestination::None, mod_dest_4: ModulationDestination::None, mod_amount_1: 0.0, mod_amount_2: 0.0, mod_amount_3: 0.0, mod_amount_4: 0.0, // EQ pre_use_eq: false, pre_low_freq: 800.0, pre_mid_freq: 3000.0, pre_high_freq: 10000.0, pre_low_gain: 0.0, pre_mid_gain: 0.0, pre_high_gain: 0.0, // FX use_fx: true, use_compressor: false, comp_amt: 0.5, comp_atk: 0.5, comp_rel: 0.5, comp_drive: 0.5, use_abass: false, abass_amount: 0.0011, use_saturation: false, sat_amount: 0.0, sat_type: SaturationType::Tape, use_delay: false, delay_amount: 0.0, delay_time: DelaySnapValues::Quarter, delay_decay: 0.0, delay_type: DelayType::Stereo, use_reverb: false, reverb_amount: 0.5, reverb_size: 0.5, reverb_feedback: 0.5, use_phaser: false, phaser_amount: 0.5, phaser_depth: 0.5, phaser_rate: 0.5, phaser_feedback: 0.5, use_buffermod: false, buffermod_amount: 0.5, buffermod_depth: 0.5, buffermod_rate: 0.5, buffermod_spread: 0.0, buffermod_timing: 620.0, use_flanger: false, flanger_amount: 0.5, flanger_depth: 0.5, flanger_rate: 0.5, flanger_feedback: 0.5, use_limiter: false, limiter_threshold: 0.5, limiter_knee: 0.5, }); convert_preset_v114(old_unserialized) } // This takes the deserialized message pack and converts it into the old struct if it can // This then attempts to return the newer preset format after pub fn load_unserialized_old(file_data: Vec<u8>) -> ActuatePreset { let old_unserialized: ActuatePresetOld = rmp_serde::from_slice(&file_data).unwrap_or(ActuatePresetOld { preset_name: "Error Importing".to_string(), preset_info: "Corrupted preset or incompatible version".to_string(), preset_category: PresetType::Select, tag_acid: false, tag_analog: false, tag_bright: false, tag_chord: false, tag_crisp: false, tag_deep: false, tag_delicate: false, tag_hard: false, tag_harsh: false, tag_lush: false, tag_mellow: false, tag_resonant: false, tag_rich: false, tag_sharp: false, tag_silky: false, tag_smooth: false, tag_soft: false, tag_stab: false, tag_warm: false, mod1_audio_module_type: AudioModuleType::Osc, mod1_audio_module_level: 1.0, mod1_loaded_sample: vec![vec![0.0, 0.0]], mod1_sample_lib: vec![vec![vec![0.0, 0.0]]], mod1_loop_wavetable: false, mod1_single_cycle: false, mod1_restretch: true, mod1_prev_restretch: false, mod1_grain_hold: 200, mod1_grain_gap: 200, mod1_start_position: 0.0, mod1_end_position: 1.0, mod1_grain_crossfade: 50, mod1_osc_type: VoiceType::Sine, mod1_osc_octave: 0, mod1_osc_semitones: 0, mod1_osc_detune: 0.0, mod1_osc_attack: 0.0001, mod1_osc_decay: 0.0001, mod1_osc_sustain: 999.9, mod1_osc_release: 5.0, mod1_osc_retrigger: RetriggerStyle::Retrigger, mod1_osc_atk_curve: SmoothStyle::Linear, mod1_osc_dec_curve: SmoothStyle::Linear, mod1_osc_rel_curve: SmoothStyle::Linear, mod1_osc_unison: 1, mod1_osc_unison_detune: 0.0, mod1_osc_stereo: 0.0, mod2_audio_module_type: AudioModuleType::Off, mod2_audio_module_level: 1.0, mod2_loaded_sample: vec![vec![0.0, 0.0]], mod2_sample_lib: vec![vec![vec![0.0, 0.0]]], mod2_loop_wavetable: false, mod2_single_cycle: false, mod2_restretch: true, mod2_prev_restretch: false, mod2_grain_hold: 200, mod2_grain_gap: 200, mod2_start_position: 0.0, mod2_end_position: 1.0, mod2_grain_crossfade: 50, mod2_osc_type: VoiceType::Sine, mod2_osc_octave: 0, mod2_osc_semitones: 0, mod2_osc_detune: 0.0, mod2_osc_attack: 0.0001, mod2_osc_decay: 0.0001, mod2_osc_sustain: 999.9, mod2_osc_release: 5.0, mod2_osc_retrigger: RetriggerStyle::Retrigger, mod2_osc_atk_curve: SmoothStyle::Linear, mod2_osc_dec_curve: SmoothStyle::Linear, mod2_osc_rel_curve: SmoothStyle::Linear, mod2_osc_unison: 1, mod2_osc_unison_detune: 0.0, mod2_osc_stereo: 0.0, mod3_audio_module_type: AudioModuleType::Off, mod3_audio_module_level: 1.0, mod3_loaded_sample: vec![vec![0.0, 0.0]], mod3_sample_lib: vec![vec![vec![0.0, 0.0]]], mod3_loop_wavetable: false, mod3_single_cycle: false, mod3_restretch: true, mod3_prev_restretch: false, mod3_grain_hold: 200, mod3_grain_gap: 200, mod3_start_position: 0.0, mod3_end_position: 1.0, mod3_grain_crossfade: 50, mod3_osc_type: VoiceType::Sine, mod3_osc_octave: 0, mod3_osc_semitones: 0, mod3_osc_detune: 0.0, mod3_osc_attack: 0.0001, mod3_osc_decay: 0.0001, mod3_osc_sustain: 999.9, mod3_osc_release: 5.0, mod3_osc_retrigger: RetriggerStyle::Retrigger, mod3_osc_atk_curve: SmoothStyle::Linear, mod3_osc_dec_curve: SmoothStyle::Linear, mod3_osc_rel_curve: SmoothStyle::Linear, mod3_osc_unison: 1, mod3_osc_unison_detune: 0.0, mod3_osc_stereo: 0.0, filter_wet: 1.0, filter_cutoff: 20000.0, filter_resonance: 1.0, filter_res_type: ResonanceType::Default, filter_lp_amount: 1.0, filter_hp_amount: 0.0, filter_bp_amount: 0.0, filter_env_peak: 0.0, filter_env_attack: 0.0, filter_env_decay: 0.0001, filter_env_sustain: 999.9, filter_env_release: 5.0, filter_env_atk_curve: SmoothStyle::Linear, filter_env_dec_curve: SmoothStyle::Linear, filter_env_rel_curve: SmoothStyle::Linear, filter_alg_type: FilterAlgorithms::SVF, tilt_filter_type: ArduraFilter::ResponseType::Lowpass, filter_wet_2: 1.0, filter_cutoff_2: 20000.0, filter_resonance_2: 1.0, filter_res_type_2: ResonanceType::Default, filter_lp_amount_2: 1.0, filter_hp_amount_2: 0.0, filter_bp_amount_2: 0.0, filter_env_peak_2: 0.0, filter_env_attack_2: 0.0, filter_env_decay_2: 0.0001, filter_env_sustain_2: 999.9, filter_env_release_2: 5.0, filter_env_atk_curve_2: SmoothStyle::Linear, filter_env_dec_curve_2: SmoothStyle::Linear, filter_env_rel_curve_2: SmoothStyle::Linear, filter_alg_type_2: FilterAlgorithms::SVF, tilt_filter_type_2: ArduraFilter::ResponseType::Lowpass, filter_routing: FilterRouting::Parallel, ///////////////////////////////////////////////////////////////////////// //filter_cutoff_link: false, ///////////////////////////////////////////////////////////////////////// // LFOs lfo1_enable: false, lfo2_enable: false, lfo3_enable: false, lfo1_freq: 2.0, lfo1_retrigger: LFOController::LFORetrigger::None, lfo1_sync: true, lfo1_snap: LFOController::LFOSnapValues::Half, lfo1_waveform: LFOController::Waveform::Sine, lfo1_phase: 0.0, lfo2_freq: 2.0, lfo2_retrigger: LFOController::LFORetrigger::None, lfo2_sync: true, lfo2_snap: LFOController::LFOSnapValues::Half, lfo2_waveform: LFOController::Waveform::Sine, lfo2_phase: 0.0, lfo3_freq: 2.0, lfo3_retrigger: LFOController::LFORetrigger::None, lfo3_sync: true, lfo3_snap: LFOController::LFOSnapValues::Half, lfo3_waveform: LFOController::Waveform::Sine, lfo3_phase: 0.0, // Modulations mod_source_1: ModulationSource::None, mod_source_2: ModulationSource::None, mod_source_3: ModulationSource::None, mod_source_4: ModulationSource::None, mod_dest_1: ModulationDestination::None, mod_dest_2: ModulationDestination::None, mod_dest_3: ModulationDestination::None, mod_dest_4: ModulationDestination::None, mod_amount_1: 0.0, mod_amount_2: 0.0, mod_amount_3: 0.0, mod_amount_4: 0.0, // EQ pre_use_eq: false, pre_low_freq: 800.0, pre_mid_freq: 3000.0, pre_high_freq: 10000.0, pre_low_gain: 0.0, pre_mid_gain: 0.0, pre_high_gain: 0.0, // FX use_fx: true, use_compressor: false, comp_amt: 0.5, comp_atk: 0.5, comp_rel: 0.5, comp_drive: 0.5, use_abass: false, abass_amount: 0.0011, use_saturation: false, sat_amount: 0.0, sat_type: SaturationType::Tape, use_delay: false, delay_amount: 0.0, delay_time: DelaySnapValues::Quarter, delay_decay: 0.0, delay_type: DelayType::Stereo, use_reverb: false, reverb_amount: 0.5, reverb_size: 0.5, reverb_feedback: 0.5, use_phaser: false, phaser_amount: 0.5, phaser_depth: 0.5, phaser_rate: 0.5, phaser_feedback: 0.5, use_buffermod: false, buffermod_amount: 0.5, buffermod_depth: 0.5, buffermod_rate: 0.5, buffermod_spread: 0.0, buffermod_timing: 620.0, use_flanger: false, flanger_amount: 0.5, flanger_depth: 0.5, flanger_rate: 0.5, flanger_feedback: 0.5, use_limiter: false, limiter_threshold: 0.5, limiter_knee: 0.5, }); convert_preset(old_unserialized) } // This will get cloned each time we change preset styles in actuate fn convert_preset_v114(preset: ActuatePresetV114) -> ActuatePreset { let new_format: ActuatePreset = ActuatePreset { preset_name: preset.preset_name, preset_info: preset.preset_info, preset_category: preset.preset_category, tag_acid: preset.tag_acid, tag_analog: preset.tag_analog, tag_bright: preset.tag_bright, tag_chord: preset.tag_chord, tag_crisp: preset.tag_crisp, tag_deep: preset.tag_deep, tag_delicate: preset.tag_delicate, tag_hard: preset.tag_hard, tag_harsh: preset.tag_harsh, tag_lush: preset.tag_lush, tag_mellow: preset.tag_mellow, tag_resonant: preset.tag_resonant, tag_rich: preset.tag_rich, tag_sharp: preset.tag_sharp, tag_silky: preset.tag_silky, tag_smooth: preset.tag_smooth, tag_soft: preset.tag_soft, tag_stab: preset.tag_stab, tag_warm: preset.tag_warm, mod1_audio_module_type: preset.mod1_audio_module_type, mod1_audio_module_level: preset.mod1_audio_module_level, mod1_loaded_sample: preset.mod1_loaded_sample, mod1_sample_lib: preset.mod1_sample_lib, mod1_loop_wavetable: preset.mod1_loop_wavetable, mod1_single_cycle: preset.mod1_single_cycle, mod1_restretch: preset.mod1_restretch, mod1_prev_restretch: preset.mod1_prev_restretch, mod1_grain_hold: preset.mod1_grain_hold, mod1_grain_gap: preset.mod1_grain_gap, mod1_start_position: preset.mod1_start_position, mod1_end_position: preset.mod1_end_position, mod1_grain_crossfade: preset.mod1_grain_crossfade, mod1_osc_type: preset.mod1_osc_type, mod1_osc_octave: preset.mod1_osc_octave, mod1_osc_semitones: preset.mod1_osc_semitones, mod1_osc_detune: preset.mod1_osc_detune, mod1_osc_attack: preset.mod1_osc_attack, mod1_osc_decay: preset.mod1_osc_decay, mod1_osc_sustain: preset.mod1_osc_sustain, mod1_osc_release: preset.mod1_osc_release, mod1_osc_retrigger: preset.mod1_osc_retrigger, mod1_osc_atk_curve: preset.mod1_osc_atk_curve, mod1_osc_dec_curve: preset.mod1_osc_dec_curve, mod1_osc_rel_curve: preset.mod1_osc_rel_curve, mod1_osc_unison: preset.mod1_osc_unison, mod1_osc_unison_detune: preset.mod1_osc_unison_detune, mod1_osc_stereo: preset.mod1_osc_stereo, mod2_audio_module_type: preset.mod2_audio_module_type, mod2_audio_module_level: preset.mod2_audio_module_level, mod2_loaded_sample: preset.mod2_loaded_sample, mod2_sample_lib: preset.mod2_sample_lib, mod2_loop_wavetable: preset.mod2_loop_wavetable, mod2_single_cycle: preset.mod2_single_cycle, mod2_restretch: preset.mod2_restretch, mod2_prev_restretch: preset.mod2_prev_restretch, mod2_grain_hold: preset.mod2_grain_hold, mod2_grain_gap: preset.mod2_grain_gap, mod2_start_position: preset.mod2_start_position, mod2_end_position: preset.mod2_end_position, mod2_grain_crossfade: preset.mod2_grain_crossfade, mod2_osc_type: preset.mod2_osc_type, mod2_osc_octave: preset.mod2_osc_octave, mod2_osc_semitones: preset.mod2_osc_semitones, mod2_osc_detune: preset.mod2_osc_detune, mod2_osc_attack: preset.mod2_osc_attack, mod2_osc_decay: preset.mod2_osc_decay, mod2_osc_sustain: preset.mod2_osc_sustain, mod2_osc_release: preset.mod2_osc_release, mod2_osc_retrigger: preset.mod2_osc_retrigger, mod2_osc_atk_curve: preset.mod2_osc_atk_curve, mod2_osc_dec_curve: preset.mod2_osc_dec_curve, mod2_osc_rel_curve: preset.mod2_osc_rel_curve, mod2_osc_unison: preset.mod2_osc_unison, mod2_osc_unison_detune: preset.mod2_osc_unison_detune, mod2_osc_stereo: preset.mod2_osc_stereo, mod3_audio_module_type: preset.mod3_audio_module_type, mod3_audio_module_level: preset.mod3_audio_module_level, mod3_loaded_sample: preset.mod3_loaded_sample, mod3_sample_lib: preset.mod3_sample_lib, mod3_loop_wavetable: preset.mod3_loop_wavetable, mod3_single_cycle: preset.mod3_single_cycle, mod3_restretch: preset.mod3_restretch, mod3_prev_restretch: preset.mod3_prev_restretch, mod3_grain_hold: preset.mod3_grain_hold, mod3_grain_gap: preset.mod3_grain_gap, mod3_start_position: preset.mod3_start_position, mod3_end_position: preset.mod3_end_position, mod3_grain_crossfade: preset.mod3_grain_crossfade, mod3_osc_type: preset.mod3_osc_type, mod3_osc_octave: preset.mod3_osc_octave, mod3_osc_semitones: preset.mod3_osc_semitones, mod3_osc_detune: preset.mod3_osc_detune, mod3_osc_attack: preset.mod3_osc_attack, mod3_osc_decay: preset.mod3_osc_decay, mod3_osc_sustain: preset.mod3_osc_sustain, mod3_osc_release: preset.mod3_osc_release, mod3_osc_retrigger: preset.mod3_osc_retrigger, mod3_osc_atk_curve: preset.mod3_osc_atk_curve, mod3_osc_dec_curve: preset.mod3_osc_dec_curve, mod3_osc_rel_curve: preset.mod3_osc_rel_curve, mod3_osc_unison: preset.mod3_osc_unison, mod3_osc_unison_detune: preset.mod3_osc_unison_detune, mod3_osc_stereo: preset.mod3_osc_stereo, filter_wet: preset.filter_wet, filter_cutoff: preset.filter_cutoff, filter_resonance: preset.filter_resonance, filter_res_type: preset.filter_res_type, filter_lp_amount: preset.filter_lp_amount, filter_hp_amount: preset.filter_hp_amount, filter_bp_amount: preset.filter_bp_amount, filter_env_peak: preset.filter_env_peak, filter_env_attack: preset.filter_env_attack, filter_env_decay: preset.filter_env_decay, filter_env_sustain: preset.filter_env_sustain, filter_env_release: preset.filter_env_release, filter_env_atk_curve: preset.filter_env_atk_curve, filter_env_dec_curve: preset.filter_env_dec_curve, filter_env_rel_curve: preset.filter_env_rel_curve, filter_alg_type: preset.filter_alg_type, tilt_filter_type: preset.tilt_filter_type, filter_wet_2: preset.filter_wet_2, filter_cutoff_2: preset.filter_cutoff_2, filter_resonance_2: preset.filter_resonance_2, filter_res_type_2: preset.filter_res_type_2, filter_lp_amount_2: preset.filter_lp_amount_2, filter_hp_amount_2: preset.filter_hp_amount_2, filter_bp_amount_2: preset.filter_bp_amount_2, filter_env_peak_2: preset.filter_env_peak_2, filter_env_attack_2: preset.filter_env_attack_2, filter_env_decay_2: preset.filter_env_decay_2, filter_env_sustain_2: preset.filter_env_sustain_2, filter_env_release_2: preset.filter_env_release_2, filter_env_atk_curve_2: preset.filter_env_atk_curve_2, filter_env_dec_curve_2: preset.filter_env_dec_curve_2, filter_env_rel_curve_2: preset.filter_env_rel_curve_2, filter_alg_type_2: preset.filter_alg_type_2, tilt_filter_type_2: preset.tilt_filter_type_2, filter_routing: preset.filter_routing, /////////////////////////////////////////////////////////////////// // Added in 1.1.4 filter_cutoff_link: preset.filter_cutoff_link, /////////////////////////////////////////////////////////////////// // Added in pitch update 1.2.1 pitch_enable: false, pitch_routing: PitchRouting::Osc1, pitch_env_peak: 0.0, pitch_env_atk_curve: SmoothStyle::Linear, pitch_env_dec_curve: SmoothStyle::Linear, pitch_env_rel_curve: SmoothStyle::Linear, pitch_env_attack: 0.0, pitch_env_decay: 300.0, pitch_env_release: 0.0, pitch_env_sustain: 0.0, pitch_enable_2: false, pitch_env_peak_2: 0.0, pitch_env_atk_curve_2: SmoothStyle::Linear, pitch_env_dec_curve_2: SmoothStyle::Linear, pitch_env_rel_curve_2: SmoothStyle::Linear, pitch_env_attack_2: 0.0, pitch_env_decay_2: 300.0, pitch_env_release_2: 0.0, pitch_env_sustain_2: 0.0, pitch_routing_2: PitchRouting::Osc1, /////////////////////////////////////////////////////////////////// lfo1_enable: preset.lfo1_enable, lfo2_enable: preset.lfo2_enable, lfo3_enable: preset.lfo3_enable, lfo1_freq: preset.lfo1_freq, lfo1_retrigger: preset.lfo1_retrigger, lfo1_sync: preset.lfo1_sync, lfo1_snap: preset.lfo1_snap, lfo1_waveform: preset.lfo1_waveform, lfo1_phase: preset.lfo1_phase, lfo2_freq: preset.lfo2_freq, lfo2_retrigger: preset.lfo2_retrigger, lfo2_sync: preset.lfo2_sync, lfo2_snap: preset.lfo2_snap, lfo2_waveform: preset.lfo2_waveform, lfo2_phase: preset.lfo2_phase, lfo3_freq: preset.lfo3_freq, lfo3_retrigger: preset.lfo3_retrigger, lfo3_sync: preset.lfo3_sync, lfo3_snap: preset.lfo3_snap, lfo3_waveform: preset.lfo3_waveform, lfo3_phase: preset.lfo3_phase, mod_source_1: preset.mod_source_1, mod_source_2: preset.mod_source_2, mod_source_3: preset.mod_source_3, mod_source_4: preset.mod_source_4, mod_dest_1: preset.mod_dest_1, mod_dest_2: preset.mod_dest_2, mod_dest_3: preset.mod_dest_3, mod_dest_4: preset.mod_dest_4, mod_amount_1: preset.mod_amount_1, mod_amount_2: preset.mod_amount_2, mod_amount_3: preset.mod_amount_3, mod_amount_4: preset.mod_amount_4, pre_use_eq: preset.pre_use_eq, pre_low_freq: preset.pre_low_freq, pre_mid_freq: preset.pre_mid_freq, pre_high_freq: preset.pre_high_freq, pre_low_gain: preset.pre_low_gain, pre_mid_gain: preset.pre_mid_gain, pre_high_gain: preset.pre_high_gain, use_fx: preset.use_fx, use_compressor: preset.use_compressor, comp_amt: preset.comp_amt, comp_atk: preset.comp_atk, comp_rel: preset.comp_rel, comp_drive: preset.comp_drive, use_abass: preset.use_abass, abass_amount: preset.abass_amount, use_saturation: preset.use_saturation, sat_amount: preset.sat_amount, sat_type: preset.sat_type, use_delay: preset.use_delay, delay_amount: preset.delay_amount, delay_time: preset.delay_time, delay_decay: preset.delay_decay, delay_type: preset.delay_type, use_reverb: preset.use_reverb, reverb_amount: preset.reverb_amount, reverb_size: preset.reverb_size, reverb_feedback: preset.reverb_feedback, use_phaser: preset.use_phaser, phaser_amount: preset.phaser_amount, phaser_depth: preset.phaser_depth, phaser_rate: preset.phaser_rate, phaser_feedback: preset.phaser_feedback, use_buffermod: preset.use_buffermod, buffermod_amount: preset.buffermod_amount, buffermod_depth: preset.buffermod_depth, buffermod_rate: preset.buffermod_rate, buffermod_spread: preset.buffermod_spread, buffermod_timing: preset.buffermod_timing, use_flanger: preset.use_flanger, flanger_amount: preset.flanger_amount, flanger_depth: preset.flanger_depth, flanger_rate: preset.flanger_rate, flanger_feedback: preset.flanger_feedback, use_limiter: preset.use_limiter, limiter_threshold: preset.limiter_threshold, limiter_knee: preset.limiter_knee, }; new_format } // This will get cloned each time we change preset styles in actuate fn convert_preset(preset: ActuatePresetOld) -> ActuatePreset { let new_format: ActuatePreset = ActuatePreset { preset_name: preset.preset_name, preset_info: preset.preset_info, preset_category: preset.preset_category, tag_acid: preset.tag_acid, tag_analog: preset.tag_analog, tag_bright: preset.tag_bright, tag_chord: preset.tag_chord, tag_crisp: preset.tag_crisp, tag_deep: preset.tag_deep, tag_delicate: preset.tag_delicate, tag_hard: preset.tag_hard, tag_harsh: preset.tag_harsh, tag_lush: preset.tag_lush, tag_mellow: preset.tag_mellow, tag_resonant: preset.tag_resonant, tag_rich: preset.tag_rich, tag_sharp: preset.tag_sharp, tag_silky: preset.tag_silky, tag_smooth: preset.tag_smooth, tag_soft: preset.tag_soft, tag_stab: preset.tag_stab, tag_warm: preset.tag_warm, mod1_audio_module_type: preset.mod1_audio_module_type, mod1_audio_module_level: preset.mod1_audio_module_level, mod1_loaded_sample: preset.mod1_loaded_sample, mod1_sample_lib: preset.mod1_sample_lib, mod1_loop_wavetable: preset.mod1_loop_wavetable, mod1_single_cycle: preset.mod1_single_cycle, mod1_restretch: preset.mod1_restretch, mod1_prev_restretch: preset.mod1_prev_restretch, mod1_grain_hold: preset.mod1_grain_hold, mod1_grain_gap: preset.mod1_grain_gap, mod1_start_position: preset.mod1_start_position, mod1_end_position: preset.mod1_end_position, mod1_grain_crossfade: preset.mod1_grain_crossfade, mod1_osc_type: preset.mod1_osc_type, mod1_osc_octave: preset.mod1_osc_octave, mod1_osc_semitones: preset.mod1_osc_semitones, mod1_osc_detune: preset.mod1_osc_detune, mod1_osc_attack: preset.mod1_osc_attack, mod1_osc_decay: preset.mod1_osc_decay, mod1_osc_sustain: preset.mod1_osc_sustain, mod1_osc_release: preset.mod1_osc_release, mod1_osc_retrigger: preset.mod1_osc_retrigger, mod1_osc_atk_curve: preset.mod1_osc_atk_curve, mod1_osc_dec_curve: preset.mod1_osc_dec_curve, mod1_osc_rel_curve: preset.mod1_osc_rel_curve, mod1_osc_unison: preset.mod1_osc_unison, mod1_osc_unison_detune: preset.mod1_osc_unison_detune, mod1_osc_stereo: preset.mod1_osc_stereo, mod2_audio_module_type: preset.mod2_audio_module_type, mod2_audio_module_level: preset.mod2_audio_module_level, mod2_loaded_sample: preset.mod2_loaded_sample, mod2_sample_lib: preset.mod2_sample_lib, mod2_loop_wavetable: preset.mod2_loop_wavetable, mod2_single_cycle: preset.mod2_single_cycle, mod2_restretch: preset.mod2_restretch, mod2_prev_restretch: preset.mod2_prev_restretch, mod2_grain_hold: preset.mod2_grain_hold, mod2_grain_gap: preset.mod2_grain_gap, mod2_start_position: preset.mod2_start_position, mod2_end_position: preset.mod2_end_position, mod2_grain_crossfade: preset.mod2_grain_crossfade, mod2_osc_type: preset.mod2_osc_type, mod2_osc_octave: preset.mod2_osc_octave, mod2_osc_semitones: preset.mod2_osc_semitones, mod2_osc_detune: preset.mod2_osc_detune, mod2_osc_attack: preset.mod2_osc_attack, mod2_osc_decay: preset.mod2_osc_decay, mod2_osc_sustain: preset.mod2_osc_sustain, mod2_osc_release: preset.mod2_osc_release, mod2_osc_retrigger: preset.mod2_osc_retrigger, mod2_osc_atk_curve: preset.mod2_osc_atk_curve, mod2_osc_dec_curve: preset.mod2_osc_dec_curve, mod2_osc_rel_curve: preset.mod2_osc_rel_curve, mod2_osc_unison: preset.mod2_osc_unison, mod2_osc_unison_detune: preset.mod2_osc_unison_detune, mod2_osc_stereo: preset.mod2_osc_stereo, mod3_audio_module_type: preset.mod3_audio_module_type, mod3_audio_module_level: preset.mod3_audio_module_level, mod3_loaded_sample: preset.mod3_loaded_sample, mod3_sample_lib: preset.mod3_sample_lib, mod3_loop_wavetable: preset.mod3_loop_wavetable, mod3_single_cycle: preset.mod3_single_cycle, mod3_restretch: preset.mod3_restretch, mod3_prev_restretch: preset.mod3_prev_restretch, mod3_grain_hold: preset.mod3_grain_hold, mod3_grain_gap: preset.mod3_grain_gap, mod3_start_position: preset.mod3_start_position, mod3_end_position: preset.mod3_end_position, mod3_grain_crossfade: preset.mod3_grain_crossfade, mod3_osc_type: preset.mod3_osc_type, mod3_osc_octave: preset.mod3_osc_octave, mod3_osc_semitones: preset.mod3_osc_semitones, mod3_osc_detune: preset.mod3_osc_detune, mod3_osc_attack: preset.mod3_osc_attack, mod3_osc_decay: preset.mod3_osc_decay, mod3_osc_sustain: preset.mod3_osc_sustain, mod3_osc_release: preset.mod3_osc_release, mod3_osc_retrigger: preset.mod3_osc_retrigger, mod3_osc_atk_curve: preset.mod3_osc_atk_curve, mod3_osc_dec_curve: preset.mod3_osc_dec_curve, mod3_osc_rel_curve: preset.mod3_osc_rel_curve, mod3_osc_unison: preset.mod3_osc_unison, mod3_osc_unison_detune: preset.mod3_osc_unison_detune, mod3_osc_stereo: preset.mod3_osc_stereo, filter_wet: preset.filter_wet, filter_cutoff: preset.filter_cutoff, filter_resonance: preset.filter_resonance, filter_res_type: preset.filter_res_type, filter_lp_amount: preset.filter_lp_amount, filter_hp_amount: preset.filter_hp_amount, filter_bp_amount: preset.filter_bp_amount, filter_env_peak: preset.filter_env_peak, filter_env_attack: preset.filter_env_attack, filter_env_decay: preset.filter_env_decay, filter_env_sustain: preset.filter_env_sustain, filter_env_release: preset.filter_env_release, filter_env_atk_curve: preset.filter_env_atk_curve, filter_env_dec_curve: preset.filter_env_dec_curve, filter_env_rel_curve: preset.filter_env_rel_curve, filter_alg_type: preset.filter_alg_type, tilt_filter_type: preset.tilt_filter_type, filter_wet_2: preset.filter_wet_2, filter_cutoff_2: preset.filter_cutoff_2, filter_resonance_2: preset.filter_resonance_2, filter_res_type_2: preset.filter_res_type_2, filter_lp_amount_2: preset.filter_lp_amount_2, filter_hp_amount_2: preset.filter_hp_amount_2, filter_bp_amount_2: preset.filter_bp_amount_2, filter_env_peak_2: preset.filter_env_peak_2, filter_env_attack_2: preset.filter_env_attack_2, filter_env_decay_2: preset.filter_env_decay_2, filter_env_sustain_2: preset.filter_env_sustain_2, filter_env_release_2: preset.filter_env_release_2, filter_env_atk_curve_2: preset.filter_env_atk_curve_2, filter_env_dec_curve_2: preset.filter_env_dec_curve_2, filter_env_rel_curve_2: preset.filter_env_rel_curve_2, filter_alg_type_2: preset.filter_alg_type_2, tilt_filter_type_2: preset.tilt_filter_type_2, filter_routing: preset.filter_routing, /////////////////////////////////////////////////////////////////// // Added in 1.1.4 filter_cutoff_link: false, /////////////////////////////////////////////////////////////////// // Added in pitch update 1.2.1 pitch_enable: false, pitch_routing: PitchRouting::Osc1, pitch_env_peak: 0.0, pitch_env_atk_curve: SmoothStyle::Linear, pitch_env_dec_curve: SmoothStyle::Linear, pitch_env_rel_curve: SmoothStyle::Linear, pitch_env_attack: 0.0, pitch_env_decay: 300.0, pitch_env_release: 0.0, pitch_env_sustain: 0.0, pitch_enable_2: false, pitch_env_peak_2: 0.0, pitch_env_atk_curve_2: SmoothStyle::Linear, pitch_env_dec_curve_2: SmoothStyle::Linear, pitch_env_rel_curve_2: SmoothStyle::Linear, pitch_env_attack_2: 0.0, pitch_env_decay_2: 300.0, pitch_env_release_2: 0.0, pitch_env_sustain_2: 0.0, pitch_routing_2: PitchRouting::Osc1, /////////////////////////////////////////////////////////////////// lfo1_enable: preset.lfo1_enable, lfo2_enable: preset.lfo2_enable, lfo3_enable: preset.lfo3_enable, lfo1_freq: preset.lfo1_freq, lfo1_retrigger: preset.lfo1_retrigger, lfo1_sync: preset.lfo1_sync, lfo1_snap: preset.lfo1_snap, lfo1_waveform: preset.lfo1_waveform, lfo1_phase: preset.lfo1_phase, lfo2_freq: preset.lfo2_freq, lfo2_retrigger: preset.lfo2_retrigger, lfo2_sync: preset.lfo2_sync, lfo2_snap: preset.lfo2_snap, lfo2_waveform: preset.lfo2_waveform, lfo2_phase: preset.lfo2_phase, lfo3_freq: preset.lfo3_freq, lfo3_retrigger: preset.lfo3_retrigger, lfo3_sync: preset.lfo3_sync, lfo3_snap: preset.lfo3_snap, lfo3_waveform: preset.lfo3_waveform, lfo3_phase: preset.lfo3_phase, mod_source_1: preset.mod_source_1, mod_source_2: preset.mod_source_2, mod_source_3: preset.mod_source_3, mod_source_4: preset.mod_source_4, mod_dest_1: preset.mod_dest_1, mod_dest_2: preset.mod_dest_2, mod_dest_3: preset.mod_dest_3, mod_dest_4: preset.mod_dest_4, mod_amount_1: preset.mod_amount_1, mod_amount_2: preset.mod_amount_2, mod_amount_3: preset.mod_amount_3, mod_amount_4: preset.mod_amount_4, pre_use_eq: preset.pre_use_eq, pre_low_freq: preset.pre_low_freq, pre_mid_freq: preset.pre_mid_freq, pre_high_freq: preset.pre_high_freq, pre_low_gain: preset.pre_low_gain, pre_mid_gain: preset.pre_mid_gain, pre_high_gain: preset.pre_high_gain, use_fx: preset.use_fx, use_compressor: preset.use_compressor, comp_amt: preset.comp_amt, comp_atk: preset.comp_atk, comp_rel: preset.comp_rel, comp_drive: preset.comp_drive, use_abass: preset.use_abass, abass_amount: preset.abass_amount, use_saturation: preset.use_saturation, sat_amount: preset.sat_amount, sat_type: preset.sat_type, use_delay: preset.use_delay, delay_amount: preset.delay_amount, delay_time: preset.delay_time, delay_decay: preset.delay_decay, delay_type: preset.delay_type, use_reverb: preset.use_reverb, reverb_amount: preset.reverb_amount, reverb_size: preset.reverb_size, reverb_feedback: preset.reverb_feedback, use_phaser: preset.use_phaser, phaser_amount: preset.phaser_amount, phaser_depth: preset.phaser_depth, phaser_rate: preset.phaser_rate, phaser_feedback: preset.phaser_feedback, use_buffermod: preset.use_buffermod, buffermod_amount: preset.buffermod_amount, buffermod_depth: preset.buffermod_depth, buffermod_rate: preset.buffermod_rate, buffermod_spread: preset.buffermod_spread, buffermod_timing: preset.buffermod_timing, use_flanger: preset.use_flanger, flanger_amount: preset.flanger_amount, flanger_depth: preset.flanger_depth, flanger_rate: preset.flanger_rate, flanger_feedback: preset.flanger_feedback, use_limiter: preset.use_limiter, limiter_threshold: preset.limiter_threshold, limiter_knee: preset.limiter_knee, }; new_format }