Ad
  • Custom User Avatar

    The description fails to explain anything besides two links. Does a white kata need to be so obtuse?

  • Default User Avatar

    @vivekpontoosh: in terms of Bb, there is no suspended 4th in this case. The 3rd of a Bb chord would be some kind of D, such as Db for Bb minor or D for Bb major. If there were a 4th for a Bb chord, then we would encounter an Eb in the chord. Simply put, Bb G D reesults in a 1st inversion G minor chord.

  • Default User Avatar

    A# is enharmonic (equivalent) to B-flat major.
    (A# isn't used much because of all of the accidentals and double-sharps)
    A# is an artifact from using the midi tables.

    And if you look at this in Bb terms, it comes out to:
    Bb G D, which is a raised 3rd (of 4th, or suspended)
    which isn't a major triad

    The major triad would be: Bb F D

  • Default User Avatar

    I found this diagram more useful than the MIDI article mentioned.
    https://djip.co/blog/logic-studio-9-midi-note-numbers
    It was more compact.

    I haven't checked all of the test cases, but it seems like there should be an augmented triad, and a diminished triad, to round out the possibilities. Also a suspended chord (R 4 5).
    Also things like R 2 5, etc. Haven't analyzed what's there.

    I think you should limit the kata to triads (including octaves of included notes), but not bigger chords. How would dominant 7 chord be classified, with major triad, but minor 7th, vs Major 7th.

    Also, it would be good to summarize this part of music theory, rather than just pointing to a wikipedia page. I had a really good guitar teacher in highschool that explained this to me, but most people won't have that background.

  • Default User Avatar

    Not all inversions of major chords are included in the sample space.

  • Default User Avatar

    This is all because the description lacks 2 things:

    • a direct working definition of chord. it's only in clicking the wiki link we see: In music theory, a major chord is a chord that has a root, major third, and perfect fifth.
    • stating that inversions are allowed.

    So, I can see why the idea of a Bb/A# chord comes to mind first, because that's its root.

    You're right about a third defining chord modality, but we cannot assume the presence of an F as a member of this chord. arpeggios are chords simply played one note at a time, so they can also be just as complete or incomplete as any chord may or may not be, and broken_chords are no different in this principle.

    Stack them in thirds you get G Bb D spelling Gm, and Bb is the minor third here (defined in the kata as A#) which just happens to be below the other two notes becasue the chord is inverted.

  • Custom User Avatar

    there are arpegios and broken chords, isint needed all the notes to play a chord

    the kata is asking to return if the chord is major or not, the only thing that you need to know if a chord is major is the 3rd (but the 6th in this case helps to know that it is in the major scale too)

    the only other chord that could be formed with this would be if it were using a harmonic scale of Gm that would give a A#6(5+), but it would still be major, so it should be true even in that case

  • Default User Avatar

    The actual chord would be spelled with a Bb, and to make a Bb6 chord, it would have to have all four of these notes: Bb D F G.

    The chord in question amounts to Bb D G, forming the 1st inversion of a G minor chord. So, not major, and so the test should return false.

    Relatable to previous issue: I did at least find two cases of 2nd inversion major chords that expect true in the fixed tests.

  • Custom User Avatar

    From the other tests, it seems that's not the case. I'd take a look at the issue below. The author is long gone, so I doubt we ever get a reply from him.

  • Custom User Avatar
    those are only  the notes that make a major chord that are the third and fifth.
    The notes [58, 67, 74] would be A#M6
    Should i return only a flat chord(A#M)?
  • Custom User Avatar

    From the Wikipedia link, A# major chord should be A# D and F (at least in root position). But I see some sample test with more than 3 notes that should return True.

  • Custom User Avatar
    "[58, 67, 74] equal false"
    58 is A#
    the notes of A# Major are: A#, B#(C), C##(D), D#, E#(F), F##(G), G##(A)
    the MIDI notes 58, 67, 74 are A#, G, D; all of them are in the scale
    why is it saying that should return false?
  • Default User Avatar

    Hi there:

    First off, I like the idea for the kata, it's pretty cool and I actually much prefer it to some of our existing kata on music theory, but I don't think it will be approved in its current state. Here are some things I noticed:

    • Random tests: Random tests are super important for pretty much any kata because it's the only thing stopping people from just hacking your kata for honor points.
      Example: https://www.codewars.com/kata/reviews/55fab6dc96625f04d7000172/groups/5c238ffdded502516b000e8a
      This is possible because your test suite is always the same inputs with the same outputs.
    • Description: As somewhat of a musician myself, I find the description a little... bare-bones.
      It's not necessarily clear whether you want different inversions or voicings to be supported, or which ones you want supported.
      The tests all have the root as the first note in the given tuple, even when there are notes below it later in the list, so it's not clear whether that's by design or by mistake.
      I think this would be better if the description was a bit more fleshed out in terms of specifying the desired inputs and outputs, or at least what will be tested.

    Cheers

  • Default User Avatar

    No need to include numpy by default

  • Custom User Avatar

    Nice kata, thanks! :) I've done a lot of such computations through the years and it is interesting to compare the expressivity of various languages (eg. C#, Java, Scala, Python, etc.). IMHO code in Python can the most expressive for these tasks as observed so far.

    Another nice kata would be to sort the pitch class sets on Z12 by taking the index of the binary number. It allows to select a canonical representant of each pitch class set. And guess what's the rank of the diatonic set among all such canonic sets of size 7 and what are its neighbors ;)

  • Loading more items...