O'Reilly logo

Tkinter GUI Application Development Blueprints - Second Edition by Bhaskar Chaudhary

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Building the scales tutor

All the rules for defining which notes to play for a given scale are added in a JSON file named scales.json within a folder named json. Let's take a look at the first few lines in the scales.json file:

{ "Major": [ 0, 2, 4, 5, 7, 9, 11 ], "Minor": [ 0, 2, 3, 5, 7, 8, 10 ], "Harmonic minor": [ 0, 2, 3, 5, 7, 8, 11 ], "Melodic minor": [ 0, 2, 3, 5, 7, 9, 11 ], "Major blues": [ 0, 2, 3, 4, 7, 9 ], "Minor blues": [ 0, 3, 5, 6, 7, 10 ],...}

Recall that a scale is a set of notes played sequentially. The first note of the scale is called its root or key. So if you play a scale starting at say the note B, you are playing the scale in the key of B.

Let's take the fourth item in the key-value pairs. The key is named "Melodic ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required