The major scale. Example: >>> print Major('A') Ascending: A B C# D E F# G# A Descending: A G# F# E D C# B A
| 342 | |
| 343 | |
| 344 | class Major(_Scale): |
| 345 | |
| 346 | """The major scale. |
| 347 | |
| 348 | Example: |
| 349 | >>> print Major('A') |
| 350 | Ascending: A B C# D E F# G# A |
| 351 | Descending: A G# F# E D C# B A |
| 352 | """ |
| 353 | |
| 354 | type = "major" |
| 355 | |
| 356 | def __init__(self, note, octaves=1): |
| 357 | """Create the major scale starting on the chosen note.""" |
| 358 | super(Major, self).__init__(note, octaves) |
| 359 | self.name = "{0} major".format(self.tonic) |
| 360 | |
| 361 | def ascending(self): |
| 362 | notes = get_notes(self.tonic) |
| 363 | return notes * self.octaves + [notes[0]] |
| 364 | |
| 365 | |
| 366 | class HarmonicMajor(_Scale): |