Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
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
 Chaudhary Chaudhary
Author Profile Icon Chaudhary
Chaudhary
Arrow right icon
View More author details
Toc

Table of Contents (17) Chapters Close

Title Page
Copyright and Credits
Packt Upsell
Contributors
Preface
1. Meet Tkinter 2. Making a Text Editor FREE CHAPTER 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 1. Other Books You May Enjoy Index

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 ]. This means that, to play a melodic minor scale in the key of B, you will take B as the first item—that is represented by 0 in the values list. The next key is two semitones above B, the...

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 £13.99/month. Cancel anytime
Visually different images