Fix/bipolar center color#75
Fix/bipolar center color#75lilyvanoekel merged 3 commits intolilyvanoekel:mainfrom hemanth5055:fix/bipolar-center-color
Conversation
There was a problem hiding this comment.
could we detect this dynamically instead of hardcoding to panning params? I think we can use paramRange from params.ts
There was a problem hiding this comment.
We don't need orange as a specified colour, we can just rely on the blending between green and red. (I can see how that was confusing in the issue description, sorry about that!)
|
@hemanth5055 thanks for this PR! I had a few small comments. I also have a question about the video. It seems like the velocity knob also changes background colour? |
Hey @lilyvanoekel, thanks for the review .Yes, I noticed that the velocity knob background changes. I will investigate the cause and work on the issues you mentioned above. |
|
Hey @lilyvanoekel, I’ve updated the code according to your review and also fixed the issue where the velocity knob’s background was changing when adjusting the panning knob. Screen.Recording.2025-10-01.at.10.46.59.PM.mov |
📌 Description
This PR fixes the knob background color logic for parameters with ranges that span negative to positive values (e.g.,
-100 to 100).Previously, the knob background worked only for
0 → 100ranges (green → red).For bipolar ranges like
-100 → 100, the midpoint (0) should represent balance and display as green, while extremes (-100and100) should display as red.Added a gradient mapping for negative, zero, and positive values:
-100 → red-75 → orange0 → green+75 → orange+100 → red✅ Related Issue
Closes #60
📷 Screenshots
Before
Knob background incorrectly mapped
0 → greenand100 → red, but did not account for-100 → 100ranges.After
Knob background now correctly displays red at extremes, green at center, orange in between for bipolar ranges.
Screen.Recording.2025-10-01.at.5.48.09.PM.mov
🔍 Testing Done
0 → 100ranges (unchanged).-100 → 100ranges (now correct).ℹ️ Additional Notes