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

Add "Greensleeves" song #5

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

artginzburg
Copy link

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).

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).
Copy link
Owner

@danilofuchs danilofuchs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can add a flatMap here to duplicate the array

Like this: https://github.com/danilofuchs/ForceTouchPlayer/blob/main/ForceTouchPlayer/Songs/Tetris.swift

Copy link
Author

@artginzburg artginzburg Mar 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

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.

2 participants