「VexFlow タブ譜 同一コード連続弾き」の版間の差分
1,590行目: | 1,590行目: | ||
[-1, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2] | [-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); | ||
Guitar2_Tab4.draw(); | Guitar2_Tab4.draw(); | ||
const Guitar2_tab_notes4_1 = [ | |||
new VF.StaveNote({ keys: ["b/5"], duration: "8" }), | |||
new VF.StaveNote({ keys: ["b/5"], duration: "8" }), | |||
new VF.StaveNote({ keys: ["b/5"], duration: "8" }), | |||
new VF.StaveNote({ keys: ["b/5"], duration: "16" }), | |||
new VF.StaveNote({ keys: ["b/5"], duration: "16" }), | |||
new VF.StaveNote({ keys: ["b/5"], duration: "16" }), | |||
new VF.StaveNote({ keys: ["b/5"], duration: "16" }), | |||
new VF.StaveNote({ keys: ["b/5"], duration: "8" }), | |||
new VF.StaveNote({ keys: ["b/5"], duration: "8" }), | |||
new VF.StaveNote({ keys: ["b/5"], duration: "8" }), | |||
]; | |||
const Guitar2_tab_notes4_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_St4_beam1_1 = new VF.Beam([Guitar2_tab_notes4_1[0], Guitar2_tab_notes4_1[1]]); | |||
const Guitar2_tab_St4_beam1_2 = new VF.Beam([Guitar2_tab_notes4_1[2], Guitar2_tab_notes4_1[3], Guitar2_tab_notes4_1[4]]); | |||
const Guitar2_tab_St4_beam1_3 = new VF.Beam([Guitar2_tab_notes4_1[5], Guitar2_tab_notes4_1[6], Guitar2_tab_notes4_1[7]]); | |||
const Guitar2_tab_St4_beam1_4 = new VF.Beam([Guitar2_tab_notes4_1[8], Guitar2_tab_notes4_1[9]]); | |||
UniqueIds = getUniqueNoteheadIds(Guitar2_tab_notes4_1, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]); | |||
allUniqueIds = updateAllUniqueIds(UniqueIds); | |||
var Guitar2_tab_St4_1Voice = new Vex.Flow.Voice({ num_beats: 4, beat_value: 4 }); | |||
Guitar2_tab_St4_1Voice.setStrict(true); | |||
Guitar2_tab_St4_1Voice.addTickables(Guitar2_tab_notes4_1); | |||
var Guitar2_tab_St4_2Voice = new Vex.Flow.Voice({ num_beats: 4, beat_value: 4 }); | |||
Guitar2_tab_St4_2Voice.setStrict(true); | |||
Guitar2_tab_St4_2Voice.addTickables(Guitar2_tab_notes4_2); | |||
var formatterGuitar2_tab_St4_1 = new Vex.Flow.Formatter().joinVoices([Guitar2_tab_St4_2Voice, Guitar2_tab_St4_1Voice]); | |||
formatterGuitar2_tab_St4_1.format([Guitar2_tab_St4_2Voice, Guitar2_tab_St4_1Voice], nStaveWidth - 10); | |||
Guitar2_tab_St4_1Voice.draw(ctx, Guitar2_Tab4); | |||
Guitar2_tab_St4_2Voice.draw(ctx, Guitar2_Tab4); | |||
Guitar2_tab_St4_beam1_1.setContext(ctx).draw(); | |||
Guitar2_tab_St4_beam1_2.setContext(ctx).draw(); | |||
Guitar2_tab_St4_beam1_3.setContext(ctx).draw(); | |||
Guitar2_tab_St4_beam1_4.setContext(ctx).draw(); | |||
shiftGuitar2_Tab4 = addShift( | |||
Guitar2_tab_notes4_1, | |||
[0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9], | |||
[0, 1, 2, 3, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2] | |||
); | |||
var Guitar2_connect = new VF.StaveConnector(Guitar2_St1, Guitar2_Tab1); | var Guitar2_connect = new VF.StaveConnector(Guitar2_St1, Guitar2_Tab1); |
2024年4月10日 (水) 21:03時点における版
VexFlow 使い方に戻る。
概要
タブ譜 同一コード連続弾き
コードは以下のとおりです。
<div id="yonet202403Mid_Output01"></div>
<script>
</script>
VexFlow 使い方に戻る。