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    /digego/extempore/tree/v0.8.9/libs/contrib/TSM_library.xtm
  • LR_to_MS_3_channels    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/TSM_library.xtm
  • MS_to_LR_2_channels    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/TSM_library.xtm
  • MS_to_LR_3_channels    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/TSM_library.xtm
  • Pm_Event_Channel    xtlang    /digego/extempore/tree/v0.8.9/libs/external/portmidi.xtm
  • Pm_Message_Channel    xtlang    /digego/extempore/tree/v0.8.9/libs/external/portmidi.xtm
  • ai_build_anim_channel    xtlang    /digego/extempore/tree/v0.8.9/libs/external/assimp.xtm
  • get_midi_evt_channel    xtlang    /digego/extempore/tree/v0.8.9/libs/external/midi.xtm
  • hann    xtlang    /digego/extempore/tree/v0.8.9/libs/core/audio_dsp.xtm
  • hanning    xtlang    /digego/extempore/tree/v0.8.9/libs/core/math.xtm
  • hanning_window_func    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/TSM_library.xtm
  • ocv_channels    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/xtmcv.xtm
  • sf_channels    xtlang    /digego/extempore/tree/v0.8.9/libs/external/sndfile.xtm
  • sf_channels_from_file    xtlang    /digego/extempore/tree/v0.8.9/libs/external/sndfile.xtm
  • sf_set_channels    xtlang    /digego/extempore/tree/v0.8.9/libs/external/sndfile.xtm
  • window_hanning    xtlang    /digego/extempore/tree/v0.8.9/libs/core/math.xtm
  • window_hanning    xtlang    /digego/extempore/tree/v0.8.9/libs/core/math.xtm