<commit_before>(ns afterglow.fixtures.blizzard
  "Definitions for fixtures provided by [Blizzard
  Lighting](http://www.blizzardlighting.com)."
  {:doc/format :markdown}
  (:require [afterglow.channels :as chan]
            [afterglow.effects.channel :refer [function-value-scaler]]))

(defn- build-gobo-entries
  "Create a series of function map entries describing the gobos
  available on one of the Torrent gobo wheels, in a format suitable
  for passing to [[chan/functions]]. `moving?` is `true` to generate
  entries for the moving gobo wheel, `false` for the fixed gobo wheel.
  `shake?` is `true` when generating entries for ranges which shake
  the gobo at variable speeds, `false` if the gobo is being projected
  in a static position. `names` is the list of gobo names to expand
  into corresponding function map entries."
  {:doc/format :markdown}
  [moving? shake? names]
  (map (fn [entry]
         (let [prefix (str "gobo-" (if moving? "moving-" "fixed-"))
               type-key (keyword
                         (str prefix (clojure.string/lower-case (clojure.string/replace entry #"[^a-zA-Z0-9]" "-"))
                              (when shake? "-shake")))
               label (str "Gobo" (when moving? "M") " " entry (when shake? " shake"))]
           (merge {:type type-key
                   :label label
                   :range (if shake? :variable :fixed)}
                  (when shake? {:var-label "Shake Speed"}))))
       names))

(defn torrent-f3
  "[Torrent F3](http://www.blizzardlighting.com/index.php?option=com_k2&view=item&id=174:torrent-f3™&Itemid=71)
  moving head effects spotlight. The default patching orientation is sitting on its feet
  with the LCD and control panel right side up and facing the
  audience. In this orientation, at a pan of 0, the beam is straight
  into the audience.

  The origin of the light is, as for all moving heads, at the
  intersection of the pan and tilt axes. That is the point that you
  need to reference when patching the fixture and telling Afterglow
  where it has been hung within [show
  space](https://github.com/brunchboy/afterglow/blob/master/doc/show_space.adoc#show-space). The
  image below shows this default orientation, and the axes, for the
  fixture. If it is hung with this side of the base facing the
  audience, right side up, then you do not need to specify any<commit_msg>Take advantage of sanitize-name function.<commit_after>(ns afterglow.fixtures.blizzard
  "Definitions for fixtures provided by [Blizzard
  Lighting](http://www.blizzardlighting.com)."
  {:doc/format :markdown}
  (:require [afterglow.channels :as chan]
            [afterglow.effects.channel :refer [function-value-scaler]]
            [afterglow.fixtures.qxf :refer [sanitize-name]]))

(defn- build-gobo-entries
  "Create a series of function map entries describing the gobos
  available on one of the Torrent gobo wheels, in a format suitable
  for passing to [[chan/functions]]. `moving?` is `true` to generate
  entries for the moving gobo wheel, `false` for the fixed gobo wheel.
  `shake?` is `true` when generating entries for ranges which shake
  the gobo at variable speeds, `false` if the gobo is being projected
  in a static position. `names` is the list of gobo names to expand
  into corresponding function map entries."
  {:doc/format :markdown}
  [moving? shake? names]
  (map (fn [entry]
         (let [prefix (str "gobo-" (if moving? "moving-" "fixed-"))
               type-key (keyword (sanitize-name (str prefix entry (when shake? " shake"))))
               label (str "Gobo" (when moving? "M") " " entry (when shake? " shake"))]
           (merge {:type type-key
                   :label label
                   :range (if shake? :variable :fixed)}
                  (when shake? {:var-label "Shake Speed"}))))
       names))

(defn torrent-f3
  "[Torrent F3](http://www.blizzardlighting.com/index.php?option=com_k2&view=item&id=174:torrent-f3™&Itemid=71)
  moving head effects spotlight. The default patching orientation is sitting on its feet
  with the LCD and control panel right side up and facing the
  audience. In this orientation, at a pan of 0, the beam is straight
  into the audience.

  The origin of the light is, as for all moving heads, at the
  intersection of the pan and tilt axes. That is the point that you
  need to reference when patching the fixture and telling Afterglow
  where it has been hung within [show
  space](https://github.com/brunchboy/afterglow/blob/master/doc/show_space.adoc#show-space). The
  image below shows this default orientation, and the axes, for the
  fixture. If it is hung with this side of the base facing the
  audience, right side up, then you do not need to specify any
{'fraction_non_alphanumeric': 0.0972457627118644, 'fraction_numerical': 0.004661016949152543, 'mean_word_length': 3.1668137687555165, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 4, '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': '230497', 'n_tokens_mistral': 1416, 'n_tokens_neox': 1351, 'n_words': 568}