「VexFlow タブ譜 ハーモニクス」の版間の差分

提供:yonewiki
(ページの作成:「<yjavascript></script> <script src="https://wiki.yo-net.jp/vexflow/build/cjs/vexflow@4.2.2.0001.js"></script> </yjavascript> VexFlow 使い方に戻る。 == '''概要''' ==   == '''タブ譜 ハーモニクス''' == <div id="notation"></div> <div id="yonet202404Mid_Output01"></div> <yjavascript></script> <script> /////////////////////// (function(){ class Position { constructor(x = 0, y = 0) { this.x = x; this.y = y; } } var VF = Vex.Flow; co…」)
 
579行目: 579行目:
const Guitar1_St2 = new VF.Stave(Guitar1_St1.width + Guitar1_St1.x, Guitar1_St1.y, nStaveWidth).setContext(ctx);
const Guitar1_St2 = new VF.Stave(Guitar1_St1.width + Guitar1_St1.x, Guitar1_St1.y, nStaveWidth).setContext(ctx);
Guitar1_St2.draw();
Guitar1_St2.draw();
const Guitar1_St2_notes_1 = [
  new VF.StaveNote({ keys: ["b/4"], duration: "8", stem_direction: -1 }),
  new VF.StaveNote({ keys: ["f/5"], duration: "8", stem_direction: -1 }),
  new VF.StaveNote({ keys: ["d/5"], duration: "8", stem_direction: -1 }),
  new VF.StaveNote({ keys: ["a/4", "d/5"], duration: "8", stem_direction: -1 }),
  new VF.StaveNote({ keys: ["a/4", "d/5"], duration: "8", stem_direction: -1 }),
  new VF.StaveNote({ keys: ["f/5"], duration: "8", stem_direction: -1 }),
  new VF.StaveNote({ keys: ["a/4"], duration: "4", stem_direction: -1 }),
];
const Guitar1_St2_notes_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"}),
];
UniqueIds = getUniqueNoteheadIds(Guitar1_St1_notes_1, [4, 5, 6]);
allUniqueIds = updateAllUniqueIds(UniqueIds);
const Guitar1_St2_beam_1 = new VF.Beam([
  Guitar1_St2_notes_1[0], Guitar1_St2_notes_1[1], Guitar1_St2_notes_1[2], Guitar1_St2_notes_1[3]
  ]);
const Guitar1_St2_beam_2 = new VF.Beam([
  Guitar1_St2_notes_1[4], Guitar1_St2_notes_1[5], Guitar1_St2_notes_1[6], Guitar1_St2_notes_1[7]
  ]);
var Guitar1_St2_Voice_1 = new VF.Voice({ num_beats: 4, beat_value: 4 });
Guitar1_St2_Voice_1.setStrict(true);
Guitar1_St2_Voice_1.addTickables(Guitar1_St2_notes_1);
var Guitar1_St2_Voice_2 = new VF.Voice({ num_beats: 4, beat_value: 4 });
Guitar1_St2_Voice_2.setStrict(true);
Guitar1_St2_Voice_2.addTickables(Guitar1_St2_notes_2);
var formatterGuitar1_St2 = new VF.Formatter().joinVoices([Guitar1_St2_Voice_1, Guitar1_St2_Voice_2]);
formatterGuitar1_St2.format([Guitar1_St2_Voice_1, Guitar1_St2_Voice_2], nStaveWidth - 40 - 10);
Guitar1_St2_Voice_1.draw(ctx, Guitar1_St2);
Guitar1_St2_Voice_2.draw(ctx, Guitar1_St2);
Guitar1_St2_beam_1.setContext(ctx).draw();
Guitar1_St2_beam_2.setContext(ctx).draw();
shiftGuitar1_2st= addShift(
  Guitar1_St2_notes_1,
  [5,  5, 6,  6],
  [0, -1, 1, 2.5]
);


const Guitar1_St3 = new VF.Stave(Guitar1_St2.width + Guitar1_St2.x, Guitar1_St1.y, nStaveWidth).setContext(ctx);
const Guitar1_St3 = new VF.Stave(Guitar1_St2.width + Guitar1_St2.x, Guitar1_St1.y, nStaveWidth).setContext(ctx);

2024年4月19日 (金) 21:47時点における版

VexFlow 使い方に戻る。


概要

 

タブ譜 ハーモニクス

 

VexFlow 使い方に戻る。