find_previous_peak   xtlang


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/libs/contrib/TSM_library.xtm

Implementation

;finds the peak of the region in the previous frame to which the current peak belongs to
(bind-func find_previous_peak
  (lambda (current_peak:i64 prev_peaks_array:i64* prev_lower_bound:i64* prev_upper_bound:i64* prev_size:i64)
    (let ((n:i64 0)
          (prev_peak:i64 0))
      (cond ((= (is_empty prev_peaks_array prev_size) 0)
              (while (= (and (<= (pref prev_lower_bound n) current_peak) (<= current_peak (pref prev_upper_bound n))) 0)
                (set! n (+ n 1)))
              (set! prev_peak (pref prev_peaks_array n)))
            (else
               (set! prev_peak -1)))
      prev_peak)))


Back to Index

Similar Entries

  • PARAM_Peak    scheme
  • PARAM_Peak    scheme
  • Widget_find_inorder    xtlang
  • Widget_find_postorder    xtlang
  • Widget_find_preorder    xtlang
  • aiProcess_FindDegenerates    scheme
  • aiProcess_FindInstances    scheme
  • aiProcess_FindInvalidData    scheme
  • ai_find_matching_node    xtlang
  • cl:find-if    scheme
  • find_node    xtlang
  • find_peaks    xtlang
  • find_peaks_log    xtlang
  • find_sexprs    xtlang
  • find_sqr_exprs    xtlang
  • get_find_handler    xtlang
  • gui_find_leaf_inorder    xtlang
  • gui_find_leaf_postorder    xtlang
  • gui_find_leaf_preorder    xtlang
  • gui_find_next_id    xtlang
  • gui_find_parent    xtlang
  • gui_find_widget_with_id    xtlang
  • iffchunk_find_dumb    xtlang
  • iffchunk_find_smart    xtlang
  • impc:compiler:print-could-not-resolve-types_find-expr    scheme
  • impc:ti:find-all-vars    scheme
  • impc:ti:find-unresolved-simple-types    scheme
  • instrument_find_note    xtlang
  • pc:find-closest    scheme
  • xtm_find_bone    xtlang