martijnversluis / ChordJS

A simple JavaScript chord parsing and manipulation tool
GNU General Public License v2.0
30 stars 5 forks source link

example of transposing every chord in ChordSheet #76

Closed paulrobertpine closed 4 years ago

paulrobertpine commented 4 years ago

Hi there and thanks for your work here.

I'm wondering if you could share a simple example of transposing every Chord in a ChordSheet?

Thanks

martijnversluis commented 4 years ago

Hi @paulrobertpine. Thanks for your question.

Transposing an entire chord sheet will require both ChordJS and ChordSheetJS. You can find a code sample in the project that combines the two, ChordFiddle. This is a file containing all transformations that can be performed from the ChordFiddle UI: https://github.com/martijnversluis/ChordFiddle/blob/master/src/utils/chord_sheet_transformations.js#L36.

Please let me know if this sample is helpful .

paulrobertpine commented 4 years ago

thanks, I figured it out. The file you sent helped. Here's what I ended up with:

https://github.com/paulrobertpine/gatsby-songbook/blob/master/src/templates/song.jsx

and you can see it working here:

https://songbook.netlify.app/

Thanks, Paul

On Wed, Jul 8, 2020 at 10:21 AM Martijn Versluis notifications@github.com wrote:

Hi @paulrobertpine https://github.com/paulrobertpine. Thanks for your question.

Transposing an entire chord sheet will require both ChordJS and ChordSheetJS. You can find a code sample in the project that combines the two, ChordFiddle. This is a file containing all transformations that can be performed from the ChordFiddle UI: https://github.com/martijnversluis/ChordFiddle/blob/master/src/utils/chord_sheet_transformations.js#L36 .

Please let me know if this sample is helpful .

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/martijnversluis/ChordJS/issues/76#issuecomment-655550997, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIBDR774Q3UXNUS53K7UABLR2R6FVANCNFSM4OUR552Q .

martijnversluis commented 4 years ago

Nice job, that works nice! Are you writing the chords sheets yourself or do you import them from somewhere?

paulrobertpine commented 4 years ago

I do a mix. Often what I do is copy and paste from Ultimate Guitar of whatnot into your ChordFiddle app and then paste into a markdown file, one for each song. See:

https://github.com/paulrobertpine/gatsby-songbook/tree/master/songs