「VexFlow タブ譜 ミュート」の版間の差分
(同じ利用者による、間の5版が非表示) | |||
24行目: | 24行目: | ||
} | } | ||
var VF = Vex.Flow; | var VF = Vex.Flow; | ||
const | |||
const VocalInst = new Position(); | |||
const Guitar1Inst = new Position(); | const Guitar1Inst = new Position(); | ||
const Guitar2Inst = new Position(); | |||
const BaseInst = new Position(); | |||
const DrumInst = new Position(); | |||
const PercInst = new Position(); | |||
const | const Guitar1tab_1st_tabmark = new Position(); | ||
const Guitar1tab_1st = new Position(); | const Guitar1tab_1st = new Position(); | ||
34行目: | 39行目: | ||
const Guitar1tab_4st = new Position(); | const Guitar1tab_4st = new Position(); | ||
const | const Guitar2tab_1st_tabmark = new Position(); | ||
const Guitar2tab_1st = new Position(); | const Guitar2tab_1st = new Position(); | ||
42行目: | 46行目: | ||
const Guitar2tab_4st = new Position(); | const Guitar2tab_4st = new Position(); | ||
const | const Basetab_1st_tabmark = new Position(); | ||
var StaveBase1; | var StaveBase1; | ||
51行目: | 52行目: | ||
var StaveBase3; | var StaveBase3; | ||
var StaveBase4; | var StaveBase4; | ||
var shiftGuitar1_1st; | var shiftGuitar1_1st; | ||
77行目: | 73行目: | ||
var shiftGuitar2tab_4st; | var shiftGuitar2tab_4st; | ||
var | var shiftDrum_1st; | ||
var | var shiftDrum_2st; | ||
var shiftDrum_3st; | |||
var shiftDrum_4st; | |||
var shiftPerc_1st; | |||
var shiftPerc_2st; | |||
var shiftPerc_3st; | |||
var shiftPerc_4st; | |||
function insertBaseEndBarPathToSVG(Stave) { | function insertBaseEndBarPathToSVG(Stave) { | ||
492行目: | 495行目: | ||
Vocal_St1.draw(); | Vocal_St1.draw(); | ||
VocalInst.x = Vocal_St1.x - 30; | |||
VocalInst.y = Vocal_St1.y + 90; | |||
const Vocal_St2 = f.Stave({ x: Vocal_St1.width + Vocal_St1.x, y: Vocal_St1.y, width: nStaveWidth }); | const Vocal_St2 = f.Stave({ x: Vocal_St1.width + Vocal_St1.x, y: Vocal_St1.y, width: nStaveWidth }); | ||
507行目: | 510行目: | ||
Vocal_St4.draw(); | Vocal_St4.draw(); | ||
const Guitar1_St1 = new VF.Stave(Vocal_St1.x, Vocal_St1.y + | const Guitar1_St1 = new VF.Stave(Vocal_St1.x, Vocal_St1.y + 150, nHeadMargin + nStaveWidth).setContext(ctx); | ||
Guitar1_St1.addClef("treble").setContext(ctx); | Guitar1_St1.addClef("treble").setContext(ctx); | ||
Guitar1_St1.addTimeSignature('4/4').setContext(ctx); | Guitar1_St1.addTimeSignature('4/4').setContext(ctx); | ||
527行目: | 530行目: | ||
Guitar1_Tab_St1.draw(); | Guitar1_Tab_St1.draw(); | ||
Guitar1tab_1st_tabmark.x = Guitar1_Tab_St1.x; | |||
Guitar1tab_1st_tabmark.y = Guitar1_Tab_St1.y; | |||
var Guitar1Connector_St1_L = new VF.StaveConnector(Guitar1_St1, Guitar1_Tab_St1); | var Guitar1Connector_St1_L = new VF.StaveConnector(Guitar1_St1, Guitar1_Tab_St1); | ||
551行目: | 554行目: | ||
Guitar1tab_2st.x = Guitar1_Tab_St2.x | Guitar1tab_2st.x = Guitar1_Tab_St2.x | ||
Guitar1tab_2st.y = Guitar1_Tab_St2.y | Guitar1tab_2st.y = Guitar1_Tab_St2.y | ||
var Guitar1Connector_St2_L = new VF.StaveConnector(Guitar1_St2, Guitar1_Tab_St2); | |||
Guitar1Connector_St2_L.setType(VF.StaveConnector.type.SINGLE); | |||
Guitar1Connector_St2_L.setContext(ctx); | |||
Guitar1Connector_St2_L.draw(); | |||
const Guitar1_Tab_St3 = new VF.Stave(Guitar1_Tab_St2.width + Guitar1_Tab_St2.x, Guitar1_Tab_St1.y, nStaveWidth).setContext(ctx); | const Guitar1_Tab_St3 = new VF.Stave(Guitar1_Tab_St2.width + Guitar1_Tab_St2.x, Guitar1_Tab_St1.y, nStaveWidth).setContext(ctx); | ||
557行目: | 565行目: | ||
Guitar1tab_3st.x = Guitar1_Tab_St3.x | Guitar1tab_3st.x = Guitar1_Tab_St3.x | ||
Guitar1tab_3st.y = Guitar1_Tab_St3.y | Guitar1tab_3st.y = Guitar1_Tab_St3.y | ||
var Guitar1Connector_St3_L = new VF.StaveConnector(Guitar1_St3, Guitar1_Tab_St3); | |||
Guitar1Connector_St3_L.setType(VF.StaveConnector.type.SINGLE); | |||
Guitar1Connector_St3_L.setContext(ctx); | |||
Guitar1Connector_St3_L.draw(); | |||
const Guitar1_Tab_St4 = new VF.Stave(Guitar1_Tab_St3.width + Guitar1_Tab_St3.x, Guitar1_Tab_St1.y, nStaveWidth).setContext(ctx); | const Guitar1_Tab_St4 = new VF.Stave(Guitar1_Tab_St3.width + Guitar1_Tab_St3.x, Guitar1_Tab_St1.y, nStaveWidth).setContext(ctx); | ||
563行目: | 576行目: | ||
Guitar1tab_4st.x = Guitar1_Tab_St4.x | Guitar1tab_4st.x = Guitar1_Tab_St4.x | ||
Guitar1tab_4st.y = Guitar1_Tab_St4.y | Guitar1tab_4st.y = Guitar1_Tab_St4.y | ||
var Guitar1Connector_St4_L = new VF.StaveConnector(Guitar1_St4, Guitar1_Tab_St4); | |||
Guitar1Connector_St4_L.setType(VF.StaveConnector.type.SINGLE); | |||
Guitar1Connector_St4_L.setContext(ctx); | |||
Guitar1Connector_St4_L.draw(); | |||
const Guitar1_vTab_St1 = new VF.Stave(Guitar1_St1.x, Guitar1_St1.y + 110, nHeadMargin + nStaveWidth).setContext(ctx); | const Guitar1_vTab_St1 = new VF.Stave(Guitar1_St1.x, Guitar1_St1.y + 110, nHeadMargin + nStaveWidth).setContext(ctx); | ||
624行目: | 642行目: | ||
Guitar2tab_1st.y = Guitar2_Tab_St1_1.y; | Guitar2tab_1st.y = Guitar2_Tab_St1_1.y; | ||
Guitar2tab_1st_tabmark.x = Guitar2_Tab_St1.x; | |||
Guitar2tab_1st_tabmark.y = Guitar2_Tab_St1.y; | |||
const Guitar2_Tab_St2 = new VF.Stave(Guitar2_Tab_St1.width + Guitar2_Tab_St1.x, Guitar2_Tab_St1.y, nStaveWidth).setContext(ctx); | const Guitar2_Tab_St2 = new VF.Stave(Guitar2_Tab_St1.width + Guitar2_Tab_St1.x, Guitar2_Tab_St1.y, nStaveWidth).setContext(ctx); | ||
709行目: | 727行目: | ||
Base_Tab_St1.draw(); | Base_Tab_St1.draw(); | ||
Basetab_1st_tabmark.x = Base_Tab_St1.x; | |||
Basetab_1st_tabmark.y = Base_Tab_St1.y; | |||
BaseInst.x = Base_St1.x - 30; | BaseInst.x = Base_St1.x - 30; | ||
BaseInst.y = Base_St1.y + (( | BaseInst.y = Base_St1.y + ((Base_Tab_St1.y - Base_St1.y) / 2) + 90; | ||
StaveBase1 = Base_Tab_St1; | StaveBase1 = Base_Tab_St1; | ||
840行目: | 858行目: | ||
textContent: ["Vocal"], // 必須文字列 | textContent: ["Vocal"], // 必須文字列 | ||
strID: "VocalText", // 必須 | strID: "VocalText", // 必須 | ||
Stave_x: | Stave_x: VocalInst.x, | ||
Stave_y: | Stave_y: VocalInst.y, | ||
fontFamily: "Arial, sans-serif", | fontFamily: "Arial, sans-serif", | ||
fontSize: "20pt", | fontSize: "20pt", | ||
862行目: | 880行目: | ||
textContent: ["@"], // 必須文字列 | textContent: ["@"], // 必須文字列 | ||
strID: "EGuitarTab", // 必須 | strID: "EGuitarTab", // 必須 | ||
Stave_x: | Stave_x: Guitar1tab_1st_tabmark.x, | ||
Stave_y: | Stave_y: Guitar1tab_1st_tabmark.y, | ||
Stave_x_Offset: 10, | Stave_x_Offset: 10, | ||
Stave_y_Offset: 80, | Stave_y_Offset: 80, | ||
884行目: | 902行目: | ||
textContent: ["@"], // 必須文字列 | textContent: ["@"], // 必須文字列 | ||
strID: "EGuitar2Tab", // 必須 | strID: "EGuitar2Tab", // 必須 | ||
Stave_x: | Stave_x: Guitar2tab_1st_tabmark.x, | ||
Stave_y: | Stave_y: Guitar2tab_1st_tabmark.y, | ||
Stave_x_Offset: 10, | Stave_x_Offset: 10, | ||
Stave_y_Offset: 80, | Stave_y_Offset: 80, | ||
906行目: | 924行目: | ||
textContent: ["@"], // 必須文字列 | textContent: ["@"], // 必須文字列 | ||
strID: "BaseTab", // 必須 | strID: "BaseTab", // 必須 | ||
Stave_x: | Stave_x: Basetab_1st_tabmark.x, | ||
Stave_y: | Stave_y: Basetab_1st_tabmark.y, | ||
Stave_x_Offset: 10, | Stave_x_Offset: 10, | ||
Stave_y_Offset: 90, | Stave_y_Offset: 90, |
2024年4月18日 (木) 23:50時点における版
VexFlow 使い方に戻る。
概要
タブ譜 ミュート
コードは以下のとおりです。
<div id="yonet202404Mid_Output01"></div>
<script>
VexFlow 使い方に戻る。