Draft
Conversation
TODO: prevent "OVERRIDE_" constants from being global. They should only be relevant for this song (but I did not check this approach with other songs).
danilofuchs
reviewed
Mar 15, 2023
Owner
danilofuchs
left a comment
There was a problem hiding this comment.
Awesome!
I don't have a MacBook™ anymore. If you send me a video/audio showing the music is good I will approve of this with my Windows™ machine and find a friend to build it for me (thanks Apple™).
|
|
||
| (OVERRIDE_NOTE_AS4,DURATION_OVERRIDE_MINUS_8), (OVERRIDE_NOTE_A4,DURATION_OVERRIDE_16), (OVERRIDE_NOTE_G4,DURATION_OVERRIDE_8), (OVERRIDE_NOTE_FS4,DURATION_OVERRIDE_MINUS_8), (OVERRIDE_NOTE_E4,DURATION_OVERRIDE_16), (OVERRIDE_NOTE_FS4,DURATION_OVERRIDE_8), | ||
| (OVERRIDE_NOTE_G4,DURATION_OVERRIDE_MINUS_2) | ||
| // then it just repeats once more in the arduino code. Decided to DRY it. |
Owner
There was a problem hiding this comment.
You can add a flatMap here to duplicate the array
Like this: https://github.com/danilofuchs/ForceTouchPlayer/blob/main/ForceTouchPlayer/Songs/Tetris.swift
Author
There was a problem hiding this comment.
Yes, but as a user I feel more comfortable pressing the Play button again if I want to listen to exactly the same thing again
| let OVERRIDE_NOTE_FS4 = NOTE_FS1; | ||
| let OVERRIDE_NOTE_D4 = NOTE_D1; | ||
| let OVERRIDE_NOTE_E4 = NOTE_E1; | ||
| let OVERRIDE_NOTE_F5 = NOTE_F2; // highest note |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TODO: prevent "OVERRIDE_" constants from being global. They should only be relevant for this song (but I did not check this approach with other songs).