instrument_find_note   xtlang


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

Implementation

(bind-func instrument_find_note
  (lambda (notes:NoteData** lgth)
    (let ((idx 0)
          (i 0)
          (old (note_starttime (pref notes 0)))
          (active #f)
          (starttime 0)
          (go #t))
      (while (= #t go)
        (set! starttime (note_starttime (pref notes i)))
        (if (< starttime old)
            (begin (set! old starttime) (set! idx i)))
        (set! active (note_active (pref notes i)))
        (if (not active)
            (begin (set! idx i) (set! go #f)))
        ;; (println '-- i (note_active (pref notes i)) (note_refcnt (pref notes i)))
        (set! i (+ i 1))
        (if (= i lgth) (set! go #f))
        void)
      ;; (println "note:" idx (note_active (pref notes idx)) (note_refcnt (pref notes idx)))
      (pref notes idx))))


Back to Index

Similar Entries

  • LFO_OPT_NOTEDUR    scheme
  • PmEvent_note_off_p    xtlang
  • PmEvent_note_on_p    xtlang
  • Widget_find_inorder    xtlang
  • Widget_find_postorder    xtlang
  • Widget_find_preorder    xtlang
  • active_notes    xtlang
  • active_notes    xtlang
  • aiProcess_FindDegenerates    scheme
  • aiProcess_FindInstances    scheme
  • aiProcess_FindInvalidData    scheme
  • ai_find_matching_node    xtlang
  • analogueVec_note    xtlang
  • analogue_note    xtlang
  • basic_note    xtlang
  • cerberus_note    xtlang
  • cl:find-if    scheme
  • cl:notevery    scheme
  • close-note-gate    scheme
  • dlogue_note    xtlang
  • find_node    xtlang
  • find_peaks    xtlang
  • find_peaks_log    xtlang
  • find_previous_peak    xtlang
  • find_sexprs    xtlang
  • find_sqr_exprs    xtlang
  • fmsynth_note    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
  • homo-play-midi-note    scheme
  • homo-play-midi-note    scheme
  • 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
  • make-instrument    macro
  • make_instrument    xtlang
  • make_instrument    xtlang
  • midi-note-off    scheme
  • midi-note-on    scheme
  • midi_note_off    xtlang
  • midi_note_off    xtlang
  • midi_note_off    xtlang
  • midi_note_on    xtlang
  • midi_note_on    xtlang
  • midi_note_on    xtlang
  • note-active    xtlang
  • note-activity    xtlang
  • note-grad    xtlang
  • note-pitch    xtlang
  • pc:find-closest    scheme
  • play-midi-note    scheme
  • play-midi-note    scheme
  • play-note    scheme
  • sampler-parse-midinote-filename    scheme
  • sampler_note    xtlang
  • sampler_note_linear    xtlang
  • saw_synth_note_c    xtlang
  • saw_synth_note_c    xtlang
  • start-note    scheme
  • stop-note    scheme
  • xtm_find_bone    xtlang
  • xtm_notequal    xtlang
  • xtm_notequal    xtlang
  • xtm_notequal    xtlang
  • xtm_notequal    xtlang
  • xtm_notequal    xtlang
  • xtm_notequal    xtlang
  • xtm_notequal    xtlang
  • xtm_notequal    xtlang
  • xtm_notequal    xtlang
  • xtm_play_note    xtlang
  • xtm_release_note    xtlang
  • xtm_start_note    xtlang
  • xtm_stop_note    xtlang