cheap-glitch/fretboarder

add more tunings

sugizo opened this issue · 3 comments

Description

nice to have more tunings (on guitar and bass 5th & 6th strings)
ref
https://en.wikipedia.org/wiki/List_of_guitar_tunings

Implementation details

guitar regular tuning and some various open tuning (major third, minor third, etc) and bass 5th & 6th strings

Examples

tested work on my local, will send the code if you interest

tested work on my local, will send the code if you interest

Yes, feel free to open a PR for this! 👍

seems can't add tuning with tone A#, so will define it as Bb (not sure, is it bug or not), perhaps relate with this issue
please review it first (only add guitar and bass tuning)
thanks

/**
 * Instruments
 */
export const instruments = {
	'guitar':    { name: 'Guitar (6 strings)',  nbStrings:  6 },
	'guitar-7':  { name: 'Guitar (7 strings)',  nbStrings:  7 },
	'guitar-8':  { name: 'Guitar (8 strings)',  nbStrings:  8 },
	'guitar-9':  { name: 'Guitar (9 strings)',  nbStrings:  9 },
	'guitar-10': { name: 'Guitar (10 strings)', nbStrings: 10 },
	'guitar-11': { name: 'Guitar (11 strings)', nbStrings: 11 },
	'guitar-12': { name: 'Guitar (12 strings)', nbStrings: 12 },
	'bass-4':    { name: 'Bass (4 strings)',    nbStrings:  4 },
	'bass-5':    { name: 'Bass (5 strings)',    nbStrings:  5 },
	'bass-6':    { name: 'Bass (6 strings)',    nbStrings:  6 },
	'ukulele':   { name: 'Ukulele',             nbStrings:  4 },
	'banjo-4':   { name: 'Banjo (4 strings)',   nbStrings:  4 },
	'banjo-5':   { name: 'Banjo (5 strings)',   nbStrings:  5 },
	'mandolin':  { name: 'Mandolin',            nbStrings:  8 },
};

/**
 * Tunings
 */
export const tunings = {
	'guitar': {
		'standard':      ['E',  'A',  'D',  'G',  'B',  'E'  ],
		'lower-d#':      ['D#', 'G#', 'C#', 'F#', 'Bb', 'D#' ],
		'lower-d':       ['D',  'G',  'C',  'F',  'A',  'D'  ],
		'higher-f':      ['F',  'Bb', 'D#', 'G#', 'C',  'F'  ],
		'higher-f#':     ['F#', 'B',  'E',  'A',  'C#', 'F#' ],
		'drop-d':        ['D',  'A',  'D',  'G',  'B',  'E'  ],
		'drop-c':        ['C',  'G',  'C',  'F',  'A',  'D'  ],
		'ddrop-d':       ['D',  'A',  'D',  'G',  'B',  'D'  ],
		'ddrop-c':       ['C',  'G',  'C',  'F',  'A',  'C'  ],
		'min-thirds':    ['C',  'D#', 'F#', 'A',  'C',  'D#' ],
		'maj-thirds':    ['G#', 'C',  'E',  'G#', 'C',  'E'  ],
		'all-fourths':   ['E',  'A',  'D',  'G',  'C',  'F'  ],
		'aug-fourths':   ['B',  'F',  'B',  'F',  'B',  'F'  ],
		'all-fifths':    ['C',  'G',  'D',  'A',  'E',  'B'  ],
		'nst':           ['C',  'G',  'D',  'A',  'E',  'G'  ],
		'open-a':        ['E',  'A',  'E',  'A',  'C#', 'E'  ],
		'open-b':        ['B',  'F#', 'B',  'F#', 'B',  'D#' ],
		'open-c':        ['C',  'G',  'C',  'G',  'C',  'E'  ],
		'open-csus2':    ['C',  'G',  'C',  'D',  'G',  'C'  ],
		'open-d':        ['D',  'A',  'D',  'F#', 'A',  'D'  ],
		'open-dm911':    ['D',  'F',  'A',  'C',  'E',  'G'  ],
		'open-d6':       ['D',  'A',  'D',  'F#', 'A',  'B'  ],
		'open-d6sus2':   ['D',  'A',  'D',  'E',  'A',  'B'  ],
		'open-d7':       ['D',  'A',  'D',  'F#', 'A',  'C'  ],
		'open-d7sus2':   ['D',  'A',  'D',  'E',  'A',  'C'  ],
		'open-dm':       ['D',  'A',  'D',  'F',  'A',  'D'  ],
		'open-dm6':      ['D',  'A',  'D',  'F',  'A',  'B'  ],
		'open-dm7':      ['D',  'A',  'D',  'F',  'A',  'C'  ],
		'open-dsus4':    ['D',  'A',  'D',  'G',  'A',  'D'  ],
		'open-e':        ['E',  'B',  'E',  'G#', 'B',  'E'  ],
		'open-f':        ['F',  'A',  'C',  'F',  'C',  'F'  ],
		'open-g':        ['D',  'G',  'D',  'G',  'B',  'D'  ],
	},
	'guitar-7': {
		'standard':      ['B',  'E',  'A',  'D',  'G',  'B',  'E'  ],
		'lower-bb':      ['Bb', 'D#', 'G#', 'C#', 'F#', 'Bb', 'D#' ],
		'lower-a':       ['A',  'D',  'G',  'C',  'F',  'A',  'D'  ],
		'higher-c':      ['C',  'F',  'Bb', 'D#', 'G#', 'C',  'F'  ],
		'higher-c#':     ['C#', 'F#', 'B',  'E',  'A',  'C#', 'F#' ],
		'drop-a':        ['A',  'E',  'A',  'D',  'G',  'B',  'E'  ],
		'maj-thirds':    ['E',  'G#', 'C',  'E',  'G#', 'C',  'E'  ],
		'all-fourths':   ['B',  'E',  'A',  'D',  'G',  'C',  'F'  ],
		'choro':         ['C',  'E',  'A',  'D',  'G',  'B',  'E'  ],
		'treble':        ['E',  'A',  'D',  'G',  'B',  'E',  'A'  ],
		'russian':       ['D',  'G',  'B',  'D',  'G',  'B',  'D'  ],
		'russian-var':   ['C',  'G',  'B',  'D',  'G',  'B',  'D'  ],
		'big-guitar':    ['G',  'C',  'E',  'G',  'C',  'E',  'G'  ],
	},
	'guitar-8': {
		'standard':     ['F#', 'B',  'E',  'A',  'D',  'G',  'B',  'E'   ],
		'lower-f':      ['F',  'Bb', 'D#', 'G#', 'C#', 'F#', 'Bb', 'D#'  ],
		'lower-e':      ['E',  'A',  'D',  'G',  'C',  'F',  'A',  'D'   ],
		'maj-thirds':   ['E',  'G#', 'C',  'E',  'G#', 'C',  'E',  'G#'  ],
		'all-fourths':  ['F#', 'B',  'E',  'A',  'D',  'G',  'C',  'F'   ],
		'af-dropped':   ['E',  'B',  'E',  'A',  'D',  'G',  'C',  'F'   ],
		'drop-e':       ['E',  'B',  'E',  'A',  'D',  'G',  'B',  'E'   ],
		'e6':           ['E',  'C',  'A',  'G',  'E',  'C',  'A',  'F'   ],
		'e13':          ['E',  'C#', 'B',  'G#', 'F#', 'E',  'D',  'B'   ],
	},
	'guitar-9': {
		'standard':     ['C#', 'F#', 'B',  'E',  'A',  'D',  'G',  'B',  'E'  ],
		'lower-b':      ['B',  'E',  'A',  'D',  'G',  'C',  'F',  'A',  'D'  ],
	},
	'guitar-10': {
		'standard':     ['E',  'A',  'D',  'G',  'B',  'E',  'A',  'D',  'G',  'B'  ],
		'yepes-low':    ['F#', 'G#', 'Bb', 'C',  'E',  'A',  'D',  'G',  'B',  'E'  ],
		'yepes-high':   ['E',  'A',  'D',  'G',  'B',  'E',  'C',  'Bb', 'A',  'F#' ],
		'baroque':      ['E',  'B',  'G',  'D',  'A',  'E',  'B',  'G',  'D',  'A'  ],
		'english':      ['C',  'E',  'G',  'G',  'C',  'C',  'E',  'E',  'G',  'G'  ],
	},
	'guitar-11': {
		'standard':     ['Bb', 'C',  'D',  'D#', 'F',  'G',  'C',  'F',  'Bb', 'D',  'G'  ],
	},
	'guitar-12': {
		'standard':     ['E',  'E',  'A',  'A',  'D',  'D',  'G',  'G',  'B',  'B',  'E',  'E'  ],
	},
	'bass-4': {
		'standard':     ['E',  'A',  'D',  'G'  ],
		'drop-d':       ['D',  'A',  'D',  'G'  ],
		'lower-d#':     ['D#', 'G#', 'C#', 'F#' ],
		'lower-d':      ['D',  'G',  'C',  'F'  ],
		'wstep-drop-c': ['C',  'G',  'C',  'F'  ],
		'all-fifths':   ['C',  'G',  'D',  'A'  ],
	},
	'bass-5': {
		'standard':     ['E',  'A',  'D',  'G',  'C' ],
		'std-low':      ['B',  'E',  'A',  'D',  'G' ],
	},
	'bass-6': {
		'standard':     ['B',  'E',  'A',  'D',  'G',  'C' ],
	},
	'ukulele': {
		'standard':     ['G',  'C',  'E',  'A' ],
		'd-tuning':     ['A',  'D',  'F#', 'B' ],
		'baritone':     ['D',  'G',  'B',  'E' ],
		'dorota':       ['E',  'B',  'E',  'A' ],
	},
	'banjo-4': {
		'standard':     ['C',  'G',  'B',  'D' ],
		'chicago':      ['D',  'G',  'B',  'E' ],
		'irish':        ['G',  'D',  'A',  'E' ],
		'open-d':       ['A',  'D',  'A',  'D' ],
		'open-g':       ['D',  'G',  'D',  'G' ],
		'all-fourths':  ['E',  'A',  'D',  'G' ],
		'all-fifths':   ['C',  'G',  'D',  'A' ],
	},
	'banjo-5': {
		'standard':     ['G',  'C',  'G',  'B',  'D' ],
		'open-a':       ['A',  'E',  'A',  'C#', 'E' ],
		'open-d':       ['F#', 'D',  'F#', 'A',  'D' ],
		'open-g':       ['G',  'D',  'G',  'B',  'D' ],
		'double-c':     ['G',  'C',  'G',  'C',  'D' ],
		'double-d':     ['A',  'D',  'A',  'D',  'E' ],
		'sawmill':      ['G',  'D',  'G',  'C',  'D' ],
	},
	'mandolin': {
		'standard':     ['G',  'G',  'D',  'D',  'A',  'A',  'E', 'E' ],
	},
};

export const tuningsNames = {
	// Guitar
	'standard':    'Standard tuning',
	'lower-d#':    'Lower D#',
	'lower-d':     'Lower D',
	'higher-f':    'Higher F',
	'higher-f#':   'Higher F#',
	'drop-d':      'Drop D',
	'drop-c':      'Drop C',
	'ddrop-d':     'Double Drop D',
	'ddrop-c':     'Double Drop C',
	'min-thirds':  'Minor Thirds',
	'maj-thirds':  'Major Thirds',
	'all-fourths': 'All Fourths',
	'aug-fourths': 'Augmented Fourths',
	'all-fifths':  'All Fifths',
	'nst':         'New Standard Tuning',
	'open-a':      'Open A',
	'open-b':      'Open B',
	'open-c':      'Open C',
	'open-csus2':  'Open Csus2',
	'open-d':      'Open D',
	'open-dm911':  'Open Dm9/11',
	'open-d6':     'Open D6',
	'open-d6sus2': 'Open D6sus2',
	'open-d7':     'Open D7',
	'open-d7sus2': 'Open D7sus2',
	'open-dm':     'Open Dm',
	'open-dm6':    'Open Dm6',
	'open-dm7':    'Open Dm7',
	'open-dsus4':  'Open Dsus4',
	'open-e':      'Open E',
	'open-g':      'Open G',
	'open-f':      'Open F',

	// Guitar-7
	'lower-bb':    'Lower Bb',
	'lower-a':     'Lower A',
	'higher-c':    'Higher C',
	'higher-c#':   'Higher C#',
	'drop-a':      'Drop A',
	'choro':       'Choro',
	'treble':      'Treble string',
	'russian':     'Russian guitar (Gypsy guitar)',
	'russian-var': 'Russian guitar (variant)',
	'big-guitar':  'Big guitar',

	// Guitar-8
	'lower-f':    'Lower F',
	'lower-e':    'Lower E',
	'drop-e':     'Drop E',
	'af-dropped': 'All Fourths + Drop E',
	'e6':         'E6',
	'e13':        'E13',

	// Guitar-9
	'lower-b':    'Lower B',

	// Guitar-10
	'yepes-low':  'Yepes tuning (low)',
	'yepes-high': 'Yepes tuning (high)',
	'baroque':    'Baroque tuning',
	'english':    'English guitar',

	// Bass-4
	'wstep-drop-c': 'Lower + Drop E',

	// Bass-5
	'std-low':      'Standard Low',

	// Ukulele
	'd-tuning':     'D tuning',
	'baritone':     'Baritone',
	'dorota':       'Dorota',

	// Banjo-4
	'chicago':      'Chicago tuning',
	'irish':        'Irish tuning',
	'double-c':     'Double C',
	'double-d':     'Double D',
	'sawmill':      'Sawmill (Mountain modal)',

};

Please open a proper Pull Request if you want to suggest some changes to the code. It makes it much easier for me to see what has been modified and what hasn't.
See: https://git-scm.com/book/en/v2/GitHub-Contributing-to-a-Project