Last active
May 24, 2023 21:16
-
-
Save xavriley/8f907811d71abea8aa3f31db8b1535bc to your computer and use it in GitHub Desktop.
Revisions
-
xavriley revised this gist
May 24, 2023 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,5 @@ ``` $ npm install -g pkg # https://github.com/vercel/pkg $ npm install -g chord-symbol # https://github.com/no-chris/chord-symbol $ pkg chord-parser.js ``` -
xavriley created this gist
May 24, 2023 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,32 @@ $ ./chord-parser -c Cmaj7 { input: { symbol: 'Cmaj7', rootNote: 'C', descriptor: 'maj7', parsableDescriptor: 'maj7', modifiers: [ 'add7' ], notationSystem: 'english' }, normalized: { intervals: [ '1', '3', '5', '7' ], semitones: [ 0, 4, 7, 11 ], intents: { major: true, eleventh: false, alt: false }, rootNote: 'C', quality: 'major7', isSuspended: false, extensions: [], alterations: [], adds: [], omits: [], notes: [ 'C', 'E', 'G', 'B' ] }, formatted: { rootNote: 'C', bassNote: undefined, descriptor: 'ma7', chordChanges: [], symbol: 'Cma7' }, parserConfiguration: {} } This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ #!/usr/bin/env node const yargs = require("yargs"); const chordSymbolLib = require("chord-symbol"); const parseChord = chordSymbolLib.chordParserFactory(); const renderChord = chordSymbolLib.chordRendererFactory({ useShortNamings: true }); const options = yargs .usage("Usage: -c <inputChord>") .option("c", { alias: "inputChord", describe: "Chord symbol as a string", type: "string", demandOption: true }) .argv; const chord = parseChord(options.inputChord); console.log(chord); This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,4 @@ ``` $ npm install -g pkg # https://github.com/vercel/pkg $ pkg chord-parser.js ```