// Copyright 2009 FretMagic.com window.onload=loadMe; function loadMe() { writeGuitar(); writeSection("intervals"); writeSection("modes"); writeSection("scales"); writeSection("chords"); styleModesTable(); } var flat = "♭" var sharp = "♯" var toggle = false; var cellWidth = "20px"; var guitarTitle = "Guitar Fretboard"; var guitarSubtitle = "(all intervals shown)"; var guitarUndertitle = " "; var tuning = [0, 7, 3, 10, 5, 0]; var scale = ["R","m2","M2","m3","M3","P4","d5","P5","m6","M6","m7","M7"]; var slang = ["1","b2","2","b3","3","4","b5","5","b6","6","b7","7"]; // set vars for each of thee scale degrees, such that R = 0, m2 = 1, etc. // create notes object (pseudo associative array) var notes = {}; for (var i = 0; i < scale.length; i++) { eval(scale[i] + "=" + i); notes[scale[i]] = i; } notes["M9"] = M2; notes["m9"] = m2; notes["M11"] = P4; notes["P11"] = P4; notes["M13"] = M6; notes["m11"] = d5; notes["m13"] = m6; notes["1"] = R; notes["2"] = M2; notes["3"] = M3; notes["4"] = P4; notes["5"] = P5; notes["6"] = M6; notes["7"] = M7; notes["9"] = M2; notes["11"] = P4; notes["13"] = M6; notes["b2"] = m2; notes["b3"] = m3; notes["b4"] = M3; notes["b5"] = d5; notes["b6"] = m6; notes["b7"] = m7; notes["bb7"] = M6; notes["b9"] = m2; notes["b11"] = M3; notes["b13"] = m6; notes["#1"] = m2; notes["#2"] = m3; notes["#3"] = P4; notes["#4"] = d5; notes["#5"] = m6; notes["#6"] = m7; notes["#9"] = m3; notes["#11"] = d5; notes["#13"] = m7; // http://en.wikipedia.org/wiki/File:RBG_color_wheel.svg // colors = ["red","rose","magenta","violet","blue","azure","cyan","aquamarine","green","chartreuse","yellow","orange"]; // weird problem, for which I had to change magenta to #ff00ff to #ff00fe var colors = ["red","#ff007f","#ff00fe","#7f00ff","blue","#007fff","cyan","springgreen","lime","chartreuse","#ffff00","#ff7f00"]; // http://www.people.vcu.edu/~bhammel/theory/resources/macgamut_theory/songs_interval_recognize.html var intervals = new Array(); intervals["m2"] = ["1","b2","Minor 2nd","Jaws; (Inverted) Joy To The World"]; intervals["M2"] = ["1","2","Major 2nd","Rudolph The Red Nosed Reindeer; (Inverted) Mary Had A Little Lamb"]; intervals["m3"] = ["1","b3","Minor 3rd","Impossible Dream; (Inverted) Frosty The Snowman, Hey Jude"]; intervals["M3"] = ["1","3","Major 3rd","Oh When The Saints; (Inverted) Beethoven's 5th, Swing Low Sweet Chariot"]; intervals["P4"] = ["1","4","Perfect 4th","Here Comes the Bride; (Inverted) Oh Come All Ye Faithful"]; intervals["d5"] = ["1","b5","Diminshed 5th"," "]; intervals["P5"] = ["1","5","Perfect 5th","Twinkle Twinkle Little Star; (Inverted) Feelings"]; intervals["m6"] = ["1","b6","Minor 6th","I Am The Entertainer..."]; intervals["M6"] = ["1","6","Major 6th","My Bonnie Lies Over The Ocean..."]; intervals["m7"] = ["1","b7","Minor 7th"," "]; intervals["M7"] = ["1","7","Major 7th"," "]; // http://www.lucytune.com/new_to_lt/pitch_05.html var modes = new Array(); modes["Ionian"] = ["1","2","3","4","5","6","7","Major scale (Do, Re, Me...)"]; modes["Dorian"] = ["1","2","b3","4","5","6","b7","2nd mode of Major scale"]; modes["Phrygian"] = ["1","b2","b3","4","5","b6","b7","3rd mode of Major scale"]; modes["Lydian"] = ["1","2","3","#4","5","6","7","4th mode of Major scale"]; modes["Mixolydian"] = ["1","2","3","4","5","6","b7","5th mode of Major scale"]; modes["Aeolian"] = ["1","2","b3","4","5","b6","b7","6th mode of Major scale"]; modes["Locrian"] = ["1","b2","b3","4","b5","b6","b7","7th mode of Major scale"]; // The Ultimate Guitar Scale Bible, by Mark Dziuba var scales = new Array(); scales["HarmonicSystem"] = "Harmonic System"; scales["Aeolian"] = ["1","2","b3","4","5","b6","b7","Natural or Relative Minor; 6th mode of Major scale"]; scales["Aeolian Major"] = ["1","2","3","4","5","b6","b7"]; scales["Altered Dominant"] = ["1","b2","b3","b4","b5","b6","b7"]; scales["Altered Dominant bb7"] = ["1","b2","b3","b4","b5","b6","bb7"]; scales["Harmonic Major"] = ["1","2","3","4","5","b6","7"]; scales["Harmonic Minor"] = ["1","2","b3","4","5","b6","7"]; scales["Dorian"] = ["1","2","b3","4","5","6","b7"]; scales["Dorian #4"] = ["1","2","b3","#4","5","6","b7"]; scales["Dorian b5"] = ["1","2","b3","4","b5","6","b7"]; scales["Ionian Augmented"] = ["1","2","3","4","#5","6","7"]; scales["Jazz Minor/Melodic Minor"] = ["1","2","b3","4","5","6","7"]; scales["Locrian"] = ["1","b2","b3","4","b5","b6","b7"]; scales["Locrian bb7"] = ["1","b2","b3","4","b5","b6","bb7"]; scales["Locrian nat2"] = ["1","2","b3","4","b5","b6","b7"]; scales["Locrian nat6"] = ["1","b2","b3","4","b5","6","b7"]; scales["Lydian"] = ["1","2","3","#4","5","6","7"]; scales["Lydian b3"] = ["1","2","b3","#4","5","6","7"]; scales["Lydian b7"] = ["1","2","3","#4","5","6","b7"]; scales["Lydian Augmented"] = ["1","2","3","#4","#5","6","7"]; scales["Lydian Augmented #2"] = ["1","#2","3","#4","#5","6","7"]; scales["Lydian #9"] = ["1","#2","3","#4","5","6","7"]; scales["Major (Ionian)"] = ["1","2","3","4","5","6","7"]; scales["Mixolydian"] = ["1","2","3","4","5","6","b7"]; scales["Mixolydian b9"] = ["1","b2","3","4","5","6","b7"]; scales["Phrygian"] = ["1","b2","b3","4","5","b6","b7"]; scales["Phrygian b4"] = ["1","b2","b3","b4","5","b6","b7"]; scales["Phrygian Major"] = ["1","b2","3","4","5","b6","b7"]; scales["Phrygian nat6"] = ["1","b2","b3","4","5","6","b7"]; scales["Symmetric"] = "Symmetric"; scales["Augmented"] = ["1","#2","3","5","#5","7"]; scales["Auxillary Diminished, Whole/Half"] = ["1","2","3","4","b5","b6","6","7"]; scales["Chromatic"] = ["1","b2","2","b3","3","4","#4","5","b6","6","b7","7"]; scales["Chromatic Augmented"] = ["1","b2","2","3","4","#4","#5","6","b7"]; scales["Diminished Blues"] = ["1","b2","b3","3","#5","6","b7"]; scales["Four Semitone Tritone"] = ["1","b2","2","b3","3","#4","5","b6","6","b7"]; scales["Minor 3rd/Minor 2nd"] = ["1","#2","3","5","#5","7"]; scales["Symmetrical Diminished, Half/Whole"] = ["1","b2","b3","b4","b5","5","6","b7"]; scales["Tetratonic"] = ["1","4","b5","7"]; scales["Three-Semitone Tritone"] = ["1","b2","2","b3","b5","5","b6","6"]; scales["Tritone"] = ["1","b2","3","#4","5","b7"]; scales["Two-Semitone Tritone"] = ["1","b2","2","#4","5","b6"]; scales["Whole Tone"] = ["1","2","3","#4","#5","#6"]; scales["Whole Tone Chromatic"] = ["1","2","3","4","b5","b6","b7","7"]; scales["Hybrid"] = "Hybrid"; scales["Aeolian #11"] = ["1","2","b3","#4","5","b6","b7"]; scales["Augmented b9"] = ["1","b2","b3","3","4","5","b6","6","7"]; scales["Augmented 9"] = ["1","2","b3","3","#4","5","b6","b7","7"]; scales["Augmented Dominant"] = ["1","2","3","4","#5","6","b7"]; scales["Augmented Dominant b9"] = ["1","b2","3","4","#5","6","b7"]; scales["Augmented Dominant #9"] = ["1","#2","3","4","#5","6","b7"]; scales["Augmented Minor/Major 7"] = ["1","2","b3","4","#5","6","7"]; scales["Bebop Dominant"] = ["1","2","3","4","5","6","b7","7"]; scales["Bebop Dorian"] = ["1","2","b3","3","4","5","6","b7"]; scales["Bebop Major"] = ["1","2","3","4","#4","5","6","7"]; scales["Bebop Melodic Minor"] = ["1","2","b3","4","#4","5","6","7"]; scales["Diminished Tritonic"] = ["1","b3","4","b5"]; scales["Dominant b5"] = ["1","2","3","4","b5","6","b7"]; scales["Dominant b5 b9 #9"] = ["1","b2","b3","b4","b5","6","b7"]; scales["Dominant b9 #9"] = ["1","b2","b3","b4","5","6","b7"]; scales["Dominant b9 #9 b13"] = ["1","b2","b3","b4","5","b6","b7"]; scales["Dominant b9 #11"] = ["1","b2","3","#4","5","6","b7"]; scales["Dominant b9 #11 b13"] = ["1","b2","3","#4","5","b6","b7"]; scales["Dominant 13"] = ["1","2","3","5","6","b7"]; scales["Dorian Pentatonic"] = ["1","2","b3","5","b7"]; scales["Harmonic Minor b5"] = ["1","2","b3","4","b5","b6","7"]; scales["Harmonic Sus4"] = ["1","2","4","5","b6","7"]; scales["Ionian b5"] = ["1","2","3","4","b5","6","7"]; scales["Leading Tone Blues"] = ["1","#4","6","b7","7"]; scales["Lydian Augmented b3"] = ["1","2","b3","#4","#5","6","7"]; scales["Lydian Diminished"] = ["1","2","b3","#4","5","6","7"]; scales["Lydian Harmonic Major #9"] = ["1","#2","3","#4","5","b6","7"]; scales["Lydian Harmonic Major"] = ["1","2","3","#4","5","b6","7"]; scales["Lydiphrygian nat6"] = ["1","b2","b3","#4","5","6","b7"]; scales["Major 6 Diminished"] = ["1","2","3","4","5","b6","6","7"]; scales["Major Pentatonic Blues"] = ["1","2","b3","3","5","6"]; scales["Minor 6 Diminished"] = ["1","2","b3","4","5","b6","6","7"]; scales["Minor Pentatonic Blues"] = ["1","b3","4","#4","5","b7"]; scales["Phrygilydian"] = ["1","b2","b3","#4","5","b6","b7"]; scales["Tritonic"] = ["1","4","5"]; scales["Tritonic 1st Inversion"] = ["1","2","5"]; scales["Tritonic 2nd Inversion"] = ["1","4","b7"]; scales["Pentatonic"] = "Pentatonic"; scales["Dominant b13 Pentatonic"] = ["1","3","5","b6","b7"]; scales["Dominant sus4 b13 Pentatonic"] = ["1","2","4","b6","b7"]; scales["Dominant 9 Pentatonic"] = ["1","2","3","5","b7"]; scales["Dominant 13 Sus4 Pentatonic"] = ["1","2","4","6","b7"]; scales["Lydian 6/9 Pentatonic"] = ["1","2","#4","5","6"]; scales["Lydian Augmented Pentatonic"] = ["1","2","#4","#5","6"]; scales["Lydian Dominant 13 Pentatonic"] = ["1","3","#4","6","b7"]; scales["Lydian Dominant 9 Pentatonic"] = ["1","2","#4","6","b7"]; scales["Lydian Pentatonic"] = ["1","3","#4","5","7"]; scales["Lydian Sus2 Pentatonic"] = ["1","2","#4","6","7"]; scales["Major b2 b6 Pentatonic"] = ["1","b2","3","4","b6"]; scales["Major b2 Pentatonic"] = ["1","b2","3","5","6"]; scales["Major b6 Pentatonic"] = ["1","2","3","5","b6"]; scales["Major 7 Augmented Pentatonic"] = ["1","2","3","#5","7"]; scales["Major 13 Pentatonic"] = ["1","3","5","6","7"]; scales["Major 13 Sus4 Pentatonic"] = ["1","2","4","6","7"]; scales["Major Pentatonic"] = ["1","2","3","5","6"]; scales["Minor/Major 11 Pentatonic"] = ["1","b3","4","5","7"]; scales["Minor b6/11 Pentatonic"] = ["1","b3","4","5","b6"]; scales["Minor 6 b9 Pentatonic"] = ["1","b2","b3","4","6"]; scales["Minor 7 b5 Pentatonic"] = ["1","b3","4","b5","b7"]; scales["Minor 7 13 Pentatonic"] = ["1","b3","5","b6","b7"]; scales["Minor Pentatonic"] = ["1","b3","4","5","b7"]; scales["Min/Maj #11 Pentatonic"] = ["1","b3","#4","5","7"]; scales["Phrygian Pentatonic"] = ["1","b2","4","6","b7"]; scales["Sus4 b13 Pentatonic"] = ["1","2","4","5","b6"]; scales["Sus4 Pentatonic"] = ["1","2","4","5","6"]; scales["Sus4 b9 b5 Pentatonic"] = ["1","b2","4","b5","6"]; scales["Exotic"] = "Exotic"; scales["Ake Bono"] = ["1","2","b3","5","b6"]; scales["Banshiki-Cho"] = ["1","b3","4","#5","b7"]; scales["Bhairon"] = ["1","b2","3","4","5","b6","7"]; scales["Buzurg"] = ["1","b2","3","4","#4","5","6","7"]; scales["Darbari"] = ["1","2","b3","4","5","b6","b7","7"]; scales["Egyptian"] = ["1","2","b3","#4","5","b6","7"]; scales["Goonkali"] = ["1","b2","4","5","b6"]; scales["Hungarian Major"] = ["1","2","b3","4","b5","b6","bb7"]; scales["Iraq"] = ["1","b2","b3","4","b5","b6","b7","7"]; scales["Iwato"] = ["1","b2","4","b5","b7"]; scales["Kokin-Choshi"] = ["1","b2","4","5","b7"]; scales["Kumoi"] = ["1","2","b3","5","6"]; scales["Marwa"] = ["1","b2","3","#4","6","7"]; scales["Noh"] = ["1","2","4","5","#5","6","7"]; scales["Pelog"] = ["1","b2","b3","5","b6"]; scales["Purvi"] = ["1","b2","3","#4","5","b6","7"]; scales["Sho"] = ["1","2","b3","4","5","6"]; scales["Sho (#2)"] = ["1","b2","b3","b4","b5","b7"]; scales["Todi"] = ["1","b2","b3","#4","5","b6","7"]; scales["Yo"] = ["1","2","b3","4","5","b7"]; scales["Zirafkand"] = ["1","b2","b3","4","b5","b6","7"]; scales["Zokuso"] = ["1","b2","4","b5","b6"]; // http://www.smithfowler.org/music/Chord_Formulas.htm // http://johncomino.tripod.com/const.htm // The Ultimate Guitar Chord Bible, by Buck Brown // comments from http://www.harmony-central.com/Guitar/chord-and-theory-chart.txt var chords = new Array(); chords["MajorChords"] = "Major"; chords["Major"] = ["1","3","5"]; chords["6th"] = ["1","3","5","6"]; chords["Maj7"] = ["1","3","5","7","Fuller sound, often used in jazz"]; chords["Maj9"] = ["1","3","5","7","9","Used in jazz"]; chords["Maj9b5"] = ["1","3","b5","7","9"]; chords["6/9"] = ["1","3","5","6","9","Used often in country and jazz"]; chords["add9"] = ["1","3","5","9"]; chords["Maj11"] = ["1","3","5","7","-9","11"]; chords["Maj13"] = ["1","3","5","7","-9","-11","13"]; chords["Maj13 add9"] = ["1","3","5","7","9","-11","13"]; chords["Maj13#11"] = ["1","3","-5","7","-9","#11","13","Used in soul"]; chords["Maj7b5"] = ["1","3","b5","7"]; chords["Maj7b5#9"] = ["1","3","b5","7","#9","ending chord, or a passing chord to Im7b5 - usually used as a IIm in a minor key"]; chords["Madd4"] = ["1","3","4","5"]; chords["Maj7b5"] = ["1","3","b5","7","Usually used as a IIm in a minor key"]; chords["Maj7#5"] = ["1","3","#5","7"]; chords["Maj7#11"] = ["1","3","5","7","#11","Dramatic ending chord"]; chords["Maj9#11"] = ["1","3","-5","7","9","#11"]; // not covered in Buck Brown chords["Mb5"] = ["1","3","b5"]; chords["MinorChords"] = "Minor"; chords["Minor"] = ["1","b3","5","Sad chord"]; chords["min6"] = ["1","b3","5","6","Used in funk"]; chords["min7"] = ["1","b3","5","b7","Used in funk"]; chords["minMaj7"] = ["1","b3","5","7","Dark, moody"]; chords["min#5"] = ["1","b3","#5","Often used as a IIIm chord"]; chords["min7#5"] = ["1","b3","#5","b7","Used in fusion"]; chords["minadd9"] = ["1","b3","5","9"]; chords["min6/9"] = ["1","b3","5","6","9"]; chords["minadd9/11"] = ["1","b3","5","9","11"]; chords["min9"] = ["1","b3","5","b7","9"]; chords["min9Maj7"] = ["1","b3","5","7","9"]; chords["min9add11"] = ["1","b3","5","b7","9","11"]; chords["min11"] = ["1","b3","5","b7","-9","11","Used in funk"]; chords["min13"] = ["1","b3","5","b7","-9","-11","13"]; chords["min13add9"] = ["1","b3","5","b7","9","-11","13"]; chords["min7b5"] = ["1","b3","b5","b7"]; chords["min9b5"] = ["1","b3","b5","b7","9"]; // not in Buck Brown chords["minadd4"] = ["1","b3","4","5"]; chords["min6Maj7"] = ["1","b3","5","6","7"]; chords["minMaj9"] = ["1","b3","5","7","9"]; chords["minMaj11"] = ["1","b3","5","7","-9","11"]; chords["minMaj13"] = ["1","b3","5","7","-9","-11","13"]; chords["DominantChords"] = "Dominant"; chords["7th"] = ["1","3","5","b7"]; chords["9th"] = ["1","5","b7","9","Used in funk"]; chords["9#11"] = ["1","5","b7","9","#11","Chromatic passing chord resolving down a half step, or as a substitute for a IV7 chord"]; chords["13#11"] = ["1","5","b7","-9","#11","13","Chromatic passing chord resolving down a half step, or as a substitute for a IV7 chord"]; chords["7sus2"] = ["1","2","5","b7","Used in folk"]; chords["7sus4"] = ["1","4","5","b7","V chord resolving to Im, or as I chord in Phrygian mode"]; chords["7sus4b9"] = ["1","4","5","b7","b9"]; chords["9sus4"] = ["1","4","5","b7","9"]; chords["9sus411"] = ["1","4","-5","b7","9","11","Most popular substitution for dominant 7 chords"]; //chords["11"] = ["1","4","5","b7","-9","11"]; chords["11th (7sus4)"] = ["1","-3","5","b7","-9","11"]; chords["13th"] = ["1","3","5","b7","-9","-11","13"]; chords["13add9"] = ["1","3","5","b7","9","-11","13"]; chords["13sus4"] = ["1","4","5","b7","-9","13"]; chords["13add9sus4"] = ["1","4","b7","9","13"]; chords["7b5"] = ["1","3","b5","b7"]; chords["7#5 (+7)"] = ["1","3","#5","b7"]; chords["7b9"] = ["1","3","5","b7","b9"]; chords["7#9"] = ["1","3","5","b7","#9"]; chords["7b9b5"] = ["1","3","b5","b7","b9"]; chords["7#5b9 (+7b9)"] = ["1","3","#5","b7","b9"]; chords["7#5#9"] = ["1","3","#5","b7","#9"]; chords["11b5"] = ["1","3","b5","b7","-9","11"]; chords["13b5"] = ["1","3","b5","b7","-9","-11","13"]; chords["13b9"] = ["1","3","5","b7","b9","-11","13","V7 chord"]; chords["13#9"] = ["1","3","5","b7","#9","-11","13"]; // not in Buck Brown chords["7b5#9"] = ["1","3","b5","b7","#9"]; chords["9b5"] = ["1","3","b5","b7","9"]; chords["9#5"] = ["1","3","#5","b7","9"]; chords["7b5b9"] = ["1","3","b5","b7","b9"]; chords["7#11"] = ["1","3","5","b7","#11"]; chords["AugDimChords"] = "Augmented & Diminished"; chords["aug"] = ["1","3","#5","Connecting chord"]; chords["aug7"] = ["1","3","#5","b7","V chord in a minor key"]; chords["aug9"] = ["1","3","#5","b7","9"]; chords["dim"] = ["1","b3","b5","Passing chord"]; chords["dim7"] = ["1","b3","b5","bb7"]; chords["dim9"] = ["1","b3","b5","bb7","9"]; chords["dim11"] = ["1","b5","bb7","11"]; chords["OtherChords"] = "Other"; chords["5th"] = ["1","5"]; chords["b5"] = ["1","b5"]; chords["sus2"] = ["1","2","5"]; chords["sus2"] = ["1","2","5"]; chords["sus4"] = ["1","4","5"]; chords["sus2sus4"] = ["1","2","4","5"]; chords["#11"] = ["1","5","#11"]; function isArray(input) {return input.constructor == Array;} function writeSection(type) { var array = eval(type); var table = "
"; var counter = 0; for (var i in array) { // if (i == "$family") break; // this prevents the addition of a bunch of enumerable js objects ($family $constructor pop push, etc.) if(!array.hasOwnProperty(i)) continue; // prevents the issue even in IE (previous line didn't) if (type != "intervals" && !isArray(array[i])) { if (counter > 0) { // table += ""; table += " | |
"; } table += "" + array[i] + ": | "; table += " |