lfo3_cc   xtlang


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/libs/core/instruments/analogue_midi.xtm

Implementation

(bind-func lfo3_cc
  (lambda ()
    (let ((val 0.0:f)
          (amp 1.0)
          (frq 1.0)
          (envlgth 2.0)
          (lfoenv (vector_ref 10.0:f 10.0 0.0 0.0)))
      (lambda (inst offset:i32 cc:i32 value:i32)
        ;; (println 'lfo3_cc cc value)
        (set! val (/ (i32tof value) 127.0))
        (cond ((= cc (+ offset 0)) ;; env attack
               (vset! lfoenv 0 (* val 1000.0))
               (set_lfo_ad inst PARAM_LFO3 (* envlgth (vref lfoenv 0)) (* envlgth (vref lfoenv 1)) (vref lfoenv 2) (vref lfoenv 3)))
              ((= cc (+ offset 1)) ;; env decay
               (vset! lfoenv 1 (* val 1000.0))
               (set_lfo_ad inst PARAM_LFO3 (* envlgth (vref lfoenv 0)) (* envlgth (vref lfoenv 1)) (vref lfoenv 2) (vref lfoenv 3)))
              ((= cc (+ offset 2)) ;; env attack slope
               (vset! lfoenv 2 (- (* val 2.0) 1.0))
               (set_lfo_ad inst PARAM_LFO3 (* envlgth (vref lfoenv 0)) (* envlgth (vref lfoenv 1)) (vref lfoenv 2) (vref lfoenv 3)))
              ((= cc (+ offset 3)) ;; env decay slope
               (vset! lfoenv 3 (- (* val 2.0) 1.0))
               (set_lfo_ad inst PARAM_LFO3 (* envlgth (vref lfoenv 0)) (* envlgth (vref lfoenv 1)) (vref lfoenv 2) (vref lfoenv 3)))
              ((= cc (+ offset 4)) ;; env length
               (set! envlgth (* val 8.0))
               (set_lfo inst PARAM_LFO3 amp (* envlgth frq) 0.0 0)
               (set_lfo_ad inst PARAM_LFO3 (* envlgth (vref lfoenv 0)) (* envlgth (vref lfoenv 1)) (vref lfoenv 2) (vref lfoenv 3)))
              ((= cc (+ offset 5)) ;; lfo amp
               (set! amp val)
               (set_lfo inst PARAM_LFO3 amp frq 0.0 0))
              ((= cc (+ offset 6)) ;; lfo frq
               (set! frq (clamp (* val 10.0) 0.05 20.0))
               (set_lfo inst PARAM_LFO3 amp (* envlgth frq) 0.0 0))
              ((= cc (+ offset 7)) ;; lfo type
               (set_lfo_type inst PARAM_LFO3 (get_lfo_waveform value))))))))


Back to Index

Similar Entries

  • Cconj    xtlang
  • Ccos    xtlang
  • Ccosh    xtlang
  • Ccot    xtlang
  • Ccoth    xtlang
  • Ccsc    xtlang
  • Ccsch    xtlang
  • MCC    xtlang
  • PARAM_LFO3    scheme
  • PARAM_LFO3    scheme
  • PmEvent_cc_p    xtlang
  • amp_pitch_env_cc    xtlang
  • analogue_cc    xtlang
  • call/cc    scheme
  • cc0    scheme
  • cc1    scheme
  • cc2    scheme
  • cc3    scheme
  • cc4    scheme
  • cerberus_amp_pitch_env_cc    xtlang
  • cerberus_cc    xtlang
  • cerberus_delay_cc    xtlang
  • cerberus_extras_cc    xtlang
  • cerberus_filter_cc    xtlang
  • cerberus_filter_env_cc    xtlang
  • cerberus_flanger_cc    xtlang
  • cerberus_lfo1_cc    xtlang
  • cerberus_lfo2_cc    xtlang
  • cerberus_lfo3_cc    xtlang
  • cerberus_lfo4_cc    xtlang
  • cerberus_main_cc    xtlang
  • cerberus_matrix_cc    xtlang
  • cerberus_osc1_cc    xtlang
  • cerberus_osc2_cc    xtlang
  • cerberus_osc3_cc    xtlang
  • cerberus_osc4_cc    xtlang
  • cerberus_reverb_cc    xtlang
  • cerberus_sub_noise_cc    xtlang
  • delay_cc    xtlang
  • extras_cc    xtlang
  • filter_cc    xtlang
  • filter_env_cc    xtlang
  • flanger_cc    xtlang
  • get_analogue_synth_cc_name    xtlang
  • lfo1_cc    xtlang
  • lfo2_cc    xtlang
  • lfo4_cc    xtlang
  • main_cc    xtlang
  • matrix_cc    xtlang
  • mcc    macro
  • midi-cc    scheme
  • midi_cc    xtlang
  • midi_cc    xtlang
  • midi_cc    xtlang
  • midi_cc    xtlang
  • osc1_cc    xtlang
  • osc2_cc    xtlang
  • osc3_cc    xtlang
  • osc4_cc    xtlang
  • reverb_cc    xtlang
  • rtmidi_default_callback:RtMidiCCallback    xtlang
  • send-midi-cc    scheme
  • set_lfo3    scheme
  • set_lfo3_type    scheme
  • sub_noise_cc    xtlang
  • succ    scheme