// diag.js - module to insert guitar chord diagrams // // Copyright (C) 2018-2024 Jean-Francois Moine // // This file is part of abc2svg. // // abc2svg is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // abc2svg is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with abc2svg. If not, see . // // This module is loaded when "%%diagram" or "%%setdiag" appear in a ABC source. // // The command %%diagram draws a chord diagram above the chord symbols. // // Parameters // %%diagram [ <#diagram> | 0 ] // with // <#diagram> identifier of the diagram type (number) // ('1' is for the 6 strings guitar) // // The command %%setdiag defines the chord diagram of a chord symbol // for the current diagram type. // // Parameters // %%setdiag [barre=-] // with // = chord symbol // = list of diagram offset of dots on the strings - '0 or 'x': no dot //