<commit_before>(ns afterglow.rhythm
  "Functions to help work with musical time."
  {:author "<NAME>, <NAME>",
   :original
   "https://github.com/overtone/overtone/blob/master/src/overtone/music/rhythm.clj"}
  (:require [overtone.at-at :refer [now]]
            [clojure.math.numeric-tower :refer [round floor]]))

(defonce
  ^{:private true
    :doc "Protect protocols against namespace reloads"}
  _PROTOCOLS_
  (do
    (defprotocol IMetronome
  "A time-keeping tool for music-related systems."
  (metro-start [metro] [metro start-beat]
    "Returns the start time of the metronome. Also restarts the
     metronome at start-beat if given.")
  (metro-bar-start [metro start-bar]
    "Restarts the metronome at start-bar, keeping the beat phase
    unchanged in case it is being synced to an external source.")
  (metro-phrase-start [metro start-phrase]
    "Restarts the metronome at start-phrase, keeping the beat phase
    unchanged in case it is being synced to an external source.")
  (metro-adjust [metro ms]<commit_msg>Make citation more accessible.<commit_after>(ns afterglow.rhythm
  "Functions to help work with musical time, evolved from the original
  version in [Overtone](https://github.com/overtone/overtone/blob/master/src/overtone/music/rhythm.clj)."
 {:author "<NAME>, <NAME>",
   :doc/format :markdown}
  (:require [overtone.at-at :refer [now]]
            [clojure.math.numeric-tower :refer [round floor]]))

(defonce
  ^{:private true
    :doc "Protect protocols against namespace reloads"}
  _PROTOCOLS_
  (do
    (defprotocol IMetronome
  "A time-keeping tool for music-related systems."
  (metro-start [metro] [metro start-beat]
    "Returns the start time of the metronome. Also restarts the
     metronome at start-beat if given.")
  (metro-bar-start [metro start-bar]
    "Restarts the metronome at start-bar, keeping the beat phase
    unchanged in case it is being synced to an external source.")
  (metro-phrase-start [metro start-phrase]
    "Restarts the metronome at start-phrase, keeping the beat phase
    unchanged in case it is being synced to an external source.")
  (metro-adjust [metro ms]
{'fraction_non_alphanumeric': 0.10605349601126232, 'fraction_numerical': 0.0, 'mean_word_length': 3.727272727272727, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1746871', 'n_tokens_mistral': 686, 'n_tokens_neox': 673, 'n_words': 227}