ScaleDiagram.js

This module is used to create scale diagram using SVG
demo: MajorScale.html

ScaleDiagram.js
Example
4 required parameters:
    dots = [ [dotsOnSix],[dotsOnFive],[dotsOnFour],[dotsOnThree],[dotsOnTwo],[dotsOnOne] ]; array of arrays of fret locations on the strings from 6-1
    root = [ [string,fret], [string,fret]...]; string/fret locations of root of the scale
    nomberOFFrets = number of frets to draw in the diagram
    id = the id of the span tag to place the diagram

optional parameter
    offsetFret = [theFret, theNumber]  optional fret number marker (on the side of the diagram)

ScaleDiagram

This function creates a SVG scale diagram

new ScaleDiagram(dots: object, root: object, numberOfFrets: number, id: string, offsetFret: object)
Parameters
dots (object) an array of arrays of fret loactions on string from 6 to 1
root (object) = a two element array - [ [stringNum, fretLoc] , [stringNum, fretLoc] ...]
numberOfFrets (number)
id (string) the id of the span tag to place the diagram
offsetFret (object) OPTIONAL [theFret, theNumber] fret number marker (on the side of the diagram)
Example
// assumes the html page has a span with the id of 'scale0-1'
// CAGED forms - C form
ScaleDiagram([[1,2,4],[1,3,4],[1,3,4],[1,3],[1,2,4],[1,2,4]],[[5,4],[2,2]],6,"scale0-1");