0xfe / vexflow

A JavaScript library for rendering music notation and guitar tablature.
http://www.vexflow.com
Other
3.91k stars 662 forks source link

Guitar tablature editor #87

Closed fernandojsg closed 11 years ago

fernandojsg commented 11 years ago

Hi all,

First of all congratulations for the great library you're developing. It's getting quite impressive. I used to check it some monthes ago and I didn't have so many features as I see today, so I decided to create something by myself for a custom guitar editor i'm developing. You can see it working in the following link: http://kile.stravaganza.org/lab/js/guitartab Basically you Add Tabs sections and using the mouse or the cursors you move around the tab lines and press which fret you want to play. You can use the shortcuts 'h', 's', 'v',.. for hammers, slides, vibrato.. etc.

The idea of this webapp is to allow flamenco guitarrist with low level of musical score theory to write down their songs instead of using simply textbased tabs.

Flamenco has also some special techniques like for example hitting the wood so I needed these special symbols too.

After checking your new advances I'm thinking about give a try and create a little parser for my data to vexflow syntax. Could you recommend me how to make it, I mean, as I'm not going to edit note but frets numbers I don't know if could be a good idea to create each note like a quarternote and each space a quarternote silencce... Also when I tried to use vextab format I found some problems while trying to create simple transcriptions with modifiers like for example something simple like: --0------ --2------ --2-h-3- --2------- --0------- ---------.

Should I use the vextab format? Or directly the vexflow syntax?

Sorry for the loooooooooong post :)

0xfe commented 11 years ago

Hi... Your editor looks very nice. Is it open source?

VexTab should be able to handle all kinds of complex notation. Your ASCII example can be represented as so:

tabstave notation=true
notes (0/5.2/4.2/3.2/2.0/1)h(4/3)

If you find that you can't represent something in VexTab, feel free to open an issue with me and I'll sort it out.

(You can use VexFlow directly too, but it's far more work than just converting to VexTab.)

Thanks, Mohit.

fernandojsg commented 11 years ago

Nice, so I'll try to convert it to the vextab notation and let's check how it works :D I just created the editor for fun and i'm planing to clean it up a little bit and upload here to github. As long as i'll have something working I'll let you know thank you very much

fernandojsg commented 11 years ago

By the way, will I've the same features using vextab as If i'll use vexflow directly, like for example playback?

0xfe commented 11 years ago

Playback is very raw and not in the source code. There are too many dependencies for me to feel comfortable with putting it in (because of the bloat.) When I have a cleaner version, I will push it to the repo.

That said, VexTab has some hooks to connect your own player if you need something in a hurry.

fernandojsg commented 11 years ago

Sorry I forgot the tab I got problems with, It wasn't the previous one, it was something like the following:

---------------
---2--h--3---
------0-------
--------------
--------------

Hitting a string in the middle of a hammer

0xfe commented 11 years ago

The easiest way to do this is to put the open string on a different voice:

tabstave notation=true
voice
  notes :q 2h3/2
voice
  notes :8 #0# 0/3

If you look at the standard notation score, you'll see that the 8th note rest pushes the open note in between the two quarter notes.

fernandojsg commented 11 years ago

Ouch! hehe So I think it's gonna be quite hard to create a automatic parser :D

0xfe commented 11 years ago

It shouldn't be too bad. If you don't care about standard notation, you can simply create one voice per string, and then translation should be similar to generating ASCII tab:

tabstave
voice
  notes :8
voice
  notes :q 2/2 h3/2
voice
  notes :8
voice
  notes :8 ## 0/3
voice
  notes :8
voice
  notes :8

On Thu, Jan 17, 2013 at 6:20 PM, kile notifications@github.com wrote:

Ouch! hehe So I think it's gonna be quite hard to create a automatic parser :D

— Reply to this email directly or view it on GitHubhttps://github.com/0xfe/vexflow/issues/87#issuecomment-12397361.

Mohit Muthanna [mohit (at) muthanna (uhuh) com]