-
Notifications
You must be signed in to change notification settings - Fork 18
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
Holiday Hacking 1: Architecture: Flatten key press handling #83
Commits on Dec 1, 2023
-
Simplify Piano key_pressed array handling.
- Rely on default init values - Deduplicate range check
Jules Kerssemakers committedDec 1, 2023 Configuration menu - View commit details
-
Copy full SHA for a4827ef - Browse repository at this point
Copy the full SHA a4827efView commit details -
Extract PianoListener interface for all up/down logic (prep for liste…
…ner pattern)
Jules Kerssemakers committedDec 1, 2023 Configuration menu - View commit details
-
Copy full SHA for be8cc37 - Browse repository at this point
Copy the full SHA be8cc37View commit details -
make Piano new dispatching hub of key up/down events, via PianoListener.
The hub itself shouldn't implement its own listener-interface, to avoid infititely-recursive triggers, so un-implement PianoListener, and rename the 'onKey*'-methods to 'doKey*' to signal their importance.
Jules Kerssemakers committedDec 1, 2023 Configuration menu - View commit details
-
Copy full SHA for ff4ba8d - Browse repository at this point
Copy the full SHA ff4ba8dView commit details -
Extract sound-sample handling from Piano to new SoundSet class.
Jules Kerssemakers committedDec 1, 2023 Configuration menu - View commit details
-
Copy full SHA for 145f6f0 - Browse repository at this point
Copy the full SHA 145f6f0View commit details -
Unify soundset-related folder- and prefix-handling into SoundSet stat…
…ic helpers. The old `SOUNDSET_DIR_PREFIX` already indicated in its name it wanted to live in a SoundSet class. Additionally, it's not just for DIRs, since it's also (ab?)used to get at the translation keys. As such, move the prefix to SoundSet, and isntead use SoundSet helpers everywhere the prefix is currently used. Also, the SoundSet class, which is already handling the raw folder access, is a far better candidate for scanning that folder, than the current SettingsFragment.
Jules Kerssemakers committedDec 1, 2023 Configuration menu - View commit details
-
Copy full SHA for e7e9e29 - Browse repository at this point
Copy the full SHA e7e9e29View commit details -
Extract an interface for SoundSet as prep for test-dummy SoundSets.
An interface for something with only one sane implementation (SampledSoundSet) might seem like overkill, but this allows us to write tests without adding a dependency on a mocking framework, which would be worse overkill.
Jules Kerssemakers committedDec 1, 2023 Configuration menu - View commit details
-
Copy full SHA for 4538c3a - Browse repository at this point
Copy the full SHA 4538c3aView commit details -
Free Piano of last Context-awareness: convert sound-playing to PianoL…
…istener. Move the last context-awareness out of piano, by converting `play_sound()`, including all its supporting infrastructure, to external PianoListener. Rather than one single, complex Melody-Preference-checking Listener, use a strategy pattern with two simple listeners: - one for 'normal' behaviour: StraightKeySoundMaker - one for melodies: MelodicKeySoundMaker Choose which one to listen with only once during piano-init, rather than checking melody-not-null on every key-press.
Jules Kerssemakers committedDec 1, 2023 Configuration menu - View commit details
-
Copy full SHA for aa8a3b5 - Browse repository at this point
Copy the full SHA aa8a3b5View commit details -
Group sound-related stuff into 'sound' package.
It was getting cluttered in the main package.
Jules Kerssemakers committedDec 1, 2023 Configuration menu - View commit details
-
Copy full SHA for bb5a284 - Browse repository at this point
Copy the full SHA bb5a284View commit details