MUSIC THEORY

INTRO
0

PYTHON, KEYBOARD

MEDIUM

last hacked on Dec 25, 2017

## Music Theory: Western Scale, Chromatic Let's talk music theory In the **chromatic** scale system, there are 12 notes that make up every scale. It's very important to understand that the world of music is much much more than just the western scale, but since it's so common we'll start with it. >notes = ["C", "C#/Db", "D", "D#/Eb", "E", "F", "F#/Gb", "G", "G#/Ab", "A", "A#/Bb", "B"] The ♭ symbol is referred to as **♭** **flat** which lowers a note by a semitone and **♯** **sharp**, which raises a note a semitone. Pure notes (A, B, C etc), are also called **natural** and are signified with **♮** Every note available is separated from every other note by a unit called the **semitone**. We'll talk about what that physically means in a moment. You may have noticed that C♭ and F♭ aren't listed. Where are they? The spacing of the notes and the question of the existence of C♭ and F♭ becomes clear when you look at the spacing of the white and black keys of a keyboard. ![Hi I'm text!](https://i.ytimg.com/vi/wWoNyUBfBOg/maxresdefault.jpg) Here we can see from the pattern of black and white notes that what would be C♭ is actually just B, and F♭ is E. We don't designate them as any different. All **black keys** are either flats (♭) or sharps (♯). In my code, I've used b and # instead simply for convenience. By convention, we have a set of rules to follow for constructing different scales. All notes in a scale have a certain harmonic quality as they are set specific ratios of each other. It is common to use the 12 [**equal temperaments**](https://en.wikipedia.org/wiki/Equal_temperament) to construct a scale. In this system, the notes are related in frequency by factors of the twelfth root of 2. Why twelve, and why a radical? It turns out that these values are extremely close to actual concordant ratios and our ears can't hear the difference. Check out this minutephysics [video](https://www.youtube.com/watch?v=1Hqm0dYKUx4) about it. Equal temperaments aren't the only system, but they don't sound half bad. (Except for Tritones, more on that later) [Here's some python code to generate any chromatic scale you wish.](https://github.com/Gilgahex/musicTheory/blob/master/getScale.py)

COMMENTS


Conor -- this is dope. Thanks for throwing it together!





keep exploring!

back to all projects