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

提供:yonewiki
677行目: 677行目:
Guitar1tab_1st.y = Guitar1_Tab_St1_1.y
Guitar1tab_1st.y = Guitar1_Tab_St1_1.y


const Guitar1_Tab_St2_notes_1 = [
const Guitar1_Tab_St1_notes_1 = [
   new VF.StaveNote({ keys: ["g/4"], duration: "8", stem_direction: -1 }),
   new VF.StaveNote({ keys: ["g/4"], duration: "8", stem_direction: -1 }),
   new VF.StaveNote({ keys: ["f/5"], duration: "8", stem_direction: -1 }),
   new VF.StaveNote({ keys: ["f/5"], duration: "8", stem_direction: -1 }),
690行目: 690行目:
   new VF.StaveNote({ keys: ["b/4"], duration: "8", stem_direction: -1 }),
   new VF.StaveNote({ keys: ["b/4"], duration: "8", stem_direction: -1 }),
];
];
const Guitar1_Tab_St2_notes_2 = [
const Guitar1_Tab_St1_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"}),
712行目: 712行目:


];
];
UniqueIds = getUniqueNoteheadIds(Guitar1_Tab_St2_notes_1, [0, 1, 2, 3, 4, 5, 6, 7]);
UniqueIds = getUniqueNoteheadIds(Guitar1_Tab_St1_notes_1, [0, 1, 2, 3, 4, 5, 6, 7]);
allUniqueIds = updateAllUniqueIds(UniqueIds);
allUniqueIds = updateAllUniqueIds(UniqueIds);


const Guitar1_Tab_St2_beam_1 = new VF.Beam([
const Guitar1_Tab_St1_beam_1 = new VF.Beam([
   Guitar1_Tab_St2_notes_1[0], Guitar1_Tab_St2_notes_1[1], Guitar1_Tab_St2_notes_1[2], Guitar1_Tab_St2_notes_1[3]
   Guitar1_Tab_St1_notes_1[0], Guitar1_Tab_St1_notes_1[1], Guitar1_Tab_St1_notes_1[2], Guitar1_Tab_St1_notes_1[3]
   ]);
   ]);
const Guitar1_Tab_St2_beam_2 = new VF.Beam([
const Guitar1_Tab_St1_beam_2 = new VF.Beam([
   Guitar1_Tab_St2_notes_1[4], Guitar1_Tab_St2_notes_1[5]
   Guitar1_Tab_St1_notes_1[4], Guitar1_Tab_St1_notes_1[5]
   ]);
   ]);


var Guitar1_Tab_St2_Voice_1 = new VF.Voice({ num_beats: 4, beat_value: 4 });
var Guitar1_Tab_St1_Voice_1 = new VF.Voice({ num_beats: 4, beat_value: 4 });
Guitar1_Tab_St2_Voice_1.setStrict(true);
Guitar1_Tab_St1_Voice_1.setStrict(true);
Guitar1_Tab_St2_Voice_1.addTickables(Guitar1_Tab_St2_notes_1);
Guitar1_Tab_St1_Voice_1.addTickables(Guitar1_Tab_St1_notes_1);


var Guitar1_Tab_St2_Voice_2 = new VF.Voice({ num_beats: 4, beat_value: 4 });
var Guitar1_Tab_St1_Voice_2 = new VF.Voice({ num_beats: 4, beat_value: 4 });
Guitar1_Tab_St2_Voice_2.setStrict(true);
Guitar1_Tab_St1_Voice_2.setStrict(true);
Guitar1_Tab_St2_Voice_2.addTickables(Guitar1_Tab_St2_notes_2);
Guitar1_Tab_St1_Voice_2.addTickables(Guitar1_Tab_St1_notes_2);


var formatterGuitar1_Tab_St2 = new VF.Formatter().joinVoices([Guitar1_Tab_St2_Voice_1, Guitar1_Tab_St2_Voice_2]);
var formatterGuitar1_Tab_St1 = new VF.Formatter().joinVoices([Guitar1_Tab_St1_Voice_1, Guitar1_Tab_St1_Voice_2]);
formatterGuitar1_Tab_St2.format([Guitar1_Tab_St2_Voice_1, Guitar1_Tab_St2_Voice_2], nStaveWidth - 40 - 10);
formatterGuitar1_Tab_St1.format([Guitar1_Tab_St1_Voice_1, Guitar1_Tab_St1_Voice_2], nStaveWidth - 40 - 10);
Guitar1_Tab_St2_Voice_1.draw(ctx, Guitar1_St2);
Guitar1_Tab_St1_Voice_1.draw(ctx, Guitar1_St1_1);
Guitar1_Tab_St2_Voice_2.draw(ctx, Guitar1_St2);
Guitar1_Tab_St1_Voice_2.draw(ctx, Guitar1_St1_1);


Guitar1_Tab_St2_beam_1.setContext(ctx).draw();
Guitar1_Tab_St1_beam_1.setContext(ctx).draw();
Guitar1_Tab_St2_beam_2.setContext(ctx).draw();
Guitar1_Tab_St1_beam_2.setContext(ctx).draw();


shiftGuitar1tab_2st= addShift(
shiftGuitar1tab_1st= addShift(
   Guitar1_Tab_St2_notes_1,  
   Guitar1_Tab_St1_notes_1,  
   [0, 1, 2, 3, 4, 5, 6, 7],
   [0, 1, 2, 3, 4, 5, 6, 7],
   [3, 0, 1, 3, 3, 0, 1, 2]
   [3, 0, 1, 3, 3, 0, 1, 2]

2024年4月20日 (土) 00:27時点における版

VexFlow 使い方に戻る。


概要

 

タブ譜 ハーモニクス

 

VexFlow 使い方に戻る。