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

mod wheel callback #184

Open
Pomax opened this issue Dec 7, 2020 · 4 comments
Open

mod wheel callback #184

Pomax opened this issue Dec 7, 2020 · 4 comments

Comments

@Pomax
Copy link

Pomax commented Dec 7, 2020

I see there's a pitch bend callback, but there's no mod wheel (cc01) callback. Can one be added?

@franky47
Copy link
Member

franky47 commented Dec 8, 2020

You can use the ControlChange callback and check for CC01 there:

void handleControlChange(byte channel, byte controlNumber, byte value)
{
  if (controlNumber == 1)
  {
    // Handle mod wheel here
  }
}

@Pomax
Copy link
Author

Pomax commented Dec 8, 2020

While true, it's such an integral part of {pitch, mod, notes} that it seems worth giving it a dedicated callback for folks who don't need "all CC" but do need the mod wheel =)

@franky47
Copy link
Member

franky47 commented Dec 8, 2020

If you don't need the rest of the CC, you don't have any more code to write, whereas having a separate case for the mod wheel opens a can of worms: each new callback adds two bytes of RAM, so folks who only need modwheel would not benefit from such a change overall.

@Pomax
Copy link
Author

Pomax commented Dec 8, 2020

I see. Could I at least ask that gets added as a code example? Mod wheels are pretty essential, so having the callbacks docs explicitly go "there is no dedicated modwheel callback, because you can already do this with the CC handler in the following way" (or something to that effect) would be super useful documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants