「VexFlow タブ譜 同一コード連続弾き」の版間の差分
1,516行目: | 1,516行目: | ||
const Guitar2_Tab3 = new Stave(Guitar2_Tab2.width + Guitar2_Tab2.x, Guitar2_Tab2.y, nStaveWidth).setContext(ctx); | const Guitar2_Tab3 = new Stave(Guitar2_Tab2.width + Guitar2_Tab2.x, Guitar2_Tab2.y, nStaveWidth).setContext(ctx); | ||
Guitar2_Tab3.draw(); | Guitar2_Tab3.draw(); | ||
const Guitar2_tab_notes3_1 = [ | |||
new VF.StaveNote({ keys: ["b/4"], duration: "8", stem_direction: -1 }), | |||
new VF.StaveNote({ keys: ["b/4"], duration: "8", stem_direction: -1 }), | |||
new VF.StaveNote({ keys: ["b/4"], duration: "8", stem_direction: -1 }), | |||
new VF.StaveNote({ keys: ["b/4"], duration: "16", stem_direction: -1 }), | |||
new VF.StaveNote({ keys: ["b/4"], duration: "16", stem_direction: -1 }), | |||
new VF.StaveNote({ keys: ["b/4"], duration: "16", stem_direction: -1 }), | |||
new VF.StaveNote({ keys: ["b/4"], duration: "16", stem_direction: -1 }), | |||
new VF.StaveNote({ keys: ["b/4"], duration: "8", stem_direction: -1 }), | |||
new VF.StaveNote({ keys: ["b/4"], duration: "8", stem_direction: -1 }), | |||
new VF.StaveNote({ keys: ["b/4"], duration: "8", stem_direction: -1 }), | |||
]; | |||
const Guitar2_tab_notes3_2 = [ | |||
new VF.GhostNote({ keys: ["f/4"], duration: "16"}), | |||
new VF.GhostNote({ keys: ["f/4"], duration: "16"}), | |||
new VF.GhostNote({ keys: ["f/4"], duration: "16"}), | |||
new VF.GhostNote({ keys: ["f/4"], duration: "16"}), | |||
new VF.GhostNote({ keys: ["f/4"], duration: "16"}), | |||
new VF.GhostNote({ keys: ["f/4"], duration: "16"}), | |||
new VF.GhostNote({ keys: ["f/4"], duration: "16"}), | |||
new VF.GhostNote({ keys: ["f/4"], duration: "16"}), | |||
new VF.GhostNote({ keys: ["f/4"], duration: "16"}), | |||
new VF.GhostNote({ keys: ["f/4"], duration: "16"}), | |||
new VF.GhostNote({ keys: ["f/4"], duration: "16"}), | |||
new VF.GhostNote({ keys: ["f/4"], duration: "16"}), | |||
new VF.GhostNote({ keys: ["f/4"], duration: "16"}), | |||
new VF.GhostNote({ keys: ["f/4"], duration: "16"}), | |||
new VF.GhostNote({ keys: ["f/4"], duration: "16"}), | |||
new VF.GhostNote({ keys: ["f/4"], duration: "16"}), | |||
]; | |||
const Guitar2_tab_St3_beam1_1 = new VF.Beam([Guitar2_tab_notes3_1[0], Guitar2_tab_notes3_1[1]]); | |||
const Guitar2_tab_St3_beam1_2 = new VF.Beam([Guitar2_tab_notes3_1[2], Guitar2_tab_notes3_1[3], Guitar2_tab_notes3_1[4]]); | |||
const Guitar2_tab_St3_beam1_3 = new VF.Beam([Guitar2_tab_notes3_1[5], Guitar2_tab_notes3_1[6], Guitar2_tab_notes3_1[7]]); | |||
const Guitar2_tab_St3_beam1_4 = new VF.Beam([Guitar2_tab_notes3_1[9], Guitar2_tab_notes3_1[10]]); | |||
UniqueIds = getUniqueNoteheadIds(Guitar2_tab_notes3_1, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]); | |||
allUniqueIds = updateAllUniqueIds(UniqueIds); | |||
var Guitar2_tab_St3_1Voice = new Vex.Flow.Voice({ num_beats: 4, beat_value: 4 }); | |||
Guitar2_tab_St3_1Voice.setStrict(true); | |||
Guitar2_tab_St3_1Voice.addTickables(Guitar2_tab_notes3_1); | |||
var Guitar2_tab_St3_2Voice = new Vex.Flow.Voice({ num_beats: 4, beat_value: 4 }); | |||
Guitar2_tab_St3_2Voice.setStrict(true); | |||
Guitar2_tab_St3_2Voice.addTickables(Guitar2_tab_notes3_2); | |||
var formatterGuitar2_tab_St3_1 = new Vex.Flow.Formatter().joinVoices([Guitar2_tab_St3_2Voice, Guitar2_tab_St3_1Voice]); | |||
formatterGuitar2_tab_St3_1.format([Guitar2_tab_St3_2Voice, Guitar2_tab_St3_1Voice], nStaveWidth - 10); | |||
Guitar2_tab_St3_1Voice.draw(ctx, Guitar2_Tab3); | |||
Guitar2_tab_St3_2Voice.draw(ctx, Guitar2_Tab3); | |||
Guitar2_tab_St3_beam1_1.setContext(ctx).draw(); | |||
Guitar2_tab_St3_beam1_2.setContext(ctx).draw(); | |||
Guitar2_tab_St3_beam1_3.setContext(ctx).draw(); | |||
Guitar2_tab_St3_beam1_4.setContext(ctx).draw(); | |||
shiftGuitar2_Tab3 = addShift( | |||
Guitar2_tab_notes3_1, | |||
[ 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9], | |||
[-1, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2] | |||
); | |||
const Guitar2_Tab4 = new Stave(Guitar2_Tab3.width + Guitar2_Tab3.x, Guitar2_Tab3.y, nStaveWidth).setContext(ctx); | const Guitar2_Tab4 = new Stave(Guitar2_Tab3.width + Guitar2_Tab3.x, Guitar2_Tab3.y, nStaveWidth).setContext(ctx); |
2024年4月10日 (水) 17:39時点における版
VexFlow 使い方に戻る。
概要
タブ譜 同一コード連続弾き
コードは以下のとおりです。
<div id="yonet202403Mid_Output01"></div>
<script>
</script>
VexFlow 使い方に戻る。