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

Various changes #6

Closed
wants to merge 9 commits into from
Closed

Various changes #6

wants to merge 9 commits into from

Conversation

joculatrix
Copy link
Owner

Merge various changes made on the pitch_wheel branch by accident.

joculatrix and others added 9 commits September 12, 2024 14:30
This commit:
* Creates a new private struct called `PitchController`.
* Moves details of frequency, MIDI pitch, and detuning into `PitchController`
so `Oscillator` has to deal with as little of it as possible on its own.
* Renames `OscMode` to `PitchMode`.
* Renames `Message::OscMode` to `Message::PitchMode`.
* Renames `Oscillator::set_coarse_detune()` and `Oscillator::set_fine_detune()`
to `detune_coarse()` and `detune_fine()`.
* Removes or strips down several `Oscillator` methods/fields to reference
or call `PitchController` instead.
This commit:
* Adds a test module `pitch_control_tests` to provide basic checks for
`PitchController` functionality.
* Removes an unnecessary `mut` from `PitchController::get_freq()`.
This commit:
* Allows `midi` to send `Message::PitchBend`.
* Implements the function `PitchController::pitch_bend()`, which uses
bit operations to convert the MIDI bytes to a usable value.
* Updates `PitchController::get_freq()` to use the pitch bend value.
* Adds a `byte_conversion_is_correct` test to `pitch_control_tests`.
This commit replaces tuple-like enum variants with struct-like variants
for all `Message` types containing multiple values. This allows for
greater clarity of purpose via named fields.
This commit fixes an issue where double-clicking some knobs to reset their
value to default would not affect the synthesizer.
@joculatrix joculatrix closed this Sep 20, 2024
@joculatrix joculatrix deleted the pitch_wheel branch September 20, 2024 19:18
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

Successfully merging this pull request may close these issues.

1 participant