cerberus_amp_pitch_env_cc   xtlang


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

Implementation

(bind-func cerberus_amp_pitch_env_cc
  (lambda ()
    (let ((val 0.0:f)
          (envlgth 1.0:f)
          (ampenv (vector_ref 0.0:f 0.0:f 1.0:f 0.0:f))
          (penv (vector_ref 0.0:f 0.0:f)))
      (lambda (inst offset:i32 cc:i32 value:i32)
        ;; (println 'cerberus_amp_pitch_env_cc cc value)
        (set! val (/ (i32tof value) 127.0))
        (cond ((= cc (+ offset 0)) ;; amp env attack
               (vset! ampenv 0 (* val 127.0))
               (set_amp_env inst (* envlgth (vref ampenv 0)) (* envlgth (vref ampenv 1)) (vref ampenv 2) (* envlgth (vref ampenv 3))))
              ((= cc (+ offset 1)) ;; amp env decay
               (vset! ampenv 1 (* val 127.0 10.0))
               (set_amp_env inst (* envlgth (vref ampenv 0)) (* envlgth (vref ampenv 1)) (vref ampenv 2) (* envlgth (vref ampenv 3))))
              ((= cc (+ offset 2)) ;; amp env sustain
               (vset! ampenv 2 val)
               (set_amp_env inst (* envlgth (vref ampenv 0)) (* envlgth (vref ampenv 1)) (vref ampenv 2) (* envlgth (vref ampenv 3))))
              ((= cc (+ offset 3)) ;; amp env release
               (vset! ampenv 3 (* val 127.0 50.0))
               (set_amp_env inst (* envlgth (vref ampenv 0)) (* envlgth (vref ampenv 1)) (vref ampenv 2) (* envlgth (vref ampenv 3))))
              ((= cc (+ offset 4))
               (set! envlgth (* 127.0 val))
               (set_amp_env inst (* envlgth (vref ampenv 0)) (* envlgth (vref ampenv 1)) (vref ampenv 2) (* envlgth (vref ampenv 3))))
              ((= cc (+ offset 5)) ;; pitch env attack
               (vset! penv 0 (* val 1000.0))
               (set_pitch_env inst (vref penv 0) (vref penv 1)))
              ((= cc (+ offset 6)) ;; pitch env decay
               (vset! penv 1 (* val 1000.0))
               (set_pitch_env inst (vref penv 0) (vref penv 1)))
              ((= cc (+ offset 7)) ;; pitch env amt
               (set_pitch_env_amt inst (- (* 2.0 val) 1.0))))))))


Back to Index

Similar Entries

  • Cconj    xtlang
  • Ccos    xtlang
  • Ccosh    xtlang
  • Ccot    xtlang
  • Ccoth    xtlang
  • Ccsc    xtlang
  • Ccsch    xtlang
  • LFO_OPT_FRQ_TO_AMP    scheme
  • MCC    xtlang
  • PARAM_NOISE_AMP    scheme
  • PARAM_NOISE_AMP    scheme
  • PARAM_NOISE_AMP    scheme
  • PARAM_OSC1_AMP    scheme
  • PARAM_OSC1_AMP    scheme
  • PARAM_OSC1_AMP    scheme
  • PARAM_OSC2_AMP    scheme
  • PARAM_OSC2_AMP    scheme
  • PARAM_OSC2_AMP    scheme
  • PARAM_OSC3_AMP    scheme
  • PARAM_OSC3_AMP    scheme
  • PARAM_OSC4_AMP    scheme
  • PARAM_OSC4_AMP    scheme
  • PaStreamParameters_print    xtlang
  • PaStreamParameters_toString    xtlang
  • PmEvent_cc_p    xtlang
  • Pm_Event_Timestamp    xtlang
  • amp_pitch_env_cc    xtlang
  • analogue_cc    xtlang
  • audiofile_16bitPCM_to_sample_be    xtlang
  • audiofile_16bitPCM_to_sample_le    xtlang
  • audiofile_24bitPCM_to_sample_be    xtlang
  • audiofile_24bitPCM_to_sample_le    xtlang
  • audiofile_aiff_read_samples    xtlang
  • audiofile_copy_samples    xtlang
  • audiofile_float_to_sample_be    xtlang
  • audiofile_float_to_sample_le    xtlang
  • audiofile_read_samples    xtlang
  • audiofile_wave_read_samples    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_cc    xtlang
  • cerberus_create_lfos    xtlang
  • cerberus_delay_cc    xtlang
  • cerberus_extras_cc    xtlang
  • cerberus_filter_cc    xtlang
  • cerberus_filter_env_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
  • clamp    macro
  • clear-sampler    scheme
  • clear_sample_data_    xtlang
  • clock->samples    scheme
  • cpBBClampVect    xtlang
  • cpvclamp    xtlang
  • delay_cc    xtlang
  • dl_amp_decay    xtlang
  • dl_amp_decay    xtlang
  • dl_amp_decay_dur    xtlang
  • dl_amp_decay_dur    xtlang
  • dl_noise_amp    xtlang
  • dl_noise_amp    xtlang
  • dl_osc1_amp    xtlang
  • dl_osc1_amp    xtlang
  • dl_osc1_pitch    xtlang
  • dl_osc1_pitch    xtlang
  • dl_osc2_amp    xtlang
  • dl_osc2_amp    xtlang
  • dl_osc2_pitch    xtlang
  • dl_osc2_pitch    xtlang
  • dl_part_amp    xtlang
  • dl_part_amp    xtlang
  • dl_pitch_amt    xtlang
  • dl_pitch_amt    xtlang
  • dl_pitch_decay    xtlang
  • dl_pitch_decay    xtlang
  • env-wrap    xtlang
  • envelope-segments    xtlang
  • envelope-segments    xtlang
  • envelope_c    xtlang
  • extras_cc    xtlang
  • filter_cc    xtlang
  • filter_env_cc    xtlang
  • flanger_cc    xtlang
  • get_amp_env    xtlang
  • get_analogue_synth_cc_name    xtlang
  • get_filter_env    xtlang
  • get_midi_evt_timestamp    xtlang
  • get_noise_amp    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
  • init_lv2_amp    xtlang
  • init_sample_data    xtlang
  • init_sample_data    xtlang
  • lfo1_cc    xtlang
  • lfo2_cc    xtlang
  • lfo3_cc    xtlang
  • lfo4_cc    xtlang
  • load-sample    scheme
  • load-sampler    scheme
  • logRamp    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
  • new_sample    xtlang
  • new_sample    xtlang
  • note-pitch    xtlang
  • osc1_cc    xtlang
  • osc2_cc    xtlang
  • osc3_cc    xtlang
  • osc4_cc    xtlang
  • pc:closest-pitch    scheme
  • qrampr    macro
  • ramp    macro
  • rampr    macro
  • reverb_cc    xtlang
  • rtmidi_default_callback:RtMidiCCallback    xtlang
  • sampler    scheme
  • sampler    scheme
  • sampler-parse-filename    scheme
  • sampler-parse-midinote-filename    scheme
  • sampler-parse-spn-filename    scheme
  • sampler-populate-slot    scheme
  • sampler-set-slot-offset    scheme
  • sampler_fx    xtlang
  • sampler_note    xtlang
  • sampler_note_linear    xtlang
  • samples->clock    scheme
  • scientific-pitch-notation-to-midi-number    scheme
  • send-midi-cc    scheme
  • set_amp_env    xtlang
  • set_dl_envs    xtlang
  • set_filter_env    xtlang
  • set_noise_amp    xtlang
  • set_pitch_env    xtlang
  • set_sample_data_    xtlang
  • set_sample_offset_    xtlang
  • set_sampler_audiobuffer    xtlang
  • sf_samplerate    xtlang
  • sf_samples_from_file    xtlang
  • sf_set_samplerate    xtlang
  • shader_update_envmap    xtlang
  • sub_noise_cc    xtlang
  • succ    scheme
  • sys_env_delete    xtlang
  • sys_env_get    xtlang
  • sys_env_set    xtlang
  • xtm_clampf    xtlang
  • xtm_envmap_as_skybox    xtlang
  • xtm_envmap_init    xtlang
  • xtm_envmap_weight    xtlang