lfo4_cc   xtlang


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

Implementation

(bind-func lfo4_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 'lfo4_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_LFO4 (* 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_LFO4 (* 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_LFO4 (* 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_LFO4 (* 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_LFO4 amp (* envlgth frq) 0.0 0)
               (set_lfo_ad inst PARAM_LFO4 (* 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_LFO4 amp frq 0.0 0))
              ((= cc (+ offset 6)) ;; lfo frq
               (set! frq (clamp (* val 10.0) 0.05 20.0))
               (set_lfo inst PARAM_LFO4 amp (* envlgth frq) 0.0 0))
              ((= cc (+ offset 7)) ;; lfo type
               (set_lfo_type inst PARAM_LFO4 (get_lfo_waveform value))))))))


Back to Index

Similar Entries

  • Cconj    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/gsl.xtm
  • Ccos    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/gsl.xtm
  • Ccosh    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/gsl.xtm
  • Ccot    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/gsl.xtm
  • Ccoth    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/gsl.xtm
  • Ccsc    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/gsl.xtm
  • Ccsch    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/gsl.xtm
  • MCC    xtlang    /digego/extempore/tree/v0.8.9/examples/sharedsystem/midisetup.xtm
  • PARAM_LFO4    scheme    /digego/extempore/tree/v0.8.9/libs/core/instruments-scm.xtm
  • PARAM_LFO4    scheme    /digego/extempore/tree/v0.8.9/examples/sharedsystem/audiosetup.xtm
  • PmEvent_cc_p    xtlang    /digego/extempore/tree/v0.8.9/libs/external/portmidi.xtm
  • amp_pitch_env_cc    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/analogue_midi.xtm
  • analogue_cc    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/analogue_midi.xtm
  • call/cc    scheme    /digego/extempore/tree/v0.8.9/runtime/init.xtm
  • cc0    scheme    /digego/extempore/tree/v0.8.9/libs/core/pc_ivl.xtm
  • cc1    scheme    /digego/extempore/tree/v0.8.9/libs/core/pc_ivl.xtm
  • cc2    scheme    /digego/extempore/tree/v0.8.9/libs/core/pc_ivl.xtm
  • cc3    scheme    /digego/extempore/tree/v0.8.9/libs/core/pc_ivl.xtm
  • cc4    scheme    /digego/extempore/tree/v0.8.9/libs/core/pc_ivl.xtm
  • cerberus_amp_pitch_env_cc    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/cerberus_midi.xtm
  • cerberus_cc    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/cerberus_midi.xtm
  • cerberus_delay_cc    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/cerberus_midi.xtm
  • cerberus_extras_cc    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/cerberus_midi.xtm
  • cerberus_filter_cc    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/cerberus_midi.xtm
  • cerberus_filter_env_cc    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/cerberus_midi.xtm
  • cerberus_flanger_cc    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/cerberus_midi.xtm
  • cerberus_lfo1_cc    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/cerberus_midi.xtm
  • cerberus_lfo2_cc    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/cerberus_midi.xtm
  • cerberus_lfo3_cc    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/cerberus_midi.xtm
  • cerberus_lfo4_cc    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/cerberus_midi.xtm
  • cerberus_main_cc    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/cerberus_midi.xtm
  • cerberus_matrix_cc    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/cerberus_midi.xtm
  • cerberus_osc1_cc    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/cerberus_midi.xtm
  • cerberus_osc2_cc    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/cerberus_midi.xtm
  • cerberus_osc3_cc    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/cerberus_midi.xtm
  • cerberus_osc4_cc    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/cerberus_midi.xtm
  • cerberus_reverb_cc    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/cerberus_midi.xtm
  • cerberus_sub_noise_cc    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/cerberus_midi.xtm
  • delay_cc    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/analogue_midi.xtm
  • extras_cc    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/analogue_midi.xtm
  • filter_cc    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/analogue_midi.xtm
  • filter_env_cc    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/analogue_midi.xtm
  • flanger_cc    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/analogue_midi.xtm
  • get_analogue_synth_cc_name    xtlang    /digego/extempore/tree/v0.8.9/examples/sharedsystem/setup.xtm
  • lfo1_cc    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/analogue_midi.xtm
  • lfo2_cc    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/analogue_midi.xtm
  • lfo3_cc    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/analogue_midi.xtm
  • main_cc    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/analogue_midi.xtm
  • matrix_cc    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/analogue_midi.xtm
  • mcc    macro    /digego/extempore/tree/v0.8.9/libs/external/portmidi.xtm
  • midi-cc    scheme    /digego/extempore/tree/v0.8.9/libs/external/midi.xtm
  • midi_cc    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/channel_strip.xtm
  • midi_cc    xtlang    /digego/extempore/tree/v0.8.9/libs/external/midi.xtm
  • midi_cc    xtlang    /digego/extempore/tree/v0.8.9/examples/sharedsystem/setup.xtm
  • midi_cc    xtlang    /digego/extempore/tree/v0.8.9/examples/sharedsystem/midisetup.xtm
  • osc1_cc    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/analogue_midi.xtm
  • osc2_cc    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/analogue_midi.xtm
  • osc3_cc    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/analogue_midi.xtm
  • osc4_cc    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/analogue_midi.xtm
  • reverb_cc    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/analogue_midi.xtm
  • rtmidi_default_callback:RtMidiCCallback    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/rtmidi.xtm
  • send-midi-cc    scheme    /digego/extempore/tree/v0.8.9/libs/external/portmidi.xtm
  • set_lfo4    scheme    /digego/extempore/tree/v0.8.9/libs/core/instruments-scm.xtm
  • set_lfo4_type    scheme    /digego/extempore/tree/v0.8.9/libs/core/instruments-scm.xtm
  • sub_noise_cc    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/analogue_midi.xtm
  • succ    scheme    /digego/extempore/tree/v0.8.9/runtime/init.xtm