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

Notenumber overflow occurs when downward pitch bend receive during playing lowest note. #48

Open
kachine opened this issue Feb 8, 2021 · 0 comments

Comments

@kachine
Copy link

kachine commented Feb 8, 2021

Describe the bug

The note# is stored in higher 8bit of user_osc_param::pitch as uint8_t datatype.

In my recognition, when NTS-1 receive a pitch bend MIDI message, note# stored in higher 8bit of user_osc_param::pitch is decremented (for pitch down) or incremented (for pitch up) from actual MIDI note# by NTS-1 system software.

Upward pitch bend message is OK, but downward pitch bend seems like:

MIDI Pitch bend value user_osc_param::pitch
-4096 <= pitchbend < 0 actual MIDI note# -1
-8192 <= pitchbend < -4096 actual MIDI note# -2

So, when playing MIDI note#0 and any downward pitchbend received, overflow occurs because of unsigned integer (same problem occurs when playing MIDI note#1 and pitchbend less than -4096 received).

If this occurs, the playing tone's pitch gets extremely high (seems overflowed value is treated as higher note# by NTS-1 system software).

This problem occurs in both of preset oscillators and user oscillators.
The developer has no way to get real MIDI note# or pitch bend value, it should be fixed in NTS-1 system software.

To Reproduce
Steps to reproduce the behavior:

  1. Choose any oscillator in NTS-1
  2. Send note#0 on midi message
  3. Send negative (any value within -1 to -8192) pitch bend midi message
  4. The tone frequency gets incorrect

Expected behavior
The tone should be played correct frequency

Screenshots
N/A

Environment
NTS-1

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

1 participant