osc4_cc   xtlang


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

Implementation

(bind-func osc4_cc
  (lambda ()
    (let ((val 0.0:f)
          (osc-octave 0)
          (osc-tune 1.0)
          (osc-octave-value 1.0))
      (lambda (inst offset:i32 cc:i32 value:i32)
        ;; (println 'osc4_cc cc value)
        (set! val (/ (i32tof value) 127.0))
        (cond ((= cc (+ offset 0)) ;; amplitude of osc 1
               (set_osc4_amp inst val))
              ((= cc (+ offset 1)) ;; waveform of osc 1 (PARAM_SINE,PARAM_SAW,PARAM_PULSE,PARAM_TRI,PARAM_WT)
               (set_osc4_wave inst (get_waveform value)))
              ((= cc (+ offset 2)) ;; pulse width (for PARAM_PULSE wave) 0.0-1.0 (0.5 is square)
               (set_osc4_pw inst val))
              ((= cc (+ offset 3)) ;; frequency shift of osc - tuning - 2.0 up
               ;; tune 0.5 down tune etc..
               (set! osc-tune (+ 1.0 (+ -0.2 (* val 0.4))))
               (set_osc4_tune inst (* osc-octave-value osc-tune)))
              ((= cc (+ offset 4))
               (set! osc-octave (- (clamp value 61 70) 64))
               (set! osc-octave-value (octave_from_val val))
               (set_osc4_tune inst (* osc-octave-value osc-tune))
               ;; (println 'v osc4-octave 'v2 osc4-octave-value)
               void)
              ((= cc (+ offset 5)) ;; phase (default is 0.0)
               (set_osc4_phase inst val)))))))


Back to Index

Similar Entries

  • Cconj    xtlang
  • Ccos    xtlang
  • Ccosh    xtlang
  • Ccot    xtlang
  • Ccoth    xtlang
  • Ccsc    xtlang
  • Ccsch    xtlang
  • MCC    xtlang
  • PARAM_OSC4_AMP    scheme
  • PARAM_OSC4_AMP    scheme
  • PARAM_OSC4_FRQ    scheme
  • PARAM_OSC4_FRQ    scheme
  • PARAM_OSC4_PAN    scheme
  • PARAM_OSC4_PHASE    scheme
  • PARAM_OSC4_PW    scheme
  • PARAM_OSC4_PW    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
  • lfo3_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
  • reverb_cc    xtlang
  • rtmidi_default_callback:RtMidiCCallback    xtlang
  • send-midi-cc    scheme
  • sub_noise_cc    xtlang
  • succ    scheme