{"action":"created","issue":{"url":"https://api.github.com/repos/cuthbertLab/music21/issues/116","labels_url":"https://api.github.com/repos/cuthbertLab/music21/issues/116/labels{/name}","comments_url":"https://api.github.com/repos/cuthbertLab/music21/issues/116/comments","events_url":"https://api.github.com/repos/cuthbertLab/music21/issues/116/events","html_url":"https://github.com/cuthbertLab/music21/pull/116","id":115908016,"number":116,"title":"custom consonance function for simplifyMultipleEnharmonics","user":{"login":"fzalkow","id":5499717,"avatar_url":"https://avatars.githubusercontent.com/u/5499717?v=3","gravatar_id":"","url":"https://api.github.com/users/fzalkow","html_url":"https://github.com/fzalkow","followers_url":"https://api.github.com/users/fzalkow/followers","following_url":"https://api.github.com/users/fzalkow/following{/other_user}","gists_url":"https://api.github.com/users/fzalkow/gists{/gist_id}","starred_url":"https://api.github.com/users/fzalkow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fzalkow/subscriptions","organizations_url":"https://api.github.com/users/fzalkow/orgs","repos_url":"https://api.github.com/users/fzalkow/repos","events_url":"https://api.github.com/users/fzalkow/events{/privacy}","received_events_url":"https://api.github.com/users/fzalkow/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-11-09T16:06:17Z","updated_at":"2015-11-11T10:07:17Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/cuthbertLab/music21/pulls/116","html_url":"https://github.com/cuthbertLab/music21/pull/116","diff_url":"https://github.com/cuthbertLab/music21/pull/116.diff","patch_url":"https://github.com/cuthbertLab/music21/pull/116.patch"},"body":"I spot an undesirable behaviour in `simplifyMultipleEnharmonics`. Since it relied on `interval.isConsonant()`, e.g. it considered a perfect fourth and an augmented third equal -- both are non-consonant. So I wrote a simple custom consonance function.\r\n\r\nBefore:\r\n\r\n    In [1]: pitch.simplifyMultipleEnharmonics([3, 8, 0])\r\n    Out[1]: [<music21.pitch.Pitch E->, <music21.pitch.Pitch G#>, <music21.pitch.Pitch C>]\r\n\r\nNow:\r\n\r\n    In [1]: pitch.simplifyMultipleEnharmonics([3, 8, 0])\r\n    [<music21.pitch.Pitch E->, <music21.pitch.Pitch A->, <music21.pitch.Pitch C>]\r\n"},"comment":{"url":"https://api.github.com/repos/cuthbertLab/music21/issues/comments/155721609","html_url":"https://github.com/cuthbertLab/music21/pull/116#issuecomment-155721609","issue_url":"https://api.github.com/repos/cuthbertLab/music21/issues/116","id":155721609,"user":{"login":"fzalkow","id":5499717,"avatar_url":"https://avatars.githubusercontent.com/u/5499717?v=3","gravatar_id":"","url":"https://api.github.com/users/fzalkow","html_url":"https://github.com/fzalkow","followers_url":"https://api.github.com/users/fzalkow/followers","following_url":"https://api.github.com/users/fzalkow/following{/other_user}","gists_url":"https://api.github.com/users/fzalkow/gists{/gist_id}","starred_url":"https://api.github.com/users/fzalkow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fzalkow/subscriptions","organizations_url":"https://api.github.com/users/fzalkow/orgs","repos_url":"https://api.github.com/users/fzalkow/repos","events_url":"https://api.github.com/users/fzalkow/events{/privacy}","received_events_url":"https://api.github.com/users/fzalkow/received_events","type":"User","site_admin":false},"created_at":"2015-11-11T10:07:17Z","updated_at":"2015-11-11T10:07:17Z","body":"Ui, you are completly right. Didn't thought of something other than semitones. :-)\r\n\r\nThe counter is now restricted to max. 36 -- than stacking fifth wrap back to its origin because of music21's limiting of accidentals.\r\n\r\nBecause this function is called anytime when a chord is constructed from numers, I don't want to throw an Error... Now I just print a warning and return `nan`. Is that good practice?"}}