sonic-pi-net / sonic-pi

Code. Music. Live.
https://sonic-pi.net
Other
10.78k stars 922 forks source link

Missing half-diminished chord #1609

Closed domgomcom closed 2 years ago

domgomcom commented 7 years ago

In some points, your notation is incomplete or confusing because in music writing the sign minus (-) is mainly used to denote "minor", not "flat". The chord name "half-diminished" is not supported, despite is one of the most frecuently used. You use "m7-5". Including "-" and "m" is, in certain way, redundand because both means "minor".

You should use "m7b5" or "half-diminished"

Also the "min" and "maj" (minor and major) should be included.

xavriley commented 7 years ago

Thanks for bringing this up. I'm not sure that there's a 100% consensus on chord notation (I have several real books that all use slightly different conventions) but you're right to point out that we haven't covered all the common bases yet.

If you wanted to do a pull request with your suggestions the relevant part of the code is here: https://github.com/samaaron/sonic-pi/blob/master/app/server/sonicpi/lib/sonicpi/chord.rb#L15 You can do this directly from GitHub using the edit (pencil icon) at the top of the page. I'd highly recommend getting stuck in to contributions if you're interested and I'd be happy to assist, but if you're not keen then let me know and I'll try to make the updates myself.

I'm definitely in favour of adding b to denote flat where appropriate m7b5 (and m7b9 etc.) and also to add half-dim and half-diminished as aliases for dim7. The important thing is that we leave the previous notations in there so that we don't break any previous compositions that may have used them.

domgomcom commented 7 years ago

Hi Xavriley

Effectively, there is no consensus in musical notation. Basically there are two trends: New York's Juliard and Boston's Berklee. That is why I think it is an excellent idea to use aliases, so that each one can use the notations with which he is more familiar (for that reason I also proposed adding maj and min, as synonyms for "major" and "minor".

But the fact that there are several denominations for the same chord does not mean that the essence of these chords must be confused. A "diminished" chord is one whose interval of notes is a minor third (3 semitones). There are two types: triad (dim) and quadric (dim7), which are perfectly noted in the code as dim = [0, 3, 6] and dim7 = [0, 3, 6, 9]. If you count the intervals you will see that the first one contains 2 intervals of third minor and the second one, 3 intervals of third minor.

In your comment "... also to add half-dim and half-diminished aliases for dim7" ... this is not correct, since the "half-diminished" chord is called precisely because the upper part is not a minor third , but a third MAJOR, ie 4 semitones. The correct notation is the one in the "m7-5" chord

     "m7-5" => [0, 3, 6, 10]

That is, "half-diminished" and "half-dim" should be added as an alias of "m7-5" or "m7b5". Or visceversa, since I think the first denominations are more common. NEVER as aliase of dim7.

For the changes in the code, at the moment I prefer that you do them, since I am not very familiar with the Ruby language (.rb) and could commit some typos and I do not want to spoil this magnificent program.

samaaron commented 7 years ago

@domgomcom - I wouldn't worry about spoiling the program with typos. What's more important at this stage is that we get a nice set of chord names that are familiar to musicians. If you're not happy adding the code yourself (I'd definitely give that a second thought as it would rightly add you to the contributor list) then if you could post a suggestion of your proposed changes here, and I'll let you know the right code to add ;-)

samaaron commented 7 years ago

BTW, thank-you for your time and suggestions - it's highly valued.

xavriley commented 7 years ago

Thanks for the clarification - I was rushing my response earlier and you are quite right to point out that dim7 is not the same as m7b5.

If you happen to have time, I'd echo Sam's encouragement to join the contributors list by making your own edit if at all possible. We will proof read the resulting Ruby code so there's no need to worry about breaking anything.

At this point it would be nice to have a fresh pair of eyes on that list as (I think) I'm the only core team member with a "traditional" musical training. That means there will be a few instances where the code reflects my perspective or input more strongly than it should!

ghost commented 7 years ago

check my comments on #1615

samaaron commented 6 years ago

@domgomcom, @xavriley - did either of you want to create a pull request for this? :-)

nihonjinrxs commented 4 years ago

@samaaron FYI -- this looks like it was eventually handled, and can probably be closed. I'll leave it to you to verify that, but see here, here, and here.

(Thank CodeTriage for bumping this one to my inbox. 😄)

domgomcom commented 4 years ago

Of course each harmony (chord) can be represented with different notations ... For example: halfdim, m7b5 and m7-5 are different notations for the same chord: half diminished. This code is correct: https: // github.com/samaaron/sonic-pi/blob/master/app/server/ruby/lib/sonicpi/chord.rb#L97-L99 This code is also correct: https://github.com/samaaron/sonic-pi/blob/master/app/server/ruby/lib/sonicpi/chord.rb#L41 This code is also correct: https://github.com/samaaron/sonic-pi/blob/master/app/server/ruby/lib/sonicpi/chord.rb#L28

El mar., 24 mar. 2020 a las 20:43, Ryan B. Harvey (notifications@github.com) escribió:

@samaaron https://github.com/samaaron FYI -- this looks like it was eventually handled, and can probably be closed. I'll leave it to you to verify that, but see here https://github.com/samaaron/sonic-pi/blob/master/app/server/ruby/lib/sonicpi/chord.rb#L28, here https://github.com/samaaron/sonic-pi/blob/master/app/server/ruby/lib/sonicpi/chord.rb#L41, and here https://github.com/samaaron/sonic-pi/blob/master/app/server/ruby/lib/sonicpi/chord.rb#L97-L99 .

(Thank CodeTriage for bumping this one to my inbox. 😄)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/samaaron/sonic-pi/issues/1609#issuecomment-603467164, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG427RX3C2G6U2XEGEQOXJLRJEEOPANCNFSM4DMYKLGA .

-- Domingo Gómez DomGom.Com 605196825 952153110

samaaron commented 2 years ago

Closing for now as it hopefully has been resolved with recent releases. Please feel free to reopen if there is still an issue.