Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect LED note offsets #533

Open
Nufirdy opened this issue Jan 5, 2025 · 1 comment
Open

Incorrect LED note offsets #533

Nufirdy opened this issue Jan 5, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@Nufirdy
Copy link

Nufirdy commented Jan 5, 2025

Actually it's two separate issues but I'll put them in single report since they're about same feature.

First "Light Number" as in web interface or "LED number" as in raspberry screen menu are misleading because they don't refer to an LED number on a strip but to a key number on a piano.

Second and more important this magic number 20
note_pos_raw = int(density * (note - 20) - note_offset)
seems to move position of the offset from actual note number to note - 20 which greatly complicates offset configuration.

Installation Method
For installation I used prebuilt image version 1.5 from Releases page and saved it to SD card using Etcher.

Steps to Reproduce

  1. Create new offset
  2. Set Light Number to any number written on LED strip and any Offset. For example 56 and 2
  3. All LEDs starting from key 36 are shifted 2 lights to left

Expected behavior
Expected to see LEDs starting from LED labeled 56 to move 2 lights left.

Environment
I'm using WS2812B strip and Casio CDP-S110BK piano.

@Nufirdy Nufirdy added the bug Something isn't working label Jan 5, 2025
@onlaj
Copy link
Owner

onlaj commented Jan 5, 2025

Hello.
I think I’ll just change the naming from 'Light number' to 'Note number' to make it less confusing. That way, you’ll still set the offset relative to the piano key, not the LED strip itself. I’ll also remove the '20' offset in the frontend, so you can simply type the note’s number, counting from the left. It will still be confusing on pianos with fewer than 88 keys, but that’s what the green and red alignment lights are for.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants