<commit_before>(ns bossig.core

  (:require [quil.core :as q]
            [quil.middleware :as m]
            [quil.helpers.seqs :refer [seq->stream range-incl cycle-between steps]]
            [quil.applet :as qa]
            [bossig.kaosinst])
  (:import ( 'codeanticode.syphon.SyphonServer))
  (:import ('jsyphon.JSyphonServer))
                                        ; (:import ('com.jogamp.newt.NewtFactory.*))
                                        ;(:import ('javax.media.opengl GLCanvas GLEventListener GL GLAutoDrawable))
 ; (:import ('javax.media.opengl.glu GLU))

  )



(def width 1440)
(def height 980)
(def server (atom nil))
(def tr (seq->stream (cycle-between 1 1 16 0.1 0.1)))

(defn setup []
  (q/frame-rate 30)
 (reset! server (codeanticode.syphon.SyphonServer. (quil.applet/current-applet) "test"))
  ;;(:sserver (new SyphonServer [(qa/currentapplet), "test" ]) )
 ; {:server ( codeanticode.syphon.SyphonServer. (quil.applet/current-applet) "test2" )}
  )


;(remove-event-handler ::keyboard-handler)

(println @bd)








(defn update2 [state]
    {
   :beat @bbeat
   :bd @bd
   :sd @sd
   :ch @ch
   :oh @oh
   :pc1 @pc1
   :pc2 @pc2
   :ld1 @ld1
   :ld2 @ld2
   :chords @chords
   :keyz @keyz

   :tr (tr)

   ;:drumbus @(audio-bus-monitor 0)
   ;:contrabus @(audio-bus-monitor 2)
   ;:fmtonesbus @(audio-bus-monitor 4)
   ;:fmchordsbus @(audio-bus-monitor 6)
   ;:axobus  @(get-in axotapper [:taps :left])
   ;:kickA (getkick)

   ;:snareA (get (get-in @live-pats [snareA]) (mod @bbeat (count (get-in @live-pats [snareA]))))
   ;:c-hat (getchat)
   ;:fmchord (get  (getchords) :carrier)
   ;:fmtones (nth (map #(or (:carrier %) (:depth %) 0)  (get-in @live-pats [fmtones])) (mod @bbeat (count (get-in @live-pats [fmtones]))))
   ;:contra (get (get-in @live-pats [contra])(mod @bbeat (count (get-in @live-pats [contra]))))
   })
(defn draw [state]
  (q/background [ 1 128 0]

                (bassdrum [state]))
  )

(defn draw1 [state]
  (q/background 25 (* 2 (get @sd :velocity)) (* (tr) 23))
  (q/with-translation [0 2000 -1000]
    (q/with-rotation [(* 0.1 (mod16))  1 0 0 ]
      (dotimes [ x (get @bd :velocity)]
        (dotimes [ y (get @bd :velocity)]
          ;(q/with-rotation [(get @sd note) 0 1 0])
          (q/with-translation [ (* x (get @bd :note) 1)
                                (* y -100)
                                (* 100 0) ]
            (q/fill (* (get @bd :velocity) 5 ) 0 23)
            (if (= x 2)
              (q/box 50)
              (q/box (* y 5))))
          ))))
  (.sendScreen @server)

  )

(defn draw [state]


  (q/background 25 (* 2 (get @sd :velocity)) 255)

<commit_msg>syphonstuff not fixed<commit_after>(ns bossig.core

  (:require [quil.core :as q]
            [quil.middleware :as m]
            [quil.helpers.seqs :refer [seq->stream range-incl cycle-between steps]]
            [quil.applet :as qa]
            [bossig.kaosinst])
  (:import ( 'codeanticode.syphon.SyphonServer))
  (:import ('jsyphon.JSyphonServer))
                                        ; (:import ('com.jogamp.newt.NewtFactory.*))
                                        ;(:import ('javax.media.opengl GLCanvas GLEventListener GL GLAutoDrawable))
 ; (:import ('javax.media.opengl.glu GLU))

  )



(def width 1440)
(def height 980)
(def server (atom nil))
(def tr (seq->stream (cycle-between 1 1 16 0.1 0.1)))

(defn setup []
  (q/frame-rate 30)
 (reset! server (codeanticode.syphon.SyphonServer. (quil.applet/current-applet) "test"))
  ;;(:sserver (new SyphonServer [(qa/currentapplet), "test" ]) )
 ; {:server ( codeanticode.syphon.SyphonServer. (quil.applet/current-applet) "test2" )}
  )


;(remove-event-handler ::keyboard-handler)

(println @bd)








(defn update2 [state]
    {
   :beat @bbeat
   :bd @bd
   :sd @sd
   :ch @ch
   :oh @oh
   :pc1 @pc1
   :pc2 @pc2
   :ld1 @ld1
   :ld2 @ld2
   :chords @chords
   :keyz @keyz

   :tr (tr)

   ;:drumbus @(audio-bus-monitor 0)
   ;:contrabus @(audio-bus-monitor 2)
   ;:fmtonesbus @(audio-bus-monitor 4)
   ;:fmchordsbus @(audio-bus-monitor 6)
   ;:axobus  @(get-in axotapper [:taps :left])
   ;:kickA (getkick)

   ;:snareA (get (get-in @live-pats [snareA]) (mod @bbeat (count (get-in @live-pats [snareA]))))
   ;:c-hat (getchat)
   ;:fmchord (get  (getchords) :carrier)
   ;:fmtones (nth (map #(or (:carrier %) (:depth %) 0)  (get-in @live-pats [fmtones])) (mod @bbeat (count (get-in @live-pats [fmtones]))))
   ;:contra (get (get-in @live-pats [contra])(mod @bbeat (count (get-in @live-pats [contra]))))
   })
(defn draw [state]
  (q/background [ 1 128 0]

                (bassdrum [state]))
  (.sendScreen @server)
  )

(defn draw1 [state]
  (q/background 25 (* 2 (get @sd :velocity)) (* (tr) 23))
  (q/with-translation [0 2000 -1000]
    (q/with-rotation [(* 0.1 (mod16))  1 0 0 ]
      (dotimes [ x (get @bd :velocity)]
        (dotimes [ y (get @bd :velocity)]
          ;(q/with-rotation [(get @sd note) 0 1 0])
          (q/with-translation [ (* x (get @bd :note) 1)
                                (* y -100)
                                (* 100 0) ]
            (q/fill (* (get @bd :velocity) 5 ) 0 23)
            (if (= x 2)
              (q/box 50)
              (q/box (* y 5))))
          ))))
  (.sendScreen @server)

  )

(defn draw [state]


  (q/background 25 (* 2 (get @sd :velocity)) 255)


{'fraction_non_alphanumeric': 0.17731029301277235, 'fraction_numerical': 0.03155522163786627, 'mean_word_length': 2.2588739290085678, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7088023', 'n_tokens_mistral': 2264, 'n_tokens_neox': 2035, 'n_words': 500}