dart-tonic icon indicating copy to clipboard operation
dart-tonic copied to clipboard

Port Guitar chord (fretting) finder

Open osteele opened this issue 7 years ago • 1 comments

dart-tonic started out as a port of a CoffeeScript library (formerly called “schoen”, now “tonic.ts”), that included a working guitar chord calculator. The code that it was ported from is in the coffeescript branch of that repository; specifically, in lib/fingerings.coffee.

I recently ported that library to TypeScript, and reworked it to add type declarations and to lean a little less heavily on runtime reflection and other dynamic language features. That work is in the main branch of https://github.com/osteele/tonic.ts. I renamed the Fretting class of the Dart / CoffeeScript implementation to FrettedChord and it lives in src/FrettedChord.ts (class definition and supporting types) and src/fretting.ts (algorithm to find and sort fingerings / fretted chords). Test cases are in test/FrettedChord.test.ts.

osteele avatar Sep 17 '18 13:09 osteele

Thanks for adding detail to this issue - I'm planning to work on this sometime soon!

Obviously if there's anyone else interested feel free to drop a comment

johnpryan avatar Sep 17 '18 16:09 johnpryan