「VexFlow test content」の版間の差分

提供:yonewiki
 
(同じ利用者による、間の3版が非表示)
142行目: 142行目:
stave1.setClef("treble").setContext(ctx);
stave1.setClef("treble").setContext(ctx);
stave1.setTimeSignature('4/4').setContext(ctx);
stave1.setTimeSignature('4/4').setContext(ctx);
stave1.setSection("A", 0);
//stave1.setBegBarType(4);//BarLine.type.REPEAT_BEGIN
stave1.setBegBarType(VF.Barline.type.REPEAT_BEGIN);//BarLine.type.REPEAT_BEGIN
stave1.draw();
stave1.draw();
//SINGLE:1, DOUBLE:2, END:3, REPEAT_BEGIN:4, REPEAT_END:5, REPEAT_BOTH:6, NONE:7
const gracenotes1 = [
  new VF.GraceNote({ keys: ['a/4', 'c/5', 'e/5'], duration: '8', slash: true })
  .addModifier(new VF.Accidental('n'), 0)
  .addModifier(new VF.Accidental('#'), 1)
  .addModifier(new VF.Accidental('b'), 2)
];


const notes1 = [
const notes1 = [
   new VF.StaveNote({ keys: ["a/5"], duration: "8" }),
   new VF.StaveNote({ keys: ["a/5"], duration: "1" }),
  new VF.StaveNote({ keys: ["e/5"], duration: "8" }),
  new VF.StaveNote({ keys: ["f/5"], duration: "8" }),
  new VF.StaveNote({ keys: ["g/5"], duration: "8" }),
  new VF.StaveNote({ keys: ["a/5"], duration: "8" }),
  new VF.StaveNote({ keys: ["e/5"], duration: "8" }),
  new VF.StaveNote({ keys: ["f/5"], duration: "8" }),
  new VF.StaveNote({ keys: ["g/5"], duration: "8" }),
];
];
notes1[4].addModifier(new VF.Articulation('a.').setPosition(3));
notes1[4].addModifier(new VF.GraceNoteGroup(gracenotes1, true), 0);
SteveNoteUniqueIds = getUniqueStaveNotesIds(notes1, [4]);
allFlagUniqueIds = updateAllFlagUniqueIds(SteveNoteUniqueIds);


UniqueIds = getUniqueNoteheadIds(notes1[0]);
//SteveNoteUniqueIds = getUniqueStaveNotesIds(notes1, [0]);
allUniqueIds = updateAllUniqueIds(UniqueIds);
//allFlagUniqueIds = updateAllFlagUniqueIds(SteveNoteUniqueIds);


UniqueIds = getUniqueNoteheadIds(notes1[1]);
//UniqueIds = getUniqueNoteheadIds(notes1[0]);
allUniqueIds = updateAllUniqueIds(UniqueIds);
//allUniqueIds = updateAllUniqueIds(UniqueIds);


var stave1Voice = new Vex.Flow.Voice({ num_beats: 4, beat_value: 4 });
var stave1Voice = new Vex.Flow.Voice({ num_beats: 4, beat_value: 4 });

2024年4月12日 (金) 22:28時点における最新版

概要