moonwave99/fretboard.js

add or remove note

Aduffy opened this issue · 1 comments

Is there a (built in) method of adding or removing a note from the fretboard with out having to completely re-render the fretboard ?

Not at the moment, but you can hide a position (without removing it) with the style method:

const fretboard = new Fretboard({...});

fretboard.render([...]);

// toggle flag on button click for instance
let showRoots = true;

fretboard.style({
    filter: ({ interval }) => interval === '1P',
    opacity: +showRoots
});

See pen