「VexFlow タブ譜 同一コード連続弾き」の版間の差分
(ページの作成:「<yjavascript></script> <script src="https://wiki.yo-net.jp/vexflow/build/cjs/vexflow@4.2.2.0001.js"></script> <!--<script src="https://cdn.jsdelivr.net/npm/vexflow@4.2.3/build/cjs/vexflow.js"></script>--> <!--<script src="https://cdn.jsdelivr.net/npm/vexflow@4.0.2/build/cjs/vexflow.js></script>--> </yjavascript> VexFlow 使い方に戻る。 == '''概要''' == == '''タブ譜 同一コード連続弾き''' == <div id="notation"></div> <div id="yonet202…」) |
|||
1,275行目: | 1,275行目: | ||
const Guitar2_St3 = new Stave(Guitar2_St2.width + Guitar2_St2.x, Guitar2_St2.y, nStaveWidth).setContext(ctx); | const Guitar2_St3 = new Stave(Guitar2_St2.width + Guitar2_St2.x, Guitar2_St2.y, nStaveWidth).setContext(ctx); | ||
Guitar2_St3.draw(); | Guitar2_St3.draw(); | ||
const Guitar2_notes3_1 = [ | |||
dotted(new VF.StaveNote({ keys: ["c/5"], duration: "8d", stem_direction: -1 })), | |||
new VF.StaveNote({ keys: ["c/5"], duration: "16", stem_direction: -1 }), | |||
new VF.StaveNote({ keys: ["c/5"], duration: "8", stem_direction: -1 }), | |||
new VF.StaveNote({ keys: ["c/5"], duration: "16", stem_direction: -1 }), | |||
new VF.StaveNote({ keys: ["c/5"], duration: "16", stem_direction: -1 }), | |||
new VF.StaveNote({ keys: ["c/5"], duration: "16", stem_direction: -1 }), | |||
new VF.StaveNote({ keys: ["c/5"], duration: "16", stem_direction: -1 }), | |||
new VF.StaveNote({ keys: ["c/5"], duration: "16", stem_direction: -1 }), | |||
new VF.StaveNote({ keys: ["c/5"], duration: "16", stem_direction: -1 }), | |||
new VF.StaveNote({ keys: ["c/5"], duration: "8", stem_direction: -1 }), | |||
new VF.StaveNote({ keys: ["c/5"], duration: "8", stem_direction: -1 }), | |||
]; | |||
const Guitar2_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_St3_beam1_1 = new VF.Beam([Guitar2_notes3_1[0], Guitar2_notes3_1[1]]); | |||
const Guitar2_St3_beam1_2 = new VF.Beam([Guitar2_notes3_1[2], Guitar2_notes3_1[3], Guitar2_notes3_1[4]]); | |||
const Guitar2_St3_beam1_3 = new VF.Beam([Guitar2_notes3_1[5], Guitar2_notes3_1[6], Guitar2_notes3_1[7], Guitar2_notes3_1[8]]); | |||
const Guitar2_St3_beam1_4 = new VF.Beam([Guitar2_notes3_1[9], Guitar2_notes3_1[10]]); | |||
UniqueIds = getUniqueNoteheadIds(Guitar2_notes3_1, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]); | |||
allUniqueIds = updateAllUniqueIds(UniqueIds); | |||
var Guitar2_St3_1Voice = new Vex.Flow.Voice({ num_beats: 4, beat_value: 4 }); | |||
Guitar2_St3_1Voice.setStrict(true); | |||
Guitar2_St3_1Voice.addTickables(Guitar2_notes3_1); | |||
var Guitar2_St3_2Voice = new Vex.Flow.Voice({ num_beats: 4, beat_value: 4 }); | |||
Guitar2_St3_2Voice.setStrict(true); | |||
Guitar2_St3_2Voice.addTickables(Guitar2_notes3_2); | |||
var formatterGuitar2_St3_1 = new Vex.Flow.Formatter().joinVoices([Guitar2_St3_2Voice, Guitar2_St3_1Voice]); | |||
formatterGuitar2_St3_1.format([Guitar2_St3_2Voice, Guitar2_St3_1Voice], nStaveWidth - 10); | |||
Guitar2_St3_1Voice.draw(ctx, Guitar2_St3); | |||
Guitar2_St3_2Voice.draw(ctx, Guitar2_St3); | |||
Guitar2_St3_beam1_1.setContext(ctx).draw(); | |||
Guitar2_St3_beam1_2.setContext(ctx).draw(); | |||
Guitar2_St3_beam1_3.setContext(ctx).draw(); | |||
Guitar2_St3_beam1_4.setContext(ctx).draw(); | |||
shiftGuitar2_St3 = addShift( | |||
Guitar2_notes3_1, | |||
[0, 1, 2, 3, 4, 6, 7, 8, 9, 10], | |||
[2, 2, 2, 2, 2, 2, 2, 2, 2, 2] | |||
); | |||
const Guitar2_St4 = new Stave(Guitar2_St3.width + Guitar2_St3.x, Guitar2_St3.y, nStaveWidth).setContext(ctx); | const Guitar2_St4 = new Stave(Guitar2_St3.width + Guitar2_St3.x, Guitar2_St3.y, nStaveWidth).setContext(ctx); |
2024年4月10日 (水) 17:18時点における版
VexFlow 使い方に戻る。
概要
タブ譜 同一コード連続弾き
コードは以下のとおりです。
<div id="yonet202403Mid_Output01"></div>
<script>
</script>
VexFlow 使い方に戻る。