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

提供:yonewiki
 
(同じ利用者による、間の15版が非表示)
515行目: 515行目:
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);
548行目: 607行目:
Guitar1tab_1st.x = Guitar1_Tab_St1_1.x
Guitar1tab_1st.x = Guitar1_Tab_St1_1.x
Guitar1tab_1st.y = Guitar1_Tab_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);
565行目: 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);
571行目: 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);
634行目: 765行目:
Guitar2tab_1st_tabmark.x = Guitar2_Tab_St1.x;
Guitar2tab_1st_tabmark.x = Guitar2_Tab_St1.x;
Guitar2tab_1st_tabmark.y = Guitar2_Tab_St1.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);
645行目: 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);
651行目: 792行目:
Guitar2tab_3st.x = Guitar2_Tab_St3.x;
Guitar2tab_3st.x = Guitar2_Tab_St3.x;
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);
658行目: 804行目:
Guitar2tab_4st.y = Guitar2_Tab_St4.y;
Guitar2tab_4st.y = Guitar2_Tab_St4.y;


var Guitar2Connector_St1_L = new VF.StaveConnector(Guitar2_St1, Guitar2_Tab_St1);
var Guitar2Connector_St4_L = new VF.StaveConnector(Guitar2_St4, Guitar2_Tab_St4);
Guitar2Connector_St1_L.setType(VF.StaveConnector.type.BRACKET);
Guitar2Connector_St4_L.setType(VF.StaveConnector.type.SINGLE);
Guitar2Connector_St1_L.setContext(ctx);
Guitar2Connector_St4_L.setContext(ctx);
Guitar2Connector_St1_L.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);
724行目: 875行目:


StaveBase1 = Base_Tab_St1;
StaveBase1 = Base_Tab_St1;
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_Tab_St2 = new VF.Stave(Base_Tab_St1.width + Base_Tab_St1.x, Base_Tab_St1.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);
735行目: 891行目:


StaveBase2 = Base_Tab_St2;
StaveBase2 = Base_Tab_St2;
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_Tab_St3 = new VF.Stave(Base_Tab_St2.width + Base_Tab_St2.x, Base_Tab_St2.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);
746行目: 907行目:


StaveBase3 = Base_Tab_St3;
StaveBase3 = Base_Tab_St3;
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_Tab_St4 = new VF.Stave(Base_Tab_St3.width + Base_Tab_St3.x, Base_Tab_St3.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);
758行目: 924行目:
StaveBase4 = Base_Tab_St4;
StaveBase4 = Base_Tab_St4;


var BaseConnector_St1_L = new VF.StaveConnector(Base_St1, Base_Tab_St1);
var BaseConnector_St4_L = new VF.StaveConnector(Base_St4, Base_Tab_St4);
BaseConnector_St1_L.setType(VF.StaveConnector.type.BRACKET);
BaseConnector_St4_L.setType(VF.StaveConnector.type.SINGLE);
BaseConnector_St1_L.setContext(ctx);
BaseConnector_St4_L.setContext(ctx);
BaseConnector_St1_L.draw();
BaseConnector_St4_L.draw();
 
var BaseConnector_St4_R = new VF.StaveConnector(Base_St4, Base_Tab_St4);
BaseConnector_St4_R.setType(VF.StaveConnector.type.SINGLE_RIGHT);
BaseConnector_St4_R.setContext(ctx);
BaseConnector_St4_R.draw();


const Drum_St1 = new VF.Stave(Base_Tab_St1.x, Base_Tab_St1.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);
877行目: 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 = {
899行目: 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 = {

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

VexFlow 使い方に戻る。

概要

 

 

タブ譜 ミュート


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


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


 

 

VexFlow 使い方に戻る。