hann   xtlang


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

Implementation

;; a repeating hann signal of width
;;
;; where a cycle is
;; time 0.0 -> width
;;
;; repeat is:
;; 1.0 - repeat immediately
;; 2.0 - repeat after two cycles
;; 4.0 - repeat after four cycles etc..
;;
(bind-func hann
  (lambda (time:i64 width:i64 repeat:i64)
    (if (or (< width 1)
            (> (% time (* width repeat)) width))
        0.0
        (* 0.5
           (- 1.0
              (cos (* STWOPI (/ (convert time)
                                (convert width)))))))))


Back to Index

Similar Entries

  • LR_to_MS_2_channels    xtlang
  • LR_to_MS_3_channels    xtlang
  • MS_to_LR_2_channels    xtlang
  • MS_to_LR_3_channels    xtlang
  • Pm_Event_Channel    xtlang
  • Pm_Message_Channel    xtlang
  • ai_build_anim_channel    xtlang
  • get_midi_evt_channel    xtlang
  • hann    xtlang
  • hanning    xtlang
  • hanning_window_func    xtlang
  • ocv_channels    xtlang
  • sf_channels    xtlang
  • sf_channels_from_file    xtlang
  • sf_set_channels    xtlang
  • window_hanning    xtlang
  • window_hanning    xtlang