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 scale indexing #21

Merged
merged 1 commit into from
Jan 14, 2024
Merged

Add scale indexing #21

merged 1 commit into from
Jan 14, 2024

Conversation

dpsanders
Copy link
Collaborator

No description provided.

@dpsanders dpsanders merged commit 7970d87 into main Jan 14, 2024
3 checks passed
end

return Pitch(PitchClass(s.notes[n + 1]), s.notes[n + 1].octave + octave)
end

Choose a reason for hiding this comment

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

Why zero-based indexing?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

What else would make sense? That way positive and negative are symmetric around the tonic.

Copy link

@stevengj stevengj Jan 15, 2024

Choose a reason for hiding this comment

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

1-based indexing is not only more common in Julia, but it also seems more common in music. If you poll 100 musicians with “what is the 5th note in the C major scale”, how many do you think would answer “A”?

Copy link

@stevengj stevengj Jan 15, 2024

Choose a reason for hiding this comment

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

See e.g. https://en.m.wikipedia.org/wiki/Degree_(music) for the standard 1-based enumeration

Copy link

@stevengj stevengj Jan 15, 2024

Choose a reason for hiding this comment

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

Nor do I understand the point of positive and negative indices being symmetric around the tonic. The intervals aren’t symmetric, nor are the musical functions of the notes.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good points, thanks! Let me rethink

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.

None yet

2 participants