6 kyu
Musical Scales and Modes
56aariza
Loading description...
Algorithms
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
Nice one, although I don't think it's that elementary and inituitive so that it deserves a higher rank perhaps.
I think some basic knowledge about musical notes is expected in this kata. Without this, you probably need to do some additional research.
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.
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.
Should be fixed now. Kata only works with diatonic heptatonic scales. I've included more than just the 8 major modes in random tests.
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.
fixed
There are no random tests. Every possible input is tested in a fixed sequence.
Solved, scales of different sizes added to add more variation. If no more issues are found, I'll approve soon.
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?
scales of different sizes added to allow for variation.
In Python the function should be
get_scale
(snake case).done!!
.
Can you please update when to use # and when to use b. I cannot understand when to use either of them
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.
was added to description
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.
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 :-)
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.
Maybe it's not enough clear/visible yet... ;)
I feel it's a bit vague if you don't know about the circle of fifths and key signatures...
You're right, I was thinking in to use intervallic terms (1 2 3 4 5 6 7) instead notes to explain the problem but this changes the solution and maybe it's still not clear. Maybe with a picture could be more clear, I'll try it.
(mode, key) better than (formula, root), thanks tim_othy ;-)
Done!
Found this link which might be worthwhile to add to the discussion to help people "visualize" what to do: http://randscullard.com/CircleOfFifths/
Yes it's very good material, I include it right now. Thanks tim_othy.
Hi,
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)cheers
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
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.
nice work. :)