6 kyu

Musical Scales and Modes

Description
Loading description...
Algorithms
View
AllIssues5QuestionsSuggestions2Show Resolved
  • Please sign in or sign up to leave a comment.
  • ahmet_popaj Avatar

    Nice one, although I don't think it's that elementary and inituitive so that it deserves a higher rank perhaps.

    • dfhwze Avatar

      I think some basic knowledge about musical notes is expected in this kata. Without this, you probably need to do some additional research.

    • ahmet_popaj Avatar

      Yes, that's sure enough, I might say it wasn't as easy figuring this one out as one may wind up at first glance.

  • dfhwze Avatar

    Actually, the last interval is no longer correct now that I've included other sizes and scales other than the major scale. But then again, that last interval just makes the roundtrip and is ignored from current solutions. Need to think for a proper fix though.

    • dfhwze Avatar

      Should be fixed now. Kata only works with diatonic heptatonic scales. I've included more than just the 8 major modes in random tests.

      Issue marked resolved by dfhwze 12 months ago
  • Voile Avatar

    Number of notes is variable now but all sample tests and fixed tests only tests for 7, only the random tests test for different notes.

  • Voile Avatar

    There are no random tests. Every possible input is tested in a fixed sequence.

    • dfhwze Avatar

      Solved, scales of different sizes added to add more variation. If no more issues are found, I'll approve soon.

      Issue marked resolved by dfhwze 12 months ago
  • dfhwze Avatar

    You could include sharps and flats in the root to make it more challenging. EDIT: author is inactive for half a year now. This kata is abandoned?

  • mauro-1 Avatar

    In Python the function should be get_scale (snake case).

  • crap_the_coder Avatar

    Can you please update when to use # and when to use b. I cannot understand when to use either of them

    • aariza Avatar

      Hi. At the end of the kata you have an example but it is not very clear... the key is not repeat or skip notes to get the required distances pattern. For example from D to E we can get a half tone in to ways 'D' -> 'Eb' or 'D' -> 'D#' the valid one for the kata is the first.

    • dfhwze Avatar

      was added to description

      Suggestion marked resolved by dfhwze 12 months ago
  • BlackChess7531 Avatar

    Nice idea.

    I waasn't sure exactly when to use which accidental, so I stuck with sharps. However, thisfailed me. Also, it would be helpful for you to explain the "notes notation sequence."

    Thanks a lot.

    • aariza Avatar

      Yes. I mean that we must not to repeat or skip notes, for example from D to E we can get a half tone in to ways 'D' -> 'Eb' or 'D' -> 'D#' the valid one for the kata is the first.

      Thanks for the feedback :-)

  • tim_othy Avatar

    Interesting kata.

    As Blind4Basics pointed out it would be beneficial to include in the discussion when sharp accidentals should be used and when flat ones should be used.

  • Blind4Basics Avatar

    Hi,

    • Sample tests are lacking. And they are important to see how you manage the next point:
    • getScale('W H W W H W W', 'C') whe should get as result ['C', 'D', 'Eb', 'F', 'G', 'Ab', 'Bb']... And why not ['C', 'D', 'D#', 'F', 'G', 'G#', 'A#']? (I have my idea about that, but that should be explained in the description)
    • need random tests!

    cheers

    • aariza Avatar

      Yes, it's my first kata and I have not seen the "Sample test" box. I have completed it and now the kata shows the sample tests.

      And you're right, an alternative solution is to apply the opposite accidental over the previous or following note, I have tried to explain this in the description in order to avoid this kind of solutions.

      Thanks a lot Blind4Basics

    • aariza Avatar

      Random tests added!

      Making the random test I have realized that some patterns are not valid because as result we get a zero distance interval and this it's impossible to adjust with accidentals, this is case when we have more than three consecutives whole tones. I have limited the random tests to valid patterns.

    • Blind4Basics Avatar

      nice work. :)

      Issue marked resolved by Blind4Basics 8 years ago