From 066f99f50f1059ac9249cdd9bb1122b722147e71 Mon Sep 17 00:00:00 2001
From: Micah Elizabeth Scott <micah@scanlime.org>
Date: Fri, 7 Mar 2014 02:19:27 -0800
Subject: [PATCH] New hue pattern

---
 examples/node/midi_particles.coffee | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/examples/node/midi_particles.coffee b/examples/node/midi_particles.coffee
index 285bdc2..7688be5 100755
--- a/examples/node/midi_particles.coffee
+++ b/examples/node/midi_particles.coffee
@@ -128,8 +128,10 @@ draw = () ->
         x = radius * Math.cos theta
         y = radius * Math.sin theta
 
-        # One rainbow per octave
-        hue = (p.note.key - 60 + 0.1) / 12.0
+        # Hop around between almost-opposing colors, eventually going
+        # around the rainbow. These ratios control what kinds of color
+        # schemes we get for different chords.
+        hue = (p.note.key - 60 + 0.1) * (7 / 12.0)
         p.color = OPC.hsv hue, 0.5, 0.8
 
         # Intensity mapped to velocity, nonlinear
-- 
GitLab