-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WORK-IN-PROGRESS: user beaming -- DO NOT MERGE #124
base: master
Are you sure you want to change the base?
Conversation
Thanks for digging in -- the |
Thank you! That doesn't solve it immediately but puts me on a better path, I think. I'll keep working and pushing to this work-in-progress branch, and if I solve it I'll rebase and reopen a new branch. |
If that doesn't work, it's possible that The code in VexFlow: |
Hi @jzohrab -- how did this go? Need any help? |
Unfortunately I couldn’t sort it out and needed to move on to other things.
The branch has my various attempts. If you can complete it, that would be
super. Hopefully it’s not too hairy. Sorry I couldn’t work it out myself!
jz
El El mar, may. 4, 2021 a la(s) 3:27 a. m., Mohit Cheppudira <
***@***.***> escribió:
… Hi @jzohrab <https://github.com/jzohrab> -- how did this go? Need any
help?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#124 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAMPWDKCNTCN74WZRFRU3JLTL7DZDANCNFSM43NWILUA>
.
|
Looking at the commit history for
it looks like it may have been lost around (I'm not able to work on it at the moment, retinal issue :-( and it's hard to look at the screen) |
Hello, i made little modification in vextab-div.js to make the bracket command active for beam state whithout bracket command with this vextab code :
I get this rendering : Now with the bracket command in this vexTab code :
I get this result I am a former programmer, (since 1983, at the time I was writing programs in assembly language on paper) but I'm beginner with github, |
Hi Thomas, great job! At the moment I can’t program due to a vision issue.
But perhaps someone could implement it.
If you paste the section of code that you changed in a comment in this PR,
perhaps someone could make the change for you. At some point I’ll be able
to but I’m not sure when
Cheers! Jz
El El mié, may. 5, 2021 a la(s) 7:26 p. m., Thomas ***@***.***>
escribió:
… Hello, i made little modification in vextab-div.js to make the bracket
command active for beam state
whithout bracket command with this vextab code :
options space=50 font-face=petalumaScript beam-rests=false
tabstave notation=true tablature=false key=C clef=treble time=4/4
notes =|: :8 F/4 :q F/4 :8 F/4 tF/4 E/4 :q D/4
notes | :qd D/4 :8 F/4 F/4 A/4 G/4 F/4
I get this rendering :
[image: 2021-05-04_20h37_56]
<https://user-images.githubusercontent.com/5411049/117232731-09b65f00-ae22-11eb-8292-9103930ae5ec.png>
Now with the bracket command in this vexTab code :
options space=50 font-face=petalumaScript beam-rests=false
tabstave notation=true tablature=false key=C clef=treble time=4/4
notes =|: :8 F/4 :q F/4 :8 F/4 [ tF/4 E/4 ] :q D/4
notes | :qd D/4 :8 F/4 [ F/4 A/4 G/4 F/4 ]
I get this result
[image: 2021-05-06_04h11_26]
<https://user-images.githubusercontent.com/5411049/117232587-be9c4c00-ae21-11eb-8e78-fd8eb611ac15.png>
I am a former programmer, *(since 1983, at the time I was writing
programs in assembly language on paper)* but I'm beginner with github,
if you are interessed by this,i can give you my modification, but i dont
know how to do
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#124 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAMPWDPH7GVDKAWBZPXCWMDTMH46XANCNFSM43NWILUA>
.
|
in VexTab.prototype.parseStaveElements i get command open_beam and close beam, and i put it in this.artist property (TOMBOUL comment)
In createGroups function from generateBeams function
i add this prototype :
and in Artist.prototype.addStaveNote
I don’t know if that’s the best way to do it, but there’s the operating principle. And because i associated command beam one note, you can't have "] [" :
the close_beam "]" after :8 F/4 is associated with the next note (tF/4), but the following command "open_beam" overwrites the I think i can do best to have a real operating command "open" and "close", |
I think, it's possible to code this better, to give a real possibility of closing and opening beam, to produce correct beam with signature like 7/8 (can be, 2-2-3 or 2-3-2 or 3-2-2) or 9/8 (can be 3-3-3 or 2-2-2-3 and so on) etc .13/8 etc ...
I'm so sorry @jzohrab !!! take care of yourself ! |
Hi @0xfe and @tomboul, I've added the I haven't made any changes to the actual beaming code, though, as that's in the other vexflow repo and I wasn't sure if this is the best way to implement it ... perhaps Mohit can weigh in. So, the tests still show bad beaming because the Also, this PR's wip code now contains some redundant parts, my old code and tomboul's code. But it's a wip branch, so that's no issue. My sight's still not 100%, blurry right eye, but much better :-) Cheers all! jz |
Opening a draft PR hoping that someone with more experience can weigh in.
Currently, vextab doesn't support user-requested beaming. According to the jison, it should be allowed, eg:
Should produce something like beamed 32nd notes, followed by a quarter. The jison (https://github.com/0xfe/vextab/blob/master/src/vextab.jison#L232) refers to commands "open_beam" and "close_beam", but those aren't implemented in artist.coffee, and are ignored.
This wip PR changes the "if/else" to "switch/case" for executing commands, which fails when the user adds
[ ... ]
in vextab. I then implemented a bare-bone idea for keeping track of the beam groups, but it currently doesn't work, as the beams are rendered in addition to the existing note stems:I tried a few things like this:
but that didn't work (fails with
Note needs a TickContext assigned for an X-Value
)Hopefully someone can point out what's wrong with this primitive idea, and then beaming can be properly implemented (that is, if it's needed!).