Fix rainbow pattern step range in lighting controller
- Change step calculation from beat_index % 2 to beat_index % 256 - Provides full 0-255 step range for rainbow pattern color cycling - Fixes rainbow pattern that was limited to only 0 or 1 step values - Alternating phase patterns still use % 2 for proper phase offset
This commit is contained in:
@@ -152,7 +152,7 @@ class MidiHandler:
|
||||
"n1": self.n1,
|
||||
"n2": self.n2,
|
||||
"n3": self.n3,
|
||||
"s": self.beat_index % 2, # Keep step small (0 or 1) for alternating patterns
|
||||
"s": self.beat_index % 256, # Use full range for rainbow patterns
|
||||
}
|
||||
}
|
||||
|
||||
@@ -233,7 +233,7 @@ class MidiHandler:
|
||||
"n2": self.n2,
|
||||
"n3": self.n3,
|
||||
"dl": self.delay,
|
||||
"s": self.beat_index % 2, # Keep step small (0 or 1) for alternating patterns
|
||||
"s": self.beat_index % 256, # Use full range for rainbow patterns
|
||||
})
|
||||
|
||||
# Add empty entries for each bar (they'll use defaults)
|
||||
|
Reference in New Issue
Block a user