Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Tkinter GUI Application Development Blueprints, Second Edition

You're reading from   Tkinter GUI Application Development Blueprints, Second Edition Build nine projects by working with widgets, geometry management, event handling, and more

Arrow left icon
Product type Paperback
Published in Mar 2018
Publisher Packt
ISBN-13 9781788837460
Length 422 pages
Edition 2nd Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Bhaskar Chaudhary Bhaskar Chaudhary
Author Profile Icon Bhaskar Chaudhary
Bhaskar Chaudhary
Arrow right icon
View More author details
Toc

Table of Contents (12) Chapters Close

Preface 1. Meet Tkinter FREE CHAPTER 2. Making a Text Editor 3. Programmable Drum Machine 4. Game of Chess 5. Building an Audio Player 6. Paint Application 7. Piano Tutor 8. Fun with Canvas 9. Multiple Fun Projects 10. Miscellaneous Tips 11. Other Books You May Enjoy

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 minor" and its associated value is [ 0, 2, 3, 5, 7, 9, 11...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image