{"action":"created","issue":{"url":"https://api.github.com/repos/cemolcay/MusicTheory/issues/16","repository_url":"https://api.github.com/repos/cemolcay/MusicTheory","labels_url":"https://api.github.com/repos/cemolcay/MusicTheory/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/cemolcay/MusicTheory/issues/16/comments","events_url":"https://api.github.com/repos/cemolcay/MusicTheory/issues/16/events","html_url":"https://github.com/cemolcay/MusicTheory/issues/16","id":320486769,"node_id":"MDU6SXNzdWUzMjA0ODY3Njk=","number":16,"title":"[Proposal] Unifying note value and pitch: a new definition of Note and a few name changes","user":{"login":"DJBen","id":2078653,"node_id":"MDQ6VXNlcjIwNzg2NTM=","avatar_url":"https://avatars3.githubusercontent.com/u/2078653?v=4","gravatar_id":"","url":"https://api.github.com/users/DJBen","html_url":"https://github.com/DJBen","followers_url":"https://api.github.com/users/DJBen/followers","following_url":"https://api.github.com/users/DJBen/following{/other_user}","gists_url":"https://api.github.com/users/DJBen/gists{/gist_id}","starred_url":"https://api.github.com/users/DJBen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DJBen/subscriptions","organizations_url":"https://api.github.com/users/DJBen/orgs","repos_url":"https://api.github.com/users/DJBen/repos","events_url":"https://api.github.com/users/DJBen/events{/privacy}","received_events_url":"https://api.github.com/users/DJBen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-05-05T07:16:38Z","updated_at":"2018-06-21T16:44:26Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Music is the art of sounds flowing in time.\r\n\r\nI find that `Note` has the semantic of pitch. The rhythm related representation `NoteValue`, however, is completely decoupled from the relatively heavily implemented pitch aspects of music theory. \r\n\r\nIt is difficult for me to know from a single model which note to play and for how long. \r\n\r\nHere I propose a few changes:\r\n\r\n- Rename `NoteType` to `Key`\r\n> Rationale: note type is not descriptive name of the group of *relative* pitches. The term [key](https://en.wikipedia.org/wiki/Key_(music)) is used commonly instead.\r\n> Because `Scale` is already in use and has different semantics, better not overload this name\r\n- Rename `Note` to `Pitch`\r\n> Rationale: pitch represents absolute frequency as the addition of octave number nails down the absolute frequency.\r\n- Introduce new `Note`\r\n    - Two properties`NoteValue` and `Pitch` to reflect both frequency and time it should occupy.\r\n    - (optional) Have a extendable option set like if it has a staccato and / or if it exists as appoggiatura.\r\n    - It is convenient for further usages, for example, the introduction of note group to describe a duplet consisting of two notes. Later we can group notes into bars, bars into sheet music.\r\n    - Foundation to produce midi music.\r\n- Added supports to `Note` in other classes\r\n    - Tempo: add duration calculation for `Note`\r\n    - etc.\r\n\r\n### Compatibility\r\nThis change will **not** be compatible with the current `1.0` version. The version will be bumped to `2.0` per [semantic versioning](https://semver.org) requirement to indicate it is not backward compatible.\r\n\r\n### Workflow\r\nAccepting or not, I am making changes towards this goal in my own fork in order to glue my project together. I will label any related PR to this issue.\r\n"},"comment":{"url":"https://api.github.com/repos/cemolcay/MusicTheory/issues/comments/399169215","html_url":"https://github.com/cemolcay/MusicTheory/issues/16#issuecomment-399169215","issue_url":"https://api.github.com/repos/cemolcay/MusicTheory/issues/16","id":399169215,"node_id":"MDEyOklzc3VlQ29tbWVudDM5OTE2OTIxNQ==","user":{"login":"cemolcay","id":2419578,"node_id":"MDQ6VXNlcjI0MTk1Nzg=","avatar_url":"https://avatars2.githubusercontent.com/u/2419578?v=4","gravatar_id":"","url":"https://api.github.com/users/cemolcay","html_url":"https://github.com/cemolcay","followers_url":"https://api.github.com/users/cemolcay/followers","following_url":"https://api.github.com/users/cemolcay/following{/other_user}","gists_url":"https://api.github.com/users/cemolcay/gists{/gist_id}","starred_url":"https://api.github.com/users/cemolcay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cemolcay/subscriptions","organizations_url":"https://api.github.com/users/cemolcay/orgs","repos_url":"https://api.github.com/users/cemolcay/repos","events_url":"https://api.github.com/users/cemolcay/events{/privacy}","received_events_url":"https://api.github.com/users/cemolcay/received_events","type":"User","site_admin":false},"created_at":"2018-06-21T16:44:26Z","updated_at":"2018-06-21T16:44:26Z","author_association":"OWNER","body":"Hi @DJBen ,\r\nI've been made a \"major\" progress towards your proposal as well as enharmonics.\r\n\r\nSo, I implemented an Accidental class with natural, flats and sharps.\r\nhttps://github.com/cemolcay/MusicTheory/blob/enharmonics/Source/Enharmonics.swift\r\n\r\nI ditched the `NoteType` and implemented a `Key` struct instead, with `KeyType` and `Accident` variables. Also, renamed the `Note` to `Pitch`.\r\nhttps://github.com/cemolcay/MusicTheory/blob/enharmonics/Source/Pitch.swift\r\n\r\nDocumentation is a mess right now, and I basically disabled the `Scale` and `Chord` structs and Tests, in order to work without handling their tons of errors. I'm going to update them accordingly, don't worry. Here's the accident and pitch tests:\r\nhttps://github.com/cemolcay/MusicTheory/blob/e4d10ddf409cd2f4787f66661b44906dabee6a37/MusicTheoryTests/MusicTheoryTests.swift#L250\r\n\r\nIf you check it out and let me know if it makes sense, I'd be very happy. I probably release a new version with the changes in a couple of days."}}
{"actor":{"display_login":"cemolcay"}}