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

transpose: support all combinations of numbers and strings for notes and intervals #1048

Merged
merged 1 commit into from
Apr 8, 2024

Conversation

felixroos
Copy link
Collaborator

@felixroos felixroos commented Apr 6, 2024

this all works now:

note("40 40 40").transpose("0 1 2"); // "40 41 42"
"40 40 40".transpose("0 1 2"); // "40 41 42"
note("40 40 40").transpose("1P 2M 3m"); // "40 42 43"
"40 40 40".transpose("1P 2M 3m"); // "40 42 43"
note("c c c").transpose("0 1 2"); // "C Db D"
"c c c".transpose("0 1 2"); // "C Db D"
note("c c c").transpose("1P 2M 3m"); // "C D Eb"
"c c c".transpose("1P 2M 3m"); // "C D Eb"

this makes .transpose a drop-in replacement for .add, because the syntax note(...).add(...) was removed in #1026, so it can now be replaced with note(...).transpose(...)

@felixroos felixroos merged commit e8ed57f into main Apr 8, 2024
2 checks passed
@felixroos felixroos deleted the transpose-numbers branch April 8, 2024 15:25
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