Permalink
Browse files

dynamic fader support

  • Loading branch information...
1 parent 695a5dd commit d3edcfe2f86a5cd4bb6c99a97e10ded10095f07b @badgeek committed Feb 3, 2012
Showing with 8 additions and 13 deletions.
  1. +2 −1 function
  2. +6 −12 visual_class
View
@@ -61,7 +61,8 @@
(define (receive_osc)
(cond ((eqv? debug 1)
- (display (osc-peek))(newline)
+ (display (osc-peek))
+ (newline)
))
(osc_bank_set)
View
@@ -8,13 +8,11 @@
(field (vis_gain 1))
(field (vis_blur 0))
(field (vis_fader (vector 0 0 0 0)))
- (field (vis_fader_count (vector-length vis_fader)))
-
+ (field (vis_fader_count 0))
(define/public (constructor)
-
+ (set! vis_fader_count (vector-length vis_fader))
(initialize)
-
)
(define/public (initialize)
@@ -40,14 +38,14 @@
(define/public (setosc)
;send osc fader, gain back to lemur
;todo: make it flexible
- (osc-send "/gaincontrol/x" "f" (list (/ vis_gain 10)))
-
(define i 0)
+
+ (osc-send "/gaincontrol/x" "f" (list (/ vis_gain 10)))
(do ()
[(= i vis_fader_count)]
- (osc-send (string-append "/Fader/" (number->string i)) "f" (list (vector-ref vis_fader i)))
- (set! i (+ i 1)))
+ (osc-send (string-append "/Fader/" (number->string i)) "f" (list (vector-ref vis_fader i)))
+ (set! i (+ i 1)))
)
@@ -73,7 +71,6 @@
)
-
(define/public (vertex-ref i)
(values (vector-ref vertex i))
@@ -86,7 +83,6 @@
)
-
(define/public (draw)
(cond ((eqv? vertex_active 0)
@@ -111,7 +107,6 @@
(destroy (vector-ref vertex i))
(set! vertex_active 0)
(set! i (+ i 1)))
-
)
@@ -125,7 +120,6 @@
)
-
(constructor)
)
)

0 comments on commit d3edcfe

Please sign in to comment.