daily pastebin goal
33%
SHARE
TWEET

UI

a guest Feb 13th, 2018 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using UnityEngine;
  2. using UnityEngine.UI;
  3.  
  4.  
  5. public class UI : MonoBehaviour
  6. {
  7.     public Hv_synth_AudioLib hvSynth;
  8.  
  9.  
  10.     public Slider osc1_vol_slid;
  11.     public Slider osc1_phase_slid;
  12.     public Slider osc1_pwm_slid;
  13.     public Slider osc1_oct_slid;
  14.     public Slider osc1_semi_slid;
  15.     public Slider osc1_cent_slid;
  16.     public Text c1_osc1_wave_txt;
  17.     public Scrollbar osc1_wave_slid;
  18.     private string osc1Wave_str;
  19.     private float tempOsc1Wave;
  20.  
  21.     public Toggle osc2_onOff_btn;
  22.     public Slider osc2_vol_slid;
  23.     public Text c1_osc2_wave_txt;
  24.     public Scrollbar osc2_wave_slid;
  25.     private string osc2Wave_str;
  26.     private float tempOsc2Wave;
  27.     public Slider osc2_phase_slid;
  28.     public Slider osc2_pwm_slid;
  29.     public Slider osc2_oct_slid;
  30.     public Slider osc2_semi_slid;
  31.     public Slider osc2_cent_slid;
  32.  
  33.     public Slider adsr1_dur_slid;
  34.     public Slider adsr1_a_slid;
  35.     public Slider adsr1_d_slid;
  36.     public Slider adsr1_s_slid;
  37.     public Slider adsr1_r_slid;
  38.  
  39.     public Slider adsr2_dur_slid;
  40.     public Slider adsr2_a_slid;
  41.     public Slider adsr2_d_slid;
  42.     public Slider adsr2_s_slid;
  43.     public Slider adsr2_r_slid;
  44.  
  45.     public Text c1_fm_wave_txt;
  46.     public Scrollbar fm_wav_slid;
  47.     private string fmWave_str;
  48.     private float tempFmWave;
  49.     public Slider fm_index_slid;
  50.     public Slider fm_freq_slid;
  51.     public Text fm1_multi_txt;
  52.     public Scrollbar fm_multi_slid;
  53.     private string fm_Multi_str;
  54.     private float tempFmMulti;
  55.     public Slider fm_phase_slid;
  56.     public Slider fm_pwm_slid;
  57.     public Slider fm_dur_slid;
  58.     public Slider fm_a_slid;
  59.     public Slider fm_d_slid;
  60.     public Slider fm_s_slid;
  61.     public Slider fm_r_slid;
  62.  
  63.     public Text c1_am_wave_txt;
  64.     public Scrollbar am_wave_slid;
  65.     private string amWave_str;
  66.     private float tempAmWave;
  67.     public Slider am_index_slid;
  68.     public Slider am_freq_slid;
  69.     public Text am1_multi_txt;
  70.     public Scrollbar am_multi_slid;
  71.     private string am_Multi_str;
  72.     private float tempAmMulti;
  73.     public Slider am_phase_slid;
  74.     public Slider am_pwm_slid;
  75.     public Slider am_dur_slid;
  76.     public Slider am_a_slid;
  77.     public Slider am_d_slid;
  78.     public Slider am_s_slid;
  79.     public Slider am_r_slid;
  80.  
  81.     public Slider vcf1_cf_slid;
  82.     public Slider vcf1_q_slid;
  83.     public Slider vcf1_freq_slid;
  84.     public Slider vcf1_amount_slid;
  85.  
  86.     public Slider vcf2_cf_slid;
  87.     public Slider vcf2_q_slid;
  88.     public Slider vcf2_freq_slid;
  89.     public Slider vcf2_amount_slid;
  90.  
  91.     public Slider delay_mix_slid;
  92.     public Slider delay_time_slid;
  93.     public Slider delay_feedback_slid;
  94.  
  95.     public Slider pB_slid;
  96.     public Slider pB_amount_slid;
  97.     public Toggle pb_resi_tog;
  98.     public Slider pb_resi_slid;
  99.    
  100.     public Slider c1_vol_slid;
  101.     public Slider c2_vol_slid;
  102.     public Slider c3_vol_slid;
  103.     public Slider c4_vol_slid;
  104.     public Slider c5_vol_slid;
  105.  
  106.     public Slider c1_pan_slid;
  107.     public Slider c2_pan_slid;
  108.     public Slider c3_pan_slid;
  109.     public Slider c4_pan_slid;
  110.     public Slider c5_pan_slid;
  111.  
  112.     public Toggle c1_outPut_onOff_btn;
  113.     public Toggle c2_outPut_onOff_btn;
  114.     public Toggle c3_outPut_onOff_btn;
  115.     public Toggle c4_outPut_onOff_btn;
  116.     public Toggle c5_outPut_onOff_btn;
  117.  
  118.     public Toggle load_btn;
  119.     public Toggle reset_btn;
  120.  
  121.  
  122.     void Awake()
  123.     {
  124.         LoadDefaultPrefs();
  125.         hvSynth.SetFloatParameter(Hv_synth_AudioLib.Parameter.C1_metro, 1);
  126.     }
  127.  
  128.     void FixedUpdate()
  129.     {
  130.         hvSynth.SetFloatParameter(Hv_synth_AudioLib.Parameter.C1_mixer_vol1, osc1_vol_slid.value);                 //OSC_1
  131.         tempOsc1Wave = Mathf.Clamp((3 * (osc1_wave_slid.value)), 0, 3);                      
  132.         if (tempOsc1Wave == 0) { osc1Wave_str = "Sine"; }
  133.         if (tempOsc1Wave == 1) { osc1Wave_str = "Triangle"; }
  134.         if (tempOsc1Wave == 2) { osc1Wave_str = "Square"; }
  135.         if (tempOsc1Wave == 3) { osc1Wave_str = "Saw"; }
  136.         c1_osc1_wave_txt.text = "WAVE: " + osc1Wave_str;
  137.         hvSynth.SetFloatParameter(Hv_synth_AudioLib.Parameter.C1_osc1_wave, tempOsc1Wave);
  138.         hvSynth.SetFloatParameter(Hv_synth_AudioLib.Parameter.C1_osc1_phase, osc1_phase_slid.value);
  139.         hvSynth.SetFloatParameter(Hv_synth_AudioLib.Parameter.C1_osc1_pwm, osc1_pwm_slid.value);
  140.         hvSynth.SetFloatParameter(Hv_synth_AudioLib.Parameter.C1_osc1_octave, osc1_oct_slid.value);
  141.         hvSynth.SetFloatParameter(Hv_synth_AudioLib.Parameter.C1_osc1_semi, osc1_semi_slid.value);
  142.         hvSynth.SetFloatParameter(Hv_synth_AudioLib.Parameter.C1_osc1_cents, osc1_cent_slid.value);
  143.        
  144.         hvSynth.SetFloatParameter(Hv_synth_AudioLib.Parameter.C1_mixer_vol2, osc2_vol_slid.value);                 //OSC_2
  145.         tempOsc2Wave = Mathf.Clamp((3 * (osc2_wave_slid.value)), 0, 3);                      
  146.         if (tempOsc2Wave == 0) { osc2Wave_str = "Sine"; }
  147.         if (tempOsc2Wave == 1) { osc2Wave_str = "Triangle"; }
  148.         if (tempOsc2Wave == 2) { osc2Wave_str = "Square"; }
  149.         if (tempOsc2Wave == 3) { osc2Wave_str = "Saw"; }
  150.         c1_osc2_wave_txt.text = "WAVE: " + osc2Wave_str;
  151.         hvSynth.SetFloatParameter(Hv_synth_AudioLib.Parameter.C1_osc2_wave, tempOsc2Wave);
  152.         hvSynth.SetFloatParameter(Hv_synth_AudioLib.Parameter.C1_osc2_phase, osc2_phase_slid.value);
  153.         hvSynth.SetFloatParameter(Hv_synth_AudioLib.Parameter.C1_osc2_pwm, osc2_pwm_slid.value);
  154.         hvSynth.SetFloatParameter(Hv_synth_AudioLib.Parameter.C1_osc2_octave, osc2_oct_slid.value);
  155.         hvSynth.SetFloatParameter(Hv_synth_AudioLib.Parameter.C1_osc2_semi, osc2_semi_slid.value);
  156.         hvSynth.SetFloatParameter(Hv_synth_AudioLib.Parameter.C1_osc2_cents, osc2_cent_slid.value);
  157.         if (osc2_onOff_btn.isOn) { hvSynth.SetFloatParameter(Hv_synth_AudioLib.Parameter.C1_osc2_onoff, 1); }
  158.         else { hvSynth.SetFloatParameter(Hv_synth_AudioLib.Parameter.C1_osc2_onoff, 0); }
  159.  
  160.         hvSynth.SetFloatParameter(Hv_synth_AudioLib.Parameter.C1_adsr1_duration, adsr1_dur_slid.value);       //ADSR_1
  161.         hvSynth.SetFloatParameter(Hv_synth_AudioLib.Parameter.C1_adsr1_a, adsr1_a_slid.value);
  162.         hvSynth.SetFloatParameter(Hv_synth_AudioLib.Parameter.C1_adsr1_d, adsr1_d_slid.value);
  163.         hvSynth.SetFloatParameter(Hv_synth_AudioLib.Parameter.C1_adsr1_s, adsr1_s_slid.value);
  164.         hvSynth.SetFloatParameter(Hv_synth_AudioLib.Parameter.C1_adsr1_r, adsr1_r_slid.value);
  165.  
  166.         hvSynth.SetFloatParameter(Hv_synth_AudioLib.Parameter.C1_adsr2_duration, adsr2_dur_slid.value);       //ADSR_2
  167.         hvSynth.SetFloatParameter(Hv_synth_AudioLib.Parameter.C1_adsr2_a, adsr2_a_slid.value);
  168.         hvSynth.SetFloatParameter(Hv_synth_AudioLib.Parameter.C1_adsr2_d, adsr2_d_slid.value);
  169.         hvSynth.SetFloatParameter(Hv_synth_AudioLib.Parameter.C1_adsr2_s, adsr2_s_slid.value);
  170.         hvSynth.SetFloatParameter(Hv_synth_AudioLib.Parameter.C1_adsr2_r, adsr2_r_slid.value);
  171.  
  172.         tempFmWave = Mathf.Clamp((3*(fm_wav_slid.value)), 0, 3);                                             //FM
  173.         if (tempFmWave == 0) { fmWave_str = "Sine"; }
  174.         if (tempFmWave == 1) { fmWave_str = "Triangle"; }
  175.         if (tempFmWave == 2) { fmWave_str = "Square"; }
  176.         if (tempFmWave == 3) { fmWave_str = "Saw"; }
  177.         c1_fm_wave_txt.text = "WAVE: " + fmWave_str;
  178.         hvSynth.SetFloatParameter(Hv_synth_AudioLib.Parameter.C1_fm1_wave, tempFmWave);
  179.         hvSynth.SetFloatParameter(Hv_synth_AudioLib.Parameter.C1_fm1_index, fm_index_slid.value);
  180.         hvSynth.SetFloatParameter(Hv_synth_AudioLib.Parameter.C1_fm1_fmfreq, fm_freq_slid.value);
  181.         tempFmMulti = Mathf.Clamp((3 * (fm_multi_slid.value)), 0, 3);                                            
  182.         if (tempFmMulti == 0) { fm_Multi_str = "1"; }
  183.         if (tempFmMulti == 1) { fm_Multi_str = "10"; }
  184.         if (tempFmMulti == 2) { fm_Multi_str = "100"; }
  185.         if (tempFmMulti == 3) { fm_Multi_str = "1000"; }
  186.         fm1_multi_txt.text = "MULTI: " + fm_Multi_str;
  187.         hvSynth.SetFloatParameter(Hv_synth_AudioLib.Parameter.C1_fm1_fmmulti, fm_multi_slid.value);
  188.         hvSynth.SetFloatParameter(Hv_synth_AudioLib.Parameter.C1_fm1_phase, fm_phase_slid.value);
  189.         hvSynth.SetFloatParameter(Hv_synth_AudioLib.Parameter.C1_fm1_pwm, fm_pwm_slid.value);
  190.         hvSynth.SetFloatParameter(Hv_synth_AudioLib.Parameter.C1_fm1_duration, fm_dur_slid.value);
  191.         hvSynth.SetFloatParameter(Hv_synth_AudioLib.Parameter.C1_fm1_a, fm_a_slid.value);
  192.         hvSynth.SetFloatParameter(Hv_synth_AudioLib.Parameter.C1_fm1_d, fm_d_slid.value);
  193.         hvSynth.SetFloatParameter(Hv_synth_AudioLib.Parameter.C1_fm1_s, fm_s_slid.value);
  194.         hvSynth.SetFloatParameter(Hv_synth_AudioLib.Parameter.C1_fm1_r, fm_r_slid.value);
  195.  
  196.         tempAmWave = Mathf.Clamp((3 * (am_wave_slid.value)), 0, 3);                                             //AM
  197.         if (tempAmWave == 0) { amWave_str = "Sine"; }
  198.         if (tempAmWave == 1) { amWave_str = "Triangle"; }
  199.         if (tempAmWave == 2) { amWave_str = "Square"; }
  200.         if (tempAmWave == 3) { amWave_str = "Saw"; }
  201.         c1_am_wave_txt.text = "WAVE: " + amWave_str;
  202.         hvSynth.SetFloatParameter(Hv_synth_AudioLib.Parameter.C1_am1_wave, tempAmWave);
  203.         hvSynth.SetFloatParameter(Hv_synth_AudioLib.Parameter.C1_am1_index, am_index_slid.value);
  204.         hvSynth.SetFloatParameter(Hv_synth_AudioLib.Parameter.C1_am1_amfreq, am_freq_slid.value);
  205.         tempAmMulti = Mathf.Clamp((3 * (am_multi_slid.value)), 0, 3);
  206.         if (tempAmMulti == 0) { am_Multi_str = "1"; }
  207.         if (tempAmMulti == 1) { am_Multi_str = "10"; }
  208.         if (tempAmMulti == 2) { am_Multi_str = "100"; }
  209.         if (tempAmMulti == 3) { am_Multi_str = "1000"; }
  210.         am1_multi_txt.text = "MULTI: " + am_Multi_str;
  211.         hvSynth.SetFloatParameter(Hv_synth_AudioLib.Parameter.C1_am1_ammulti, am_multi_slid.value);
  212.         hvSynth.SetFloatParameter(Hv_synth_AudioLib.Parameter.C1_am1_phase, am_phase_slid.value);
  213.         hvSynth.SetFloatParameter(Hv_synth_AudioLib.Parameter.C1_am1_pwm, am_pwm_slid.value);
  214.         hvSynth.SetFloatParameter(Hv_synth_AudioLib.Parameter.C1_am1_duration, am_dur_slid.value);
  215.         hvSynth.SetFloatParameter(Hv_synth_AudioLib.Parameter.C1_am1_a, am_a_slid.value);
  216.         hvSynth.SetFloatParameter(Hv_synth_AudioLib.Parameter.C1_am1_d, am_d_slid.value);
  217.         hvSynth.SetFloatParameter(Hv_synth_AudioLib.Parameter.C1_am1_s, am_s_slid.value);
  218.         hvSynth.SetFloatParameter(Hv_synth_AudioLib.Parameter.C1_am1_r, am_r_slid.value);
  219.  
  220.         hvSynth.SetFloatParameter(Hv_synth_AudioLib.Parameter.C1_vcf1_cf, vcf1_cf_slid.value);                    //VCF_1
  221.         hvSynth.SetFloatParameter(Hv_synth_AudioLib.Parameter.C1_vcf1_freq, vcf1_freq_slid.value);
  222.         hvSynth.SetFloatParameter(Hv_synth_AudioLib.Parameter.C1_vcf1_q, vcf1_q_slid.value);
  223.         hvSynth.SetFloatParameter(Hv_synth_AudioLib.Parameter.C1_vcf1_amount, vcf1_amount_slid.value);
  224.  
  225.         hvSynth.SetFloatParameter(Hv_synth_AudioLib.Parameter.C1_vcf2_cf, vcf2_cf_slid.value);                    //VCF_2
  226.         hvSynth.SetFloatParameter(Hv_synth_AudioLib.Parameter.C1_vcf2_freq, vcf2_freq_slid.value);
  227.         hvSynth.SetFloatParameter(Hv_synth_AudioLib.Parameter.C1_vcf2_q, vcf2_q_slid.value);
  228.         hvSynth.SetFloatParameter(Hv_synth_AudioLib.Parameter.C1_vcf2_amount, vcf2_amount_slid.value);
  229.  
  230.         hvSynth.SetFloatParameter(Hv_synth_AudioLib.Parameter.C1_delay_mix, delay_mix_slid.value);                //DELAY
  231.         hvSynth.SetFloatParameter(Hv_synth_AudioLib.Parameter.C1_delay_time, delay_time_slid.value);
  232.         hvSynth.SetFloatParameter(Hv_synth_AudioLib.Parameter.C1_delay_feedback, delay_feedback_slid.value);
  233.  
  234.         if (c1_outPut_onOff_btn.isOn) { hvSynth.SetFloatParameter(Hv_synth_AudioLib.Parameter.C1_outputonoff, 1); }
  235.         else { hvSynth.SetFloatParameter(Hv_synth_AudioLib.Parameter.C1_outputonoff, 0); }
  236.  
  237.  
  238.     }
  239.    
  240.     void Update()
  241.     {
  242.         hvSynth.SetFloatParameter(Hv_synth_AudioLib.Parameter.C1_mixer_volx, c1_vol_slid.value);
  243.         hvSynth.SetFloatParameter(Hv_synth_AudioLib.Parameter.Chmixer_ch1pan, c1_pan_slid.value);
  244.         hvSynth.SetFloatParameter(Hv_synth_AudioLib.Parameter.C1_pbrange, pB_amount_slid.value);                  //PitchBend
  245.         hvSynth.SetFloatParameter(Hv_synth_AudioLib.Parameter.C1_pbend, pB_slid.value);    
  246.     }
  247.  
  248.     public void LoadDefaultPrefs()
  249.     {
  250.         osc1_wave_slid.value = 0f;            //OSC_1
  251.         osc1_phase_slid.value = 0f;
  252.         osc1_pwm_slid.value = 0.5f;
  253.         osc1_oct_slid.value = 0f;
  254.         osc1_semi_slid.value = 0f;
  255.         osc1_cent_slid.value = 0f;
  256.  
  257.         osc2_wave_slid.value = 0f;            //OSC_2
  258.         osc2_phase_slid.value = 0f;
  259.         osc2_pwm_slid.value = 0.5f;
  260.         osc2_oct_slid.value = 0f;
  261.         osc2_semi_slid.value = 0f;
  262.         osc2_cent_slid.value = 0f;
  263.         osc2_onOff_btn.isOn = false;
  264.  
  265.         adsr1_dur_slid.value = 1000f;       //ADSR_1
  266.         adsr1_a_slid.value = 0.1f;
  267.         adsr1_d_slid.value = 0.2f;
  268.         adsr1_s_slid.value = 0.4f;
  269.         adsr1_r_slid.value = 0.3f;
  270.  
  271.         adsr2_dur_slid.value = 1000f;       //ADSR_2
  272.         adsr2_a_slid.value = 0.1f;
  273.         adsr2_d_slid.value = 0.2f;
  274.         adsr2_s_slid.value = 0.4f;
  275.         adsr2_r_slid.value = 0.3f;
  276.  
  277.         fm_wav_slid.value = 0f;                 //FM
  278.         fm_index_slid.value = 0f;
  279.         fm_freq_slid.value = 0f;
  280.         fm_multi_slid.value = 0f;
  281.         fm_phase_slid.value = 0f;
  282.         fm_pwm_slid.value = 0.5f;
  283.         fm_dur_slid.value = 1000f;
  284.         fm_a_slid.value = 0.1f;
  285.         fm_d_slid.value = 0.2f;
  286.         fm_s_slid.value = 0.4f;
  287.         fm_r_slid.value = 0.3f;
  288.  
  289.         am_wave_slid.value = 0f;                  //AM
  290.         am_index_slid.value = 0f;
  291.         am_freq_slid.value = 0f;
  292.         am_multi_slid.value = 0f;
  293.         am_phase_slid.value = 0f;
  294.         am_pwm_slid.value = 0.5f;
  295.         am_dur_slid.value = 1000f;
  296.         am_a_slid.value = 0.1f;
  297.         am_d_slid.value = 0.2f;
  298.         am_s_slid.value = 0.4f;
  299.         am_r_slid.value = 0.3f;
  300.  
  301.         vcf1_cf_slid.value = 0f;                    //VCF_1
  302.         vcf1_freq_slid.value = 0f;
  303.         vcf1_q_slid.value = 0f;
  304.         vcf1_amount_slid.value = 0f;
  305.  
  306.         vcf2_cf_slid.value = 0f;                    //VCF_1
  307.         vcf2_freq_slid.value = 0f;
  308.         vcf2_q_slid.value = 0f;
  309.         vcf2_amount_slid.value = 0f;
  310.  
  311.         delay_mix_slid.value = 0f;                //DELAY
  312.         delay_time_slid.value = 0f;
  313.         delay_feedback_slid.value = 0f;
  314.  
  315.         pB_slid.value = 8192f;                  //PitchBend
  316.         pB_amount_slid.value = 25f;
  317.         pb_resi_tog.isOn = true;
  318.         pb_resi_slid.value = 5f;
  319.  
  320.         c1_outPut_onOff_btn.isOn = true;
  321.         osc1_vol_slid.value = 0.5f;                //MIXER
  322.         osc2_vol_slid.value = 0.5f;
  323.         c1_vol_slid.value = 1f;
  324.  
  325.     }
  326.  
  327.     public void LoadSavedPrefs()
  328.     {
  329.         osc1_wave_slid.value = Prefs.prefrences.osc1_wave;            //OSC_1
  330.         osc1_phase_slid.value = Prefs.prefrences.osc1_phase;
  331.         osc1_pwm_slid.value = Prefs.prefrences.osc1_pwm;
  332.         osc1_oct_slid.value = Prefs.prefrences.osc1_oct;
  333.         osc1_semi_slid.value = Prefs.prefrences.osc1_semi;
  334.         osc1_cent_slid.value = Prefs.prefrences.osc1_cent;
  335.  
  336.         osc2_wave_slid.value = Prefs.prefrences.osc2_wave;            //OSC_2
  337.         osc2_phase_slid.value = Prefs.prefrences.osc2_phase;
  338.         osc2_pwm_slid.value = Prefs.prefrences.osc2_pwm;
  339.         osc2_oct_slid.value = Prefs.prefrences.osc2_oct;
  340.         osc2_semi_slid.value = Prefs.prefrences.osc2_semi;
  341.         osc2_cent_slid.value = Prefs.prefrences.osc2_cent;
  342.         if (Prefs.prefrences.osc2_onoff == 1) { osc2_onOff_btn.isOn = true; }
  343.         else { osc2_onOff_btn.isOn = false; }
  344.  
  345.         adsr1_dur_slid.value = Prefs.prefrences.adsr1_dur;       //ADSR_1
  346.         adsr1_a_slid.value = Prefs.prefrences.adsr1_a;
  347.         adsr1_d_slid.value = Prefs.prefrences.adsr1_d;
  348.         adsr1_s_slid.value = Prefs.prefrences.adsr1_s;
  349.         adsr1_r_slid.value = Prefs.prefrences.adsr1_r;
  350.  
  351.         adsr2_dur_slid.value = Prefs.prefrences.adsr2_dur;       //ADSR_1
  352.         adsr2_a_slid.value = Prefs.prefrences.adsr2_a;
  353.         adsr2_d_slid.value = Prefs.prefrences.adsr2_d;
  354.         adsr2_s_slid.value = Prefs.prefrences.adsr2_s;
  355.         adsr2_r_slid.value = Prefs.prefrences.adsr2_r;
  356.  
  357.         fm_wav_slid.value = Prefs.prefrences.fm_wave;                 //FM
  358.         fm_index_slid.value = Prefs.prefrences.fm_index;
  359.         fm_freq_slid.value = Prefs.prefrences.fm_freq;
  360.         fm_multi_slid.value = Prefs.prefrences.fm_multi;
  361.         fm_phase_slid.value = Prefs.prefrences.fm_phase;
  362.         fm_pwm_slid.value = Prefs.prefrences.fm_pwm;
  363.         fm_dur_slid.value = Prefs.prefrences.fm_dur;
  364.         fm_a_slid.value = Prefs.prefrences.fm_a;
  365.         fm_d_slid.value = Prefs.prefrences.fm_d;
  366.         fm_s_slid.value = Prefs.prefrences.fm_s;
  367.         fm_r_slid.value = Prefs.prefrences.fm_r;
  368.  
  369.         am_wave_slid.value = Prefs.prefrences.am_wave;                 //FM
  370.         am_index_slid.value = Prefs.prefrences.am_index;
  371.         am_freq_slid.value = Prefs.prefrences.am_freq;
  372.         am_multi_slid.value = Prefs.prefrences.am_multi;
  373.         am_phase_slid.value = Prefs.prefrences.am_phase;
  374.         am_pwm_slid.value = Prefs.prefrences.am_pwm;
  375.         am_dur_slid.value = Prefs.prefrences.am_dur;
  376.         am_a_slid.value = Prefs.prefrences.am_a;
  377.         am_d_slid.value = Prefs.prefrences.am_d;
  378.         am_s_slid.value = Prefs.prefrences.am_s;
  379.         am_r_slid.value = Prefs.prefrences.am_r;
  380.  
  381.         vcf1_cf_slid.value = Prefs.prefrences.vcf1_cf;                    //VCF_1
  382.         vcf1_freq_slid.value = Prefs.prefrences.vcf1_freq;
  383.         vcf1_q_slid.value = Prefs.prefrences.vcf1_q;
  384.         vcf1_amount_slid.value = Prefs.prefrences.vcf1_amount;
  385.  
  386.         vcf2_cf_slid.value = Prefs.prefrences.vcf2_cf;                    //VCF_1
  387.         vcf2_freq_slid.value = Prefs.prefrences.vcf2_freq;
  388.         vcf2_q_slid.value = Prefs.prefrences.vcf2_q;
  389.         vcf2_amount_slid.value = Prefs.prefrences.vcf2_amount;
  390.  
  391.         delay_mix_slid.value = Prefs.prefrences.delay_mix;                //DELAY
  392.         delay_time_slid.value = Prefs.prefrences.delay_time;
  393.         delay_feedback_slid.value = Prefs.prefrences.delay_feedback;
  394.  
  395.        
  396.         pB_amount_slid.value = Prefs.prefrences.pB_amount;                  //PitchBend
  397.         if (Prefs.prefrences.pB_resi_tog == 1) { pb_resi_tog.isOn = true; }
  398.         else { pb_resi_tog.isOn = false; pB_slid.value = Prefs.prefrences.pB; }
  399.         pb_resi_slid.value = Prefs.prefrences.pB_resi_slid;
  400.  
  401.         if (Prefs.prefrences.outputonoff == 1) { c1_outPut_onOff_btn.isOn = true; }                //MIXER
  402.         else { c1_outPut_onOff_btn.isOn = false; }        
  403.         osc1_vol_slid.value = Prefs.prefrences.mixer_vol1;
  404.         osc2_vol_slid.value = Prefs.prefrences.mixer_vol2;
  405.         c1_vol_slid.value = Prefs.prefrences.mixer_volx;
  406.     }
  407. }
RAW Paste Data
Top