「VexFlow タブ譜 ミュート」の版間の差分

提供:yonewiki
 
(同じ利用者による、間の33版が非表示)
24行目: 24行目:
}
}
var VF = Vex.Flow;
var VF = Vex.Flow;
const Vocal = new Position();
 
const VocalInst = new Position();
const Guitar1Inst = new Position();
const Guitar1Inst = new Position();
const Guitar2Inst = new Position();
const BaseInst = new Position();
const DrumInst = new Position();
const PercInst = new Position();
const Guitar1tab_1st_tabmark = new Position();


const Guitar1tab_1st = new Position();
const Guitar1tab_1st = new Position();
32行目: 39行目:
const Guitar1tab_4st = new Position();
const Guitar1tab_4st = new Position();


const Guitar2Inst = new Position();
const Guitar2tab_1st_tabmark = new Position();
const Guitar2Tab1 = new Position();


const Guitar2tab_1st = new Position();
const Guitar2tab_1st = new Position();
40行目: 46行目:
const Guitar2tab_4st = new Position();
const Guitar2tab_4st = new Position();


const BaseInst = new Position();
const Basetab_1st_tabmark = new Position();
const BaseTab1 = new Position();
const DrumInst = new Position();
const PercInst = new Position();
const Stave9Pos = new Position();


var StaveBase1;
var StaveBase1;
50行目: 52行目:
var StaveBase3;
var StaveBase3;
var StaveBase4;
var StaveBase4;
const Perc_note1_1_0 = new Position();
var shiftGuitar1_1;
var shiftGuitar1_tab4_tr;


var shiftGuitar1_1st;
var shiftGuitar1_1st;
76行目: 73行目:
var shiftGuitar2tab_4st;
var shiftGuitar2tab_4st;


var shiftDrum1;
var shiftDrum_1st;
var shiftPerc1;
var shiftDrum_2st;
var shiftDrum_3st;
var shiftDrum_4st;
 
var shiftPerc_1st;
var shiftPerc_2st;
var shiftPerc_3st;
var shiftPerc_4st;


function insertBaseEndBarPathToSVG(Stave) {
function insertBaseEndBarPathToSVG(Stave) {
491行目: 495行目:
Vocal_St1.draw();
Vocal_St1.draw();


Vocal.x = Vocal_St1.x - 30;
VocalInst.x = Vocal_St1.x - 30;
Vocal.y = Vocal_St1.y + 90;  
VocalInst.y = Vocal_St1.y + 90;  


const Vocal_St2 = f.Stave({ x: Vocal_St1.width + Vocal_St1.x, y: Vocal_St1.y, width: nStaveWidth });
const Vocal_St2 = f.Stave({ x: Vocal_St1.width + Vocal_St1.x, y: Vocal_St1.y, width: nStaveWidth });
506行目: 510行目:
Vocal_St4.draw();
Vocal_St4.draw();


const Guitar1_St1 = new VF.Stave(Vocal_St1.x, Vocal_St1.y + 120, nHeadMargin + nStaveWidth).setContext(ctx);
const Guitar1_St1 = new VF.Stave(Vocal_St1.x, Vocal_St1.y + 150, nHeadMargin + nStaveWidth).setContext(ctx);
Guitar1_St1.addClef("treble").setContext(ctx);
Guitar1_St1.addClef("treble").setContext(ctx);
Guitar1_St1.addTimeSignature('4/4').setContext(ctx);
Guitar1_St1.addTimeSignature('4/4').setContext(ctx);
Guitar1_St1.addKeySignature('D').setContext(ctx);
Guitar1_St1.addKeySignature('D').setContext(ctx);
Guitar1_St1.draw();
Guitar1_St1.draw();
const Guitar1_St1_notes_1 = [
  new VF.StaveNote({ keys: ["b/4"], duration: "2r" }),
  new VF.StaveNote({ keys: ["b/4"], duration: "4r" }),
  new VF.StaveNote({ keys: ["b/4"], duration: "8r" }),
  new VF.StaveNote({ keys: ["c/5"], duration: "16", stem_direction: -1 }),
  new VF.StaveNote({ keys: ["c/5"], duration: "16", stem_direction: -1 }),
];
const Guitar1_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"}),
  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, [3, 4]);
allUniqueIds = updateAllUniqueIds(UniqueIds);
const Guitar1_St1_beam_1 = new VF.Beam([Guitar1_St1_notes_1[3], Guitar1_St1_notes_1[4]]);
var Guitar1_St1_Voice_1 = new VF.Voice({ num_beats: 4, beat_value: 4 });
Guitar1_St1_Voice_1.setStrict(true);
Guitar1_St1_Voice_1.addTickables(Guitar1_St1_notes_1);
var Guitar1_St1_Voice_2 = new VF.Voice({ num_beats: 4, beat_value: 4 });
Guitar1_St1_Voice_2.setStrict(true);
Guitar1_St1_Voice_2.addTickables(Guitar1_St1_notes_2);
var formatterGuitar1_St1 = new VF.Formatter().joinVoices([Guitar1_St1_Voice_1, Guitar1_St1_Voice_2]);
formatterGuitar1_St1.format([Guitar1_St1_Voice_1, Guitar1_St1_Voice_2], nStaveWidth - 40 - 10);
Guitar1_St1_Voice_1.draw(ctx, Guitar1_St1);
Guitar1_St1_Voice_2.draw(ctx, Guitar1_St1);
Guitar1_St1_beam_1.setContext(ctx).draw();
shiftGuitar1_1st= addShift(
  Guitar1_St1_notes_1,
  [  3,  4,  3],
  [1.8, 1.8, -1]
);


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);
524行目: 587行目:


const Guitar1_Tab_St1 = new VF.Stave(Guitar1_St1.x, Guitar1_St1.y + 120, nHeadMargin + nStaveWidth).setContext(ctx);
const Guitar1_Tab_St1 = new VF.Stave(Guitar1_St1.x, Guitar1_St1.y + 120, nHeadMargin + nStaveWidth).setContext(ctx);
Guitar1_Tab1.draw();
Guitar1_Tab_St1.draw();


Stave9Pos.x = Guitar1_Tab_St1.x;
Guitar1tab_1st_tabmark.x = Guitar1_Tab_St1.x;
Stave9Pos.y = Guitar1_Tab_St1.y;
Guitar1tab_1st_tabmark.y = Guitar1_Tab_St1.y;


var connector9_2 = new VF.StaveConnector(Guitar1_St1, Guitar1_Tab_St1);
var Guitar1Connector_St1_L = new VF.StaveConnector(Guitar1_St1, Guitar1_Tab_St1);
connector9_2.setType(VF.StaveConnector.type.BRACKET);
Guitar1Connector_St1_L.setType(VF.StaveConnector.type.BRACKET);
connector9_2.setContext(ctx);
Guitar1Connector_St1_L.setContext(ctx);
connector9_2.draw();
Guitar1Connector_St1_L.draw();


Guitar1Inst.x = Vocal_St1.x - 30;
Guitar1Inst.x = Vocal_St1.x - 30;
538行目: 601行目:


const Guitar1_Tab_St1_1 = new VF.Stave(Guitar1_Tab_St1.x + nHeadMargin + 20, Guitar1_Tab_St1.y, 0).setContext(ctx);
const Guitar1_Tab_St1_1 = new VF.Stave(Guitar1_Tab_St1.x + nHeadMargin + 20, Guitar1_Tab_St1.y, 0).setContext(ctx);
Guitar1_Tab1_St1_1.setBegBarType(VF.Barline.type.NONE);
Guitar1_Tab_St1_1.setBegBarType(VF.Barline.type.NONE);
Guitar1_Tab1_St1_1.setEndBarType(VF.Barline.type.NONE);
Guitar1_Tab_St1_1.setEndBarType(VF.Barline.type.NONE);
Guitar1_Tab1_St1_1.draw();
Guitar1_Tab_St1_1.draw();


Guitar1tab_1st.x = Guitar1_Tab1_St1_1.x
Guitar1tab_1st.x = Guitar1_Tab_St1_1.x
Guitar1tab_1st.y = Guitar1_Tab1_St1_1.y
Guitar1tab_1st.y = Guitar1_Tab_St1_1.y
 
const Guitar1_Tab_St1_notes_1 = [
  new VF.StaveNote({ keys: ["f/5"], duration: "2r" }),
 
  new VF.StaveNote({ keys: ["c/5"], duration: "4r" }),
 
  new VF.StaveNote({ keys: ["c/5"], duration: "8r" }),
  new VF.StaveNote({ keys: ["e/5"], duration: "16", stem_direction: -1 }),
  new VF.StaveNote({ keys: ["e/5"], duration: "16", stem_direction: -1 }),
];
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"}),
 
  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_Tab_St1_notes_1, [3, 4]);
allUniqueIds = updateAllUniqueIds(UniqueIds);
 
const Guitar1_Tab_St1_beam_1 = new VF.Beam([Guitar1_Tab_St1_notes_1[3], Guitar1_Tab_St1_notes_1[4]]);
 
var Guitar1_Tab_St1_Voice_1 = new VF.Voice({ num_beats: 4, beat_value: 4 });
Guitar1_Tab_St1_Voice_1.setStrict(true);
Guitar1_Tab_St1_Voice_1.addTickables(Guitar1_Tab_St1_notes_1);
 
var Guitar1_Tab_St1_Voice_2 = new VF.Voice({ num_beats: 4, beat_value: 4 });
Guitar1_Tab_St1_Voice_2.setStrict(true);
Guitar1_Tab_St1_Voice_2.addTickables(Guitar1_Tab_St1_notes_2);
 
var formatterGuitar1_Tab_St1 = new VF.Formatter().joinVoices([Guitar1_Tab_St1_Voice_1, Guitar1_Tab_St1_Voice_2]);
formatterGuitar1_Tab_St1.format([Guitar1_Tab_St1_Voice_1, Guitar1_Tab_St1_Voice_2], nStaveWidth - 40 - 10);
Guitar1_Tab_St1_Voice_1.draw(ctx, Guitar1_Tab_St1_1);
Guitar1_Tab_St1_Voice_2.draw(ctx, Guitar1_Tab_St1_1);
 
Guitar1_Tab_St1_beam_1.setContext(ctx).draw();
 
shiftGuitar1tab_1st= addShift(
  Guitar1_Tab_St1_notes_1,
  [  3,  4,  3],
  [0.8, 0.8, -2]
);


const Guitar1_Tab_St2 = new VF.Stave(Guitar1_Tab_St1.width + Guitar1_Tab_St1.x, Guitar1_Tab_St1.y, nStaveWidth).setContext(ctx);
const Guitar1_Tab_St2 = new VF.Stave(Guitar1_Tab_St1.width + Guitar1_Tab_St1.x, Guitar1_Tab_St1.y, nStaveWidth).setContext(ctx);
550行目: 670行目:
Guitar1tab_2st.x = Guitar1_Tab_St2.x
Guitar1tab_2st.x = Guitar1_Tab_St2.x
Guitar1tab_2st.y = Guitar1_Tab_St2.y
Guitar1tab_2st.y = Guitar1_Tab_St2.y
var Guitar1Connector_St2_L = new VF.StaveConnector(Guitar1_St2, Guitar1_Tab_St2);
Guitar1Connector_St2_L.setType(VF.StaveConnector.type.SINGLE);
Guitar1Connector_St2_L.setContext(ctx);
Guitar1Connector_St2_L.draw();


const Guitar1_Tab_St3 = new VF.Stave(Guitar1_Tab_St2.width + Guitar1_Tab_St2.x, Guitar1_Tab_St1.y, nStaveWidth).setContext(ctx);
const Guitar1_Tab_St3 = new VF.Stave(Guitar1_Tab_St2.width + Guitar1_Tab_St2.x, Guitar1_Tab_St1.y, nStaveWidth).setContext(ctx);
556行目: 681行目:
Guitar1tab_3st.x = Guitar1_Tab_St3.x
Guitar1tab_3st.x = Guitar1_Tab_St3.x
Guitar1tab_3st.y = Guitar1_Tab_St3.y
Guitar1tab_3st.y = Guitar1_Tab_St3.y
var Guitar1Connector_St3_L = new VF.StaveConnector(Guitar1_St3, Guitar1_Tab_St3);
Guitar1Connector_St3_L.setType(VF.StaveConnector.type.SINGLE);
Guitar1Connector_St3_L.setContext(ctx);
Guitar1Connector_St3_L.draw();


const Guitar1_Tab_St4 = new VF.Stave(Guitar1_Tab_St3.width + Guitar1_Tab_St3.x, Guitar1_Tab_St1.y, nStaveWidth).setContext(ctx);
const Guitar1_Tab_St4 = new VF.Stave(Guitar1_Tab_St3.width + Guitar1_Tab_St3.x, Guitar1_Tab_St1.y, nStaveWidth).setContext(ctx);
562行目: 692行目:
Guitar1tab_4st.x = Guitar1_Tab_St4.x
Guitar1tab_4st.x = Guitar1_Tab_St4.x
Guitar1tab_4st.y = Guitar1_Tab_St4.y
Guitar1tab_4st.y = Guitar1_Tab_St4.y
var Guitar1Connector_St4_L = new VF.StaveConnector(Guitar1_St4, Guitar1_Tab_St4);
Guitar1Connector_St4_L.setType(VF.StaveConnector.type.SINGLE);
Guitar1Connector_St4_L.setContext(ctx);
Guitar1Connector_St4_L.draw();
var Guitar1Connector_St4_R = new VF.StaveConnector(Guitar1_St4, Guitar1_Tab_St4);
Guitar1Connector_St4_R.setType(VF.StaveConnector.type.SINGLE_RIGHT);
Guitar1Connector_St4_R.setContext(ctx);
Guitar1Connector_St4_R.draw();


const Guitar1_vTab_St1 = new VF.Stave(Guitar1_St1.x, Guitar1_St1.y + 110, nHeadMargin + nStaveWidth).setContext(ctx);
const Guitar1_vTab_St1 = new VF.Stave(Guitar1_St1.x, Guitar1_St1.y + 110, nHeadMargin + nStaveWidth).setContext(ctx);
for (var i = 0; i < 5; i++) {
for (var i = 0; i < 5; i++) {
   if (i == 0) continue;
   if (i == 0) continue;
   Guitar1_tab1.setConfigForLine(i, {visible: false} );
   Guitar1_vTab_St1.setConfigForLine(i, {visible: false} );
}
}
Guitar1_tab1.draw();
Guitar1_vTab_St1.draw();


const Guitar1_vTab_St2 = new VF.Stave(Guitar1_vTab_St1.width + Guitar1_vTab_St1.x, Guitar1_vTab_St1.y, nStaveWidth).setContext(ctx);
const Guitar1_vTab_St2 = new VF.Stave(Guitar1_vTab_St1.width + Guitar1_vTab_St1.x, Guitar1_vTab_St1.y, nStaveWidth).setContext(ctx);
591行目: 731行目:
Guitar1_vTab_St4.draw();
Guitar1_vTab_St4.draw();


const Guitar2_St1 = new VF.Stave(Guitar1_Tab1.x, Guitar1_Tab1.y + 120, nHeadMargin + nStaveWidth).setContext(ctx);
 
const Guitar2_St1 = new VF.Stave(Guitar1_Tab_St1.x, Guitar1_Tab_St1.y + 120, nHeadMargin + nStaveWidth).setContext(ctx);
Guitar2_St1.addClef("treble").setContext(ctx);
Guitar2_St1.addClef("treble").setContext(ctx);
Guitar2_St1.addTimeSignature('4/4').setContext(ctx);
Guitar2_St1.addTimeSignature('4/4').setContext(ctx);
610行目: 751行目:
const Guitar2_St4 = new VF.Stave(Guitar2_St3.width + Guitar2_St3.x, Guitar2_St3.y, nStaveWidth).setContext(ctx);
const Guitar2_St4 = new VF.Stave(Guitar2_St3.width + Guitar2_St3.x, Guitar2_St3.y, nStaveWidth).setContext(ctx);
Guitar2_St4.draw();
Guitar2_St4.draw();


const Guitar2_Tab_St1_1 = new VF.Stave(Guitar2_St1.x + nHeadMargin + 20, Guitar2_St1.y + 120, 0).setContext(ctx);
const Guitar2_Tab_St1_1 = new VF.Stave(Guitar2_St1.x + nHeadMargin + 20, Guitar2_St1.y + 120, 0).setContext(ctx);
623行目: 763行目:
Guitar2tab_1st.y = Guitar2_Tab_St1_1.y;
Guitar2tab_1st.y = Guitar2_Tab_St1_1.y;


Guitar2Tab1.x = Guitar2_Tab1.x;
Guitar2tab_1st_tabmark.x = Guitar2_Tab_St1.x;
Guitar2Tab1.y = Guitar2_Tab1.y;
Guitar2tab_1st_tabmark.y = Guitar2_Tab_St1.y;
 
var Guitar2Connector_St1_L = new VF.StaveConnector(Guitar2_St1, Guitar2_Tab_St1);
Guitar2Connector_St1_L.setType(VF.StaveConnector.type.BRACKET);
Guitar2Connector_St1_L.setContext(ctx);
Guitar2Connector_St1_L.draw();


const Guitar2_Tab_St2 = new VF.Stave(Guitar2_Tab_St1.width + Guitar2_Tab_St1.x, Guitar2_Tab_St1.y, nStaveWidth).setContext(ctx);
const Guitar2_Tab_St2 = new VF.Stave(Guitar2_Tab_St1.width + Guitar2_Tab_St1.x, Guitar2_Tab_St1.y, nStaveWidth).setContext(ctx);
Guitar2_Tab2.draw();
Guitar2_Tab_St2.draw();
 


const Guitar2_Tab_St2_1 = new VF.Stave(Guitar2_Tab_St1.width + Guitar2_Tab_St1.x + 45, Guitar2_Tab_St1.y, 0).setContext(ctx);
const Guitar2_Tab_St2_1 = new VF.Stave(Guitar2_Tab_St1.width + Guitar2_Tab_St1.x + 45, Guitar2_Tab_St1.y, 0).setContext(ctx);
637行目: 781行目:
Guitar2tab_2st.x = Guitar2_Tab_St2.x;
Guitar2tab_2st.x = Guitar2_Tab_St2.x;
Guitar2tab_2st.y = Guitar2_Tab_St2.y;
Guitar2tab_2st.y = Guitar2_Tab_St2.y;
var Guitar2Connector_St2_L = new VF.StaveConnector(Guitar2_St2, Guitar2_Tab_St2);
Guitar2Connector_St2_L.setType(VF.StaveConnector.type.SINGLE);
Guitar2Connector_St2_L.setContext(ctx);
Guitar2Connector_St2_L.draw();


const Guitar2_Tab_St3 = new VF.Stave(Guitar2_Tab_St2.width + Guitar2_Tab_St2.x, Guitar2_Tab_St2.y, nStaveWidth).setContext(ctx);
const Guitar2_Tab_St3 = new VF.Stave(Guitar2_Tab_St2.width + Guitar2_Tab_St2.x, Guitar2_Tab_St2.y, nStaveWidth).setContext(ctx);
644行目: 793行目:
Guitar2tab_3st.y = Guitar2_Tab_St3.y;
Guitar2tab_3st.y = Guitar2_Tab_St3.y;


var Guitar2Connector_St3_L = new VF.StaveConnector(Guitar2_St3, Guitar2_Tab_St3);
Guitar2Connector_St3_L.setType(VF.StaveConnector.type.SINGLE);
Guitar2Connector_St3_L.setContext(ctx);
Guitar2Connector_St3_L.draw();


const Guitar2_Tab_St4 = new VF.Stave(Guitar2_Tab_St3.width + Guitar2_Tab_St3.x, Guitar2_Tab_St3.y, nStaveWidth).setContext(ctx);
const Guitar2_Tab_St4 = new VF.Stave(Guitar2_Tab_St3.width + Guitar2_Tab_St3.x, Guitar2_Tab_St3.y, nStaveWidth).setContext(ctx);
651行目: 804行目:
Guitar2tab_4st.y = Guitar2_Tab_St4.y;
Guitar2tab_4st.y = Guitar2_Tab_St4.y;


var Guitar2_connect = new VF.StaveConnector(Guitar2_St1, Guitar2_Tab_St1);
var Guitar2Connector_St4_L = new VF.StaveConnector(Guitar2_St4, Guitar2_Tab_St4);
Guitar2_connect.setType(VF.StaveConnector.type.BRACKET);
Guitar2Connector_St4_L.setType(VF.StaveConnector.type.SINGLE);
Guitar2_connect.setContext(ctx);
Guitar2Connector_St4_L.setContext(ctx);
Guitar2_connect.draw();
Guitar2Connector_St4_L.draw();
 
var Guitar2Connector_St4_R = new VF.StaveConnector(Guitar2_St4, Guitar2_Tab_St4);
Guitar2Connector_St4_R.setType(VF.StaveConnector.type.SINGLE_RIGHT);
Guitar2Connector_St4_R.setContext(ctx);
Guitar2Connector_St4_R.draw();


const Guitar2_vTab_St1 = new VF.Stave(Guitar2_Tab_St1.x, Guitar2_Tab_St1.y - 10, nHeadMargin + nStaveWidth).setContext(ctx);
const Guitar2_vTab_St1 = new VF.Stave(Guitar2_Tab_St1.x, Guitar2_Tab_St1.y - 10, nHeadMargin + nStaveWidth).setContext(ctx);
685行目: 843行目:


Guitar2Inst.x = Guitar2_St1.x - 30;
Guitar2Inst.x = Guitar2_St1.x - 30;
Guitar2Inst.y = Guitar2_St1.y + ((Guitar2_Tab1.y - Guitar2_St1.y) / 2) + 90;  
Guitar2Inst.y = Guitar2_St1.y + ((Guitar2_Tab_St1.y - Guitar2_St1.y) / 2) + 90;  


const Base_St1 = new VF.Stave(Guitar2_Tab1.x, Guitar2_Tab1.y + 120, nHeadMargin + nStaveWidth).setContext(ctx);
const Base_St1 = new VF.Stave(Guitar2_Tab_St1.x, Guitar2_Tab_St1.y + 120, nHeadMargin + nStaveWidth).setContext(ctx);
Base_St1.addClef("bass").setContext(ctx);
Base_St1.addClef("bass").setContext(ctx);
Base_St1.addTimeSignature('4/4').setContext(ctx);
Base_St1.addTimeSignature('4/4').setContext(ctx);
702行目: 860行目:
Base_St4.draw();
Base_St4.draw();


const Base_Tab1 = new VF.Stave(Base_St1.x, Base_St1.y + 120, nHeadMargin + nStaveWidth).setContext(ctx);
const Base_Tab_St1 = new VF.Stave(Base_St1.x, Base_St1.y + 120, nHeadMargin + nStaveWidth).setContext(ctx);
Base_Tab1.setEndBarType(VF.Barline.type.NONE);
Base_Tab_St1.setEndBarType(VF.Barline.type.NONE);
for (var i = 0; i < 5; i++) {
for (var i = 0; i < 5; i++) {
   if (i != 0) continue;
   if (i != 0) continue;
   Base_Tab1.setConfigForLine(i, {visible: false} );
   Base_Tab_St1.setConfigForLine(i, {visible: false} );
}
}
Base_Tab1.draw();
Base_Tab_St1.draw();


BaseTab1.x = Base_Tab1.x;
Basetab_1st_tabmark.x = Base_Tab_St1.x;
BaseTab1.y = Base_Tab1.y;
Basetab_1st_tabmark.y = Base_Tab_St1.y;


BaseInst.x = Base_St1.x - 30;
BaseInst.x = Base_St1.x - 30;
BaseInst.y = Base_St1.y + ((Base_Tab1.y - Base_St1.y) / 2) + 90;  
BaseInst.y = Base_St1.y + ((Base_Tab_St1.y - Base_St1.y) / 2) + 90;
 
StaveBase1 = Base_Tab_St1;


StaveBase1 = Base_Tab1;
var BaseConnector_St1_L = new VF.StaveConnector(Base_St1, Base_Tab_St1);
BaseConnector_St1_L.setType(VF.StaveConnector.type.BRACKET);
BaseConnector_St1_L.setContext(ctx);
BaseConnector_St1_L.draw();


const Base_Tab2 = new VF.Stave(Base_Tab1.width + Base_Tab1.x, Base_Tab1.y, nStaveWidth).setContext(ctx);
const Base_Tab_St2 = new VF.Stave(Base_Tab_St1.width + Base_Tab_St1.x, Base_Tab_St1.y, nStaveWidth).setContext(ctx);
Base_Tab2.setBegBarType(VF.Barline.type.NONE);
Base_Tab_St2.setBegBarType(VF.Barline.type.NONE);
Base_Tab2.setEndBarType(VF.Barline.type.NONE);
Base_Tab_St2.setEndBarType(VF.Barline.type.NONE);
for (var i = 0; i < 5; i++) {
for (var i = 0; i < 5; i++) {
   if (i != 0) continue;
   if (i != 0) continue;
   Base_Tab2.setConfigForLine(i, {visible: false} );
   Base_Tab_St2.setConfigForLine(i, {visible: false} );
}
}
Base_Tab2.draw();
Base_Tab_St2.draw();
 
StaveBase2 = Base_Tab_St2;


StaveBase2 = Base_Tab2;
var BaseConnector_St2_L = new VF.StaveConnector(Base_St2, Base_Tab_St2);
BaseConnector_St2_L.setType(VF.StaveConnector.type.SINGLE);
BaseConnector_St2_L.setContext(ctx);
BaseConnector_St2_L.draw();


const Base_Tab3 = new VF.Stave(Base_Tab2.width + Base_Tab2.x, Base_Tab2.y, nStaveWidth).setContext(ctx);
const Base_Tab_St3 = new VF.Stave(Base_Tab_St2.width + Base_Tab_St2.x, Base_Tab_St2.y, nStaveWidth).setContext(ctx);
Base_Tab3.setBegBarType(VF.Barline.type.NONE);
Base_Tab_St3.setBegBarType(VF.Barline.type.NONE);
Base_Tab3.setEndBarType(VF.Barline.type.NONE);
Base_Tab_St3.setEndBarType(VF.Barline.type.NONE);
for (var i = 0; i < 5; i++) {
for (var i = 0; i < 5; i++) {
   if (i != 0) continue;
   if (i != 0) continue;
   Base_Tab3.setConfigForLine(i, {visible: false} );
   Base_Tab_St3.setConfigForLine(i, {visible: false} );
}
}
Base_Tab3.draw();
Base_Tab_St3.draw();
 
StaveBase3 = Base_Tab_St3;


StaveBase3 = Base_Tab3;
var BaseConnector_St3_L = new VF.StaveConnector(Base_St3, Base_Tab_St3);
BaseConnector_St3_L.setType(VF.StaveConnector.type.SINGLE);
BaseConnector_St3_L.setContext(ctx);
BaseConnector_St3_L.draw();


const Base_Tab4 = new VF.Stave(Base_Tab3.width + Base_Tab3.x, Base_Tab3.y, nStaveWidth).setContext(ctx);
const Base_Tab_St4 = new VF.Stave(Base_Tab_St3.width + Base_Tab_St3.x, Base_Tab_St3.y, nStaveWidth).setContext(ctx);
Base_Tab4.setBegBarType(VF.Barline.type.NONE);
Base_Tab_St4.setBegBarType(VF.Barline.type.NONE);
Base_Tab4.setEndBarType(VF.Barline.type.NONE);
Base_Tab_St4.setEndBarType(VF.Barline.type.NONE);
for (var i = 0; i < 5; i++) {
for (var i = 0; i < 5; i++) {
   if (i != 0) continue;
   if (i != 0) continue;
   Base_Tab4.setConfigForLine(i, {visible: false} );
   Base_Tab_St4.setConfigForLine(i, {visible: false} );
}
}
Base_Tab4.draw();
Base_Tab_St4.draw();
 
StaveBase4 = Base_Tab_St4;


StaveBase4 = Base_Tab4;
var BaseConnector_St4_L = new VF.StaveConnector(Base_St4, Base_Tab_St4);
BaseConnector_St4_L.setType(VF.StaveConnector.type.SINGLE);
BaseConnector_St4_L.setContext(ctx);
BaseConnector_St4_L.draw();


var Base_connect = new VF.StaveConnector(Base_St1, Base_Tab1);
var BaseConnector_St4_R = new VF.StaveConnector(Base_St4, Base_Tab_St4);
Base_connect.setType(VF.StaveConnector.type.BRACKET);
BaseConnector_St4_R.setType(VF.StaveConnector.type.SINGLE_RIGHT);
Base_connect.setContext(ctx);
BaseConnector_St4_R.setContext(ctx);
Base_connect.draw();
BaseConnector_St4_R.draw();


const Drum_St1 = new VF.Stave(Base_Tab1.x, Base_Tab1.y + 120, nHeadMargin + nStaveWidth).setContext(ctx);
const Drum_St1 = new VF.Stave(Base_Tab_St1.x, Base_Tab_St1.y + 120, nHeadMargin + nStaveWidth).setContext(ctx);
Drum_St1.addClef("bass").setContext(ctx);
Drum_St1.addClef("bass").setContext(ctx);
Drum_St1.addTimeSignature('4/4').setContext(ctx);
Drum_St1.addTimeSignature('4/4').setContext(ctx);
764行目: 942行目:
DrumInst.y = Drum_St1.y + 90;  
DrumInst.y = Drum_St1.y + 90;  


const Drum_St1_1 = new VF.Stave(nHeadMargin + Base_Tab1.x, Base_Tab1.y + 120, 0).setContext(ctx);
const Drum_St1_1 = new VF.Stave(nHeadMargin + Base_Tab_St1.x, Base_Tab_St1.y + 120, 0).setContext(ctx);
Drum_St1_1.setBegBarType(VF.Barline.type.NONE);
Drum_St1_1.setBegBarType(VF.Barline.type.NONE);
Drum_St1_1.setEndBarType(VF.Barline.type.NONE);
Drum_St1_1.setEndBarType(VF.Barline.type.NONE);
Drum_St1_1.draw();
Drum_St1_1.draw();


const Drum_St1_2 = new VF.Stave(nHeadMargin + Base_Tab1.x, Base_Tab1.y + 120, 0).setContext(ctx);
const Drum_St1_2 = new VF.Stave(nHeadMargin + Base_Tab_St1.x, Base_Tab_St1.y + 120, 0).setContext(ctx);
Drum_St1_2.setBegBarType(VF.Barline.type.NONE);
Drum_St1_2.setBegBarType(VF.Barline.type.NONE);
Drum_St1_2.setEndBarType(VF.Barline.type.NONE);
Drum_St1_2.setEndBarType(VF.Barline.type.NONE);
841行目: 1,019行目:
     textContent: ["Vocal"], // 必須文字列
     textContent: ["Vocal"], // 必須文字列
     strID: "VocalText", // 必須
     strID: "VocalText", // 必須
     Stave_x: Vocal.x,
     Stave_x: VocalInst.x,
     Stave_y: Vocal.y,
     Stave_y: VocalInst.y,
     fontFamily: "Arial, sans-serif",
     fontFamily: "Arial, sans-serif",
     fontSize: "20pt",
     fontSize: "20pt",
863行目: 1,041行目:
     textContent: ["@"], // 必須文字列
     textContent: ["@"], // 必須文字列
     strID: "EGuitarTab", // 必須
     strID: "EGuitarTab", // 必須
     Stave_x: Stave9Pos.x,
     Stave_x: Guitar1tab_1st_tabmark.x,
     Stave_y: Stave9Pos.y,
     Stave_y: Guitar1tab_1st_tabmark.y,
     Stave_x_Offset: 10,
     Stave_x_Offset: 10,
     Stave_y_Offset: 80,
     Stave_y_Offset: 80,
870行目: 1,048行目:
};
};
insertTextToSVG(EGuitarTab_options);
insertTextToSVG(EGuitarTab_options);
var Guitar1_st1_option = {
    textContent: ["\uFF86", "\uFF86", "┌── M ──┐"], // 必須文字列
    strID: "Guitar1_st1", // 必須
    Stave_x_Offset: 0,
    Stave_y_Offset: 0,
    fontSize: 40,
    fontFamily: "YonetMuFL, Arial", // オプション、デフォルトは"Bravura, Arial"
    shift_x: [
{x:shiftGuitar1_1st[0].x, y:shiftGuitar1_1st[0].y},
{x:shiftGuitar1_1st[1].x, y:shiftGuitar1_1st[1].y},
{x:shiftGuitar1_1st[2].x - 12, y:shiftGuitar1_1st[2].y},
],
    IsOffset_x_Abs: true
};
insertTextToSVG(Guitar1_st1_option);


var EGuitar2Text_options = {
var EGuitar2Text_options = {
885行目: 1,079行目:
     textContent: ["@"], // 必須文字列
     textContent: ["@"], // 必須文字列
     strID: "EGuitar2Tab", // 必須
     strID: "EGuitar2Tab", // 必須
     Stave_x: Guitar2Tab1.x,
     Stave_x: Guitar2tab_1st_tabmark.x,
     Stave_y: Guitar2Tab1.y,
     Stave_y: Guitar2tab_1st_tabmark.y,
     Stave_x_Offset: 10,
     Stave_x_Offset: 10,
     Stave_y_Offset: 80,
     Stave_y_Offset: 80,
892行目: 1,086行目:
};
};
insertTextToSVG(EGuitar2Tab_options);
insertTextToSVG(EGuitar2Tab_options);
var Guitar1tab_st1_option = {
    textContent: ["\uFF86", "\uFF86", "┌── M ──┐"], // 必須文字列
    strID: "Guitar1tab_st1", // 必須
    Stave_x_Offset: 0,
    Stave_y_Offset: 0,
    fontSize: 40,
    fontFamily: "YonetMuFL, Arial", // オプション、デフォルトは"Bravura, Arial"
    shift_x: [
{x:shiftGuitar1tab_1st[0].x, y:shiftGuitar1tab_1st[0].y},
{x:shiftGuitar1tab_1st[1].x, y:shiftGuitar1tab_1st[1].y},
{x:shiftGuitar1tab_1st[2].x - 12, y:shiftGuitar1tab_1st[2].y},
],
    IsOffset_x_Abs: true
};
insertTextToSVG(Guitar1tab_st1_option);


var BaseText_options = {
var BaseText_options = {
907行目: 1,117行目:
     textContent: ["@"], // 必須文字列
     textContent: ["@"], // 必須文字列
     strID: "BaseTab", // 必須
     strID: "BaseTab", // 必須
     Stave_x: BaseTab1.x,
     Stave_x: Basetab_1st_tabmark.x,
     Stave_y: BaseTab1.y,
     Stave_y: Basetab_1st_tabmark.y,
     Stave_x_Offset: 10,
     Stave_x_Offset: 10,
     Stave_y_Offset: 90,
     Stave_y_Offset: 90,

2024年4月19日 (金) 18:54時点における最新版

VexFlow 使い方に戻る。

概要

 

 

タブ譜 ミュート


 コードは以下のとおりです。


<div id="yonet202404Mid_Output01"></div>
<script>


 

 

VexFlow 使い方に戻る。