let formatter = new Vex.Flow.Formatter().format([hoverVoice], (40 * this.hoverNote.length));
--
--
You received this message because you are subscribed to the Google
Groups "vexflow" group.
To post to this group, send email to vex...@googlegroups.com
To unsubscribe from this group, send email to
vexflow+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/vexflow?hl=en
---
You received this message because you are subscribed to the Google Groups "vexflow" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vexflow+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
It's probably simpler if you don't use the formatter for this and position then notes manually (using TickContext.setX). E.g., this is how `Formatter.SimpleFormat` places notes for tests without using the main formatter:static SimpleFormat(notes, x = 0, { paddingBetween = 10 } = {}) {notes.reduce((x, note) => {note.addToModifierContext(new ModifierContext());const tick = new TickContext().addTickable(note).preFormat();const extra = tick.getExtraPx();tick.setX(x + extra.left);return x + tick.getWidth() + extra.right + paddingBetween;}, x);}}
On Thu, Sep 15, 2016 at 4:30 AM, <danielr...@gmail.com> wrote:
I'm currently working on a project that requires a horizontal grid, in which all of the quarter note StaveNotes, GhostNotes, and Rests fill the same horizontal space. I tried to achieve a horizontal space of 40 pixels for each element in a voice by using the following...--
let formatter = new Vex.Flow.Formatter().format([hoverVoice], (40 * this.hoverNote.length));
However, this just determines the average space per element. When there are StaveNotes, GhostNotes, and Rests in the voice StaveNotes take up more than 40 pixels and GhostNotes and Rests take up less than 40 pixels. Does anyone have any clues on how to make sure that each 1 beat element will take up the exact same horizontal space in a voice?
--
You received this message because you are subscribed to the Google
Groups "vexflow" group.
To post to this group, send email to vex...@googlegroups.com
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/vexflow?hl=en
---
You received this message because you are subscribed to the Google Groups "vexflow" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vexflow+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
var note = new Vex.Flow.StaveNote({ keys: ['b/4'], duration: "q", clef: 'treble'});;var tc = new Vex.Flow.TickContext()note.setTickContext(tc)tc.setX(10)note.draw();
It's probably simpler if you don't use the formatter for this and position then notes manually (using TickContext.setX). E.g., this is how `Formatter.SimpleFormat` places notes for tests without using the main formatter:static SimpleFormat(notes, x = 0, { paddingBetween = 10 } = {}) {notes.reduce((x, note) => {note.addToModifierContext(new ModifierContext());const tick = new TickContext().addTickable(note).preFormat();const extra = tick.getExtraPx();tick.setX(x + extra.left);return x + tick.getWidth() + extra.right + paddingBetween;}, x);}}
On Thu, Sep 15, 2016 at 4:30 AM, <danielr...@gmail.com> wrote:
I'm currently working on a project that requires a horizontal grid, in which all of the quarter note StaveNotes, GhostNotes, and Rests fill the same horizontal space. I tried to achieve a horizontal space of 40 pixels for each element in a voice by using the following...--
let formatter = new Vex.Flow.Formatter().format([hoverVoice], (40 * this.hoverNote.length));
However, this just determines the average space per element. When there are StaveNotes, GhostNotes, and Rests in the voice StaveNotes take up more than 40 pixels and GhostNotes and Rests take up less than 40 pixels. Does anyone have any clues on how to make sure that each 1 beat element will take up the exact same horizontal space in a voice?
--
You received this message because you are subscribed to the Google
Groups "vexflow" group.
To post to this group, send email to vex...@googlegroups.com
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/vexflow?hl=en
---
You received this message because you are subscribed to the Google Groups "vexflow" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vexflow+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
For more options, visit this group at
http://groups.google.com/group/vexflow?hl=en
---
You received this message because you are subscribed to the Google Groups "vexflow" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vexflow+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/vexflow?hl=en
---
You received this message because you are subscribed to the Google Groups "vexflow" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vexflow+unsubscribe@googlegroups.com.