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

Simple Synth pitches are incorrect #204

Open
franky47 opened this issue Feb 22, 2021 · 4 comments
Open

Simple Synth pitches are incorrect #204

franky47 opened this issue Feb 22, 2021 · 4 comments
Labels
bug examples Relates to code in Examples good first issue Ideal for first-time open source contributors

Comments

@franky47
Copy link
Member

See #203.

Correct values of pitches:
https://www.inspiredacoustics.com/en/MIDI_note_numbers_and_center_frequencies

Values must be rounded to the nearest integer, as the tone function does not accept floating point values.

@franky47 franky47 added bug examples Relates to code in Examples good first issue Ideal for first-time open source contributors labels Feb 22, 2021
@akshay4n
Copy link

@franky47 i would like to work on this

@franky47
Copy link
Member Author

@akshay4n, awesome, go ahead !

Ping me here if there's anything you need help with.

@akshay4n
Copy link

akshay4n commented Feb 23, 2021

@franky47
Copy link
Member Author

franky47 commented Feb 23, 2021

I initially thought that the frequency values were off in the pitch list, but the problem is in reading the table.

It starts at B0, which should map to MIDI note number 23. So the index at which we read the pitch should be noteNumber - 23 to map to the correct note (while taking care not to output negative indices):
https://github.com/FortySevenEffects/arduino_midi_library/blob/master/examples/SimpleSynth/SimpleSynth.ino#L54

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug examples Relates to code in Examples good first issue Ideal for first-time open source contributors
Projects
None yet
Development

No branches or pull requests

2 participants