cerberus_filter_env_cc   xtlang


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

Implementation

(bind-func cerberus_filter_env_cc
  (lambda ()
    (let ((val 0.0:f)
          (envlgth 1.0:f)
          (fenv (vector_ref 0.0:f 0.0 1.0 0.0)))
      (lambda (inst offset:i32 cc:i32 value:i32)
        ;; (println 'cerberus_filter_cc cc value)
        (set! val (/ (i32tof value) 127.0))
        (cond ((= cc (+ offset 0)) ;; filter env attack
               (vset! fenv 0 (* val 127.0))
               (set_filter_env inst (* envlgth (vref fenv 0)) (* envlgth (vref fenv 1)) (vref fenv 2) (* envlgth (vref fenv 3))))
              ((= cc (+ offset 1)) ;; filter env decay
               (vset! fenv 1 (* val 127.0 10.0))
               (set_filter_env inst (* envlgth (vref fenv 0)) (* envlgth (vref fenv 1)) (vref fenv 2) (* envlgth (vref fenv 3))))
              ((= cc (+ offset 2)) ;; filter env sustain
               (vset! fenv 2 val)
               (set_filter_env inst (* envlgth (vref fenv 0)) (* envlgth (vref fenv 1)) (vref fenv 2) (* envlgth (vref fenv 3))))
              ((= cc (+ offset 3)) ;; filter env release
               (vset! fenv 3 (* val 127.0 50.0))
               (set_filter_env inst (* envlgth (vref fenv 0)) (* envlgth (vref fenv 1)) (vref fenv 2) (* envlgth (vref fenv 3))))
              ((= cc (+ offset 4))
               (set! envlgth (* 127.0 val))
               (set_filter_env inst (* envlgth (vref fenv 0)) (* envlgth (vref fenv 1)) (vref fenv 2) (* envlgth (vref fenv 3))))
              ((= cc (+ offset 5)) ;; filter env amt (frq)
               (set_filter_env_amt inst (cerberus_frq_from_val val)))
              ((= cc (+ offset 6)) ;; follow note frq (%) i.e. (+ cutoff (* frequency value))
               (set_filter_env_follow_frq inst val))
              ((= cc (+ offset 7)) ;; follow amp i.e. (+ cutoff (* amplitude value))
               (set_filter_env_follow_amp inst val)))))))


Back to Index

Similar Entries

  • Cconj    xtlang
  • Ccos    xtlang
  • Ccosh    xtlang
  • Ccot    xtlang
  • Ccoth    xtlang
  • Ccsc    xtlang
  • Ccsch    xtlang
  • MCC    xtlang
  • PARAM_FILTER_FRQ    scheme
  • PARAM_FILTER_FRQ    scheme
  • PARAM_FILTER_FRQ    scheme
  • PARAM_FILTER_RES    scheme
  • PARAM_FILTER_RES    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-load-preset    scheme
  • cerberus-load-state    scheme
  • cerberus-reset    scheme
  • cerberus-save-preset    scheme
  • cerberus_amp_pitch_env_cc    xtlang
  • cerberus_cc    xtlang
  • cerberus_create_lfos    xtlang
  • cerberus_delay_cc    xtlang
  • cerberus_extras_cc    xtlang
  • cerberus_filter_cc    xtlang
  • cerberus_flanger_cc    xtlang
  • cerberus_frq_from_val    xtlang
  • cerberus_fx    xtlang
  • cerberus_get_filtertype    xtlang
  • cerberus_get_lfo_waveform    xtlang
  • cerberus_get_mod_matrix    xtlang
  • cerberus_get_noisetype    xtlang
  • cerberus_get_waveform    xtlang
  • cerberus_get_wt_expr    scheme
  • cerberus_lfo1_cc    xtlang
  • cerberus_lfo2_cc    xtlang
  • cerberus_lfo3_cc    xtlang
  • cerberus_lfo4_cc    xtlang
  • cerberus_logRamp    xtlang
  • cerberus_main_cc    xtlang
  • cerberus_matrix_cc    xtlang
  • cerberus_moog_ladder_inlined    xtlang
  • cerberus_note    xtlang
  • cerberus_octave_from_val    xtlang
  • cerberus_osc1_cc    xtlang
  • cerberus_osc2_cc    xtlang
  • cerberus_osc3_cc    xtlang
  • cerberus_osc4_cc    xtlang
  • cerberus_remove_file    xtlang
  • cerberus_reset    xtlang
  • cerberus_reset_lfos    xtlang
  • cerberus_reverb_cc    xtlang
  • cerberus_set_mod_matrix    xtlang
  • cerberus_sub_noise_cc    xtlang
  • cpShapeFilterNew    xtlang
  • delay_cc    xtlang
  • dl_filter1_frq    xtlang
  • dl_filter1_frq    xtlang
  • dl_filter1_frq_scale    xtlang
  • dl_filter1_frq_scale    xtlang
  • dl_filter1_res    xtlang
  • dl_filter1_res    xtlang
  • dl_filter1_type    xtlang
  • dl_filter1_type    xtlang
  • dl_filter2_frq    xtlang
  • dl_filter2_frq    xtlang
  • dl_filter2_frq_scale    xtlang
  • dl_filter2_frq_scale    xtlang
  • dl_filter2_res    xtlang
  • dl_filter2_res    xtlang
  • dl_filter2_type    xtlang
  • dl_filter2_type    xtlang
  • env-wrap    xtlang
  • envelope-segments    xtlang
  • envelope-segments    xtlang
  • envelope_c    xtlang
  • extras_cc    xtlang
  • filter    scheme
  • filter    scheme
  • filter    xtlang
  • filter_cc    xtlang
  • filter_env_cc    xtlang
  • filter_input    xtlang
  • filter_inputs    xtlang
  • filter_lwork    xtlang
  • filter_output    xtlang
  • filter_outputs    xtlang
  • filter_prework    xtlang
  • filter_rate    xtlang
  • filter_work    xtlang
  • flanger_cc    xtlang
  • get_amp_env    xtlang
  • get_analogue_synth_cc_name    xtlang
  • get_filter_env    xtlang
  • get_filtertype    xtlang
  • get_pitch_env    xtlang
  • impc:ir:compile:make-closureenv    scheme
  • impc:ir:compile:make-env    scheme
  • impc:ir:make-struct-str-env    scheme
  • impromptu_envs    scheme
  • init_env_map    xtlang
  • lfo1_cc    xtlang
  • lfo2_cc    xtlang
  • lfo3_cc    xtlang
  • lfo4_cc    xtlang
  • main_cc    xtlang
  • make-envelope    xtlang
  • make-environment    macro
  • 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_amp_env    xtlang
  • set_dl_envs    xtlang
  • set_dl_filter    xtlang
  • set_filter    xtlang
  • set_filter_env    xtlang
  • set_pitch_env    xtlang
  • shader_setup_convolution_filter    xtlang
  • shader_update_envmap    xtlang
  • sub_noise_cc    xtlang
  • succ    scheme
  • sys_env_delete    xtlang
  • sys_env_get    xtlang
  • sys_env_set    xtlang
  • xtm_envmap_as_skybox    xtlang
  • xtm_envmap_init    xtlang
  • xtm_envmap_weight    xtlang