davfive / obsidian-jtab

jTab Guitar Codeblocks for Obsidian adds the ability to show guitar chords and tabs directly in your notes.
MIT License
71 stars 1 forks source link

Make custom chords in the first 4 frets show with the nut #7

Open davfive opened 2 years ago

davfive commented 2 years ago

For some reason, jTab/Raphael move the chord as high as possible on the display.

image

Requirements:

davfive commented 2 years ago

Mistakenly closed for 1.2.2 (reopened)

gutobenn commented 1 year ago

@davfive I'm facing the same problem, that's an issue in jTab

Here you can see someone who got it fixed: https://github.com/tardate/jtab/issues/39#issuecomment-379587199 It would be awesome if we could somehow choose to use his fork

davfive commented 1 year ago

Thanks!

On Fri, Jan 6, 2023 at 6:50 PM Augusto Bennemann @.***> wrote:

I'm facing the same problem, that's an issue in jTab

Here you can see someone who got if fixes: tardate/jtab#39 (comment) https://github.com/tardate/jtab/issues/39#issuecomment-379587199 It would be awesome if we could choose to use his fork

— Reply to this email directly, view it on GitHub https://github.com/davfive/obsidian-jtab/issues/7#issuecomment-1374358449, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGAYWZDCRYZHCTBWXED2XDWRDKWZANCNFSM5VMSYEUA . You are receiving this because you modified the open/close state.Message ID: @.***>

RobColes commented 1 year ago

The "proper" fix is probably better, but this was annoying me too, so I just added the below to jtab.tardate.js

//find all the fret positions which arent X or 0. I'm sure there's a better way to do this.

const min = Math.min.apply(Math, fingeredFrets);

// ROB: Don't mess with starting at the nut if the whole fingering fits within the first 5 frets
max = Math.max.apply(Math, fingeredFrets);
if (max > 5) {
    array.unshift(min - 1);
} else {
    array.unshift(0);
}
return array;

};

Caveat: I don't really know what I am doing with JS but it is working for my test cases

davfive commented 8 months ago

Marking will-not-do since this is a core "feature" of jTab and I don't want to change at this level. Also, no actual use ever requested this.