Auto create of Harmonica TABs under notes

• Aug 2, 2012 - 10:39

Hi, I've just discovered your great programme and I love the way it imports bagpipe music from BWW files. I import the file then put text under each note to indicate the harmonica hole that should be blown or drawn. I know the power of this software is possibly being insulted but I for one as a beginner, need to do this to learn a new tune. Would it be possible to get MuseScore to automatically add the numbering when the user selects a type of harmonica, be it Hohner Highlander, Blues, chromatic etc, there are so many keys and scales that a hormonica can be made in its hard finding tabs to get a tune anotated correctly. The Hohner Highlander for instance has the mixilodian scale the A side has a flattened 7th on the notes draw 6 and 14 allowing pipe tunes to be played. I have manualy entered note numbers on 2 tunes that I have posted using the Ctrl +L to enter the notes as Lyrics you can see an example here
Many thanks for a very usefull application. Bob


Seems I saw a comment to this effect recently, but it's gone now, so I'll reiterate it - this sort of thing seems ideally suited to a plugin. If you or another harmonica player you know has any programming skills, you might look into what's involved in creating these, perhaps using the Recorder fingering plugin as a model.

In reply to by Marc Sabatella

Creating a plugin for harmonic should be easy. You could use the Recorder fingering to learn how to add a text to a note. The hard part is to compute the actual text, the fingering, you need to put below the note.

How would you compute this text? what do you need to compute it? The note pitch? Can you give a formula that give the fingering, or hole number for a given pitch? What does + and ~ means (draw and blow)? Can the be automatically computed too?

If not formula can be found, you can use a map pitch -> fingering maybe ?

Maybe this kind of table can help ?

In reply to by Nicolas

I have spent the evening looking at the code and pondering the complexity of compiling code for each key and type of harmonica and its too daunting for me. I will stick to the method I'm using, it takes a long time doing it by hand but I do get a result, if I tried to compile the code it would never be completed.

Thanks for all your kind response, and interest.


In reply to by bsmith

Just to clarify a possible misunderstanding:

You do NOT need to set up a developing environment or to be able to compile MuseScore source code yourself, etc..., for working on plugins.

You only need:

*) The standard MuseScore version installed and running
*) A text editor (at the very least, notepad, gedit, vi or whatever text editor your operating system comes with by default; a more programming-oriented text editor would be useful but it is not required)
*) Some initial knowledge of JavaScript
*) Lots of patience!

Then, you look at the text of the existing plugins as examples, maybe check the plugin development handbook page and try to write your own plugin.

Some previous programming experience would be useful, of course, but plugins (and scripting in general) are the right place to start building some experience from scratch: you cannot do any harm to MuseScore with them, you may mess your score up, but testing them on expendable scores reduces the risk.

If you have some spare time, it is definitely worth a try.


In reply to by Nicolas

I hope I have done it correctly, I have little knowledge about music so it looks like its showing on a different location on the staff. Because the application also plays the note when clicked I have tried to confirm the accuracy by playing the note on the harmonica.

It looks like I would have to transpose the notes up, if you look at the sample music for Dark Island the first note is +9 and is A on the first space up ?? . I have a lot to learn about reading music as well as Java script I think.

I have attached the template with my markup, to explain +6 mearns Blow hole 6 , ~6 means draw hole 6, I tried to use the - sign but the programme didn't like it.

I have also scanned the booklet that come with the instrument as it shows the note holes for the D side and the A side, so as you may see a plugin may be required for each key of harmonica, if I saw how you did the D side I'm sure I would be able to create one for the other keys " well maybe " I would give it a good try anyway, then go on to do it for Chromatic and diatonic types.

Thank you so much for taking an interest in this, your kind assistance is so much appreciated, Bob.

In reply to by Nicolas

Fantastic work ! I'm so grateful for your help, looking at the scripts I may manage to edit them for other key harmonicas. You have saved me so much time and effort and I'm sure other harmonica players will benefit greatly, I will spread the word.
I will test the TAbs out just to make sure its correct, it looks very good.

Best regards, Bob.

In reply to by bsmith

You just need to duplicate the D file and change the holes and shift variables. "Shift" is the MIDI pitch number of the first note in the "holes" array. The hole array is the text that should be display for a given pitch number. If you manage to add more keys, let me know and I will add them in the plugin. If you have more harmonica documentation, adding them should be easy.

In reply to by Nicolas

Thanks' Nicolas, I'll give it a try. I've discovered an error in the leaflett supplied by Hohner, they say to play the Scotland the Brave on the D side, the notation TABs are for the A side :). I've entered two more tunes and added them to the Harmonica group, upgraded to Pro status so that I can store more tunes on line for friends to try, and help support the MuseScore team.

In reply to by Nicolas

Nicolas, I require a little more assistance in seeing just what I'm doing wrong. I attempted to create one for the C Diatonic Harmonica that has 10 holes, each has a draw and blow function ( two notes on one hole ) . I tested it against a simple scale but it did not correctly tab the notes.

I have attached the scale I used, the Java Script and an image of the harmonica note layout, do you have the time to show me where I'm going wrong. I estimated the MIDI note numbers from a web site.

It made a big difference to understanding the file when loaded into Notepad++ instead of just notepad.


Attachment Size
Lee Oscar C.jpg 56.38 KB
Scales.mscz, 1.83 KB
Lee_Oscar_Diatonic_C .txt 1.62 KB

In reply to by bsmith

What's wrong exactly ?
the C in the middle of the staff is MIDI 72, the C below the staff is 60. (in G clef)
Which C is the first hole?

You also need to add all the intermediary notes C, C#, D, D# etc...)

Something like this should work, assuming the first C being under the staff

var holes = ["+1",  "",   "-1", "",   "+2",  "",   "",  "-2/+3",  "",  "",   "",   "-3",
            "+4",   "",   "-4", "",   "+5",  "-5", "",  "+6",     "",  "-6", "",   "-7",
             "+7",  "",   "-8",  "",  "+8",  "-9", "",  "+9",     "",  "-10", "",   "",

var shift = 60;

Without considering the bends. This looks like a good reference then:
would you use the same notation for bends, over blow etc... ?

In reply to by Nicolas

Thanks Nicolas, I have found that its my lack of music theory that is getting in the way. I'm a Bagpipe player, all we have to worry about are 10 fingers on 9 holes in a fixed key, I read bagpipe score without any difficulty, learning harmonica has opened a whole new can of worms :) . Thanks for your assistance, I will experiment further and read more until I understand better.

Once more you have been more than kind with your time and knowledge, Bob.

In reply to by bsmith

Nicolas, please just say if I'm taking up too much of your time, I don't want to be a pest.
In an effort to see the relationship between the note variables and the scale of the harmonica I have made a simple excel page, can you have a look and if there is a simple explanation,...................

Attachment Size

In reply to by bsmith

E# and F and B# and C are "the same", at least from a MIDI point of view. That's why they are not listed here:

I modified the spreadsheet, you can complete it online if you want…

Btw, it's Lee Oskar, not Oscar.

I update the plugin with the Diatonic C, a new font and some more fixes. See

In reply to by Nicolas

I do have more but felt I had taken up more than enough of your time, I have added info for the other 4 instruments I have and if you could add them at your leisure that would be fantastic, I enjoy adding the scores and I see a few have been downloaded by others so there is interest. I think the 12 hole chromatic slide harmonica may be a real challeng.

In reply to by Nicolas

Thanks Nicolas, I will download the plugins right away .
Having a look on the web it would appear a lesser than sign is added before the plus or minus and number to indicate the slide has been used, as in the scale below. The first sharp is in the G Major scale and is F#, it looks like a good convention to stick with, Thanks again, Bob.

C Major
+1 -1 +2 -2 +3 -3 -4 +4

G Major
G A B C D E F# G
+3 -3 -4 +4 -5 +6 <-6 +7

D Major
D E F# G A B C# D
-1 +2 <-2 +3 -3 -4 <+4 -5

A Major
A B C# D E F# G# A
-3 -4 <+4 -5 +6 <-6 <+7 -7

E Major
E F# G# A B C# D# E
+2 <-2 <+3 -3 -4 <+4 <-5 +6

B Major
B C# D# E F# G# A# B
-4 <+4 <-5 +6 <-6 <+7 <-7 -8

F Sharp Major
F# G# A# B C# D# E# F#
<-2 <+3 <-3 -4 <+4 <-5 <+6 <-6

D Flat Major
Db Eb Fb Gb Ab Bb C Db
<+1 <-1 <+2 <-2 <+3 <-3 +4 <+4

A Flat Major
Ab Bb C Db Eb F G Ab
<+3 <-3 +4 <+4 <-5 -6 +7 <+7

E Flat Major
Eb F G Ab Bb C D Eb
<-1 -2 +3 <+3 <-3 +4 -5 <-5

B Flat Major
Bb C D Eb F G A Bb
<-3 +4 -5 <-5 -6 +7 -7 <-7

F Major
F G A Bb C D E F
-2 +3 -3 <-3 +4 -5 +6 -6

In reply to by bsmith

Thinking about this, would we require a plugin for each key.

I've been looking at why I had trouble getting the numbers right, and looking at the keyboard layout I see what you mean about E# and B#, counting those as notes was a mistake.

I'm still working on this but still have a lot to learn.

Thanks again for your help, Bob.

In reply to by Nicolas

I've not tried playing this but it comes from a reliable site, I dont have the notes so will have to type it in. Here are the tabs for now, I will get it typed up asap. I cant belive your work rate :) as I see how involved you are in other issue solving, your a very busy Man.

Yesterday played on 12 hole slide chromatic
Song: 3 -2 -2 -3 -4 <4 -5 6 -6 6 -5 -5
Yesterday, all my troubles seemed so far away-
-5 -5 4 <-3 -3 3 <-3 -3 -3
Now it looks as though they're here to stay
3 -2 -3 3 -1 -2 -3 -3
Oh, I believe in yesterday

3 -2 -2 -3 -4 <4 -5 6 -6 6 -5 -5
Suddenly, I'm not half the man I used to be
-5 -5 4 <-3 -3 3 <-3 -3 -3
There's a shadow hanging over-- me.
3 -2 -3 3 -1 -2 -3 -3
Oh, yesterday came suddenly

-3 -3 -5 6 -6 6 -5 6 -5 5 -5 -3
Why she had to go I don't know she wouldn't say
-3 -3 -5 6 -6 6 -5 6 -5 5 6 -6 5 <-3 -3
I said something wrong, now I long for yesterday--------

3 -2 -2 -3 -4 <5 -5 6 -6 6 -5 -5
Yesterday, love was such an easy game to play
-5 -5 4 <-3 -3 3 <-3 -3 -3
Now I need a place to hide away-
3 -2 -3 3 -1 -2 -3 -3
Oh, I believe in yesterday

-3 -3 -5 6 -6 6 -5 6 -5 5 -5 -3
Why she had to go I don't know she wouldn't say
-3 -3 -5 6 -6 6 -5 6 -5 5 6 -6 5 <-3 -3
I said something wrong, now I long for yesterday--------

3 -2 -2 -3 -4 <5 -5 6 -6 6 -5 -5
Yesterday, love was such an easy game to play
-5 -5 4 <-3 -3 3 <-3 -3 -3
Now I need a place to hide away-
3 -2 -3 3 -1 -2 -3 -3
Oh, I believe in yesterday

-2 -3 3 -1 -2 -3 -3
Mm mm mm mm mm mm mm

In reply to by Nicolas

Nicolas, that is fantastic. I played it through and it was spot on.
Harmonica players cant say they are not supported here :) , Thanks agin.

Will you upload the plugin to the same location as the others ? I will watch for it showing in the list.

All the best, Bob.

In reply to by bsmith

Does it makes sense to add the chromatic harmonica to the list of supported harmonica in the existing plugin instead of create a new one?

The plugin is very similar to the other. All of them have one drawback though. They don't take into account the current time signature or "tonality", nor the previous or following notes, so if there are two possible positions for one note, they always choose the same one, often the "simpler one" (draw or blow) over the complex one (overblow, slide, bend).

I invite happy harmonica players to show their support to MuseScore and just like you, create an account on :)

In reply to by Nicolas

I hope other Harmonica players do join, you have put in a great amount of work and made MuseScore much more Harmonica friendly.

As regards creating a new list, I'm already beyond my comfort zone and don't have enough playing experience to answer that question. I hope this is picked up by other players to develope it in the right direction. I would suggest that we think of this as stage one, add the slide plugin to the existing group and wait for the harmonica users group to grow with more experienced players, else we may head off in the wrong direction.

I cant thank you enough for all your work, I have had so much fun these last few days, Bob.

In reply to by Nicolas

Hi Guys, I'm not an music expert at all and nor a expert harmonica player I'm learning. I got very exited for this plugin because It will help me to improve my music read, I'm working with Hey Jude, but I found what I think is an issue..

For a Diatonic 10 hole we have what it called 1st position this corresponds to 4 Blow, there start the diatonic scale, key of C, we have what is called 2nd position that correspond to key of G, and another positions, When I tried the plug in with this song it was not working for me because it was starting in a 1 blow. I did some modification to the JS file, so it work better for me in this case, I don't know if this will help another harmonica player and fill the GAP with the overblow and overdraws notation. Hope this might me useful for somebody in the future.

// 60 C C# D D# E F F# G G# A A# B
var holes = ["+4", "-4'", "-4", "+4o", "+5", "-5", "+5o", "+6", "-6'", "-6", "+6o", "-7",
"+7", "-7o", "-8", "+8'", "+8", "-9", "+9'", "+9", "-9o", "-10", "+10\"", "+10'",
"+1", "-1'", "-1", "+1o", "+2", "-2\"", "-2'", "+3", "-3\"'", "-3\"", "-3'", "-3",

thanks a lot for the effort!! really appreciated

Hello all, alike many posts I am a begginer in the forum. I am looking for "Auto create tabs" for Harmonica from mp3 music files so I can study the instrument. Firstly, on internet I got a free online "MP3 to MIDI converter" to convert a music named It's not easy from harp player Walter Horton. I applied the Plugin described on the post, but the result is not coherent. could anybody indicate the directions or mistakes I've done?

Attachment Size
example_it'snoteasy.jpg 73.83 KB

In reply to by fabiojuliato1

The problem here is the conversion from MP3 to MIDI, that's really not feasible except in the very simplest of cases. There's no substitute for transcribing the notes yourself, then you can enter them into MuseScore and run plugins etc But the output from the converter is, predictably, garbage, there really isn't anything useful that can be done with it.

In reply to by Marc Sabatella

Hi all,

Sorry to revive an old thread here, but this one seemed the most on topic.

I would welcome any advice on the following:

What I'd like to accomplish is to enter a note (in standard music notation on the staff) and have a harmonica tab symbol entered with it automatically. The way this differs from the above thread is that I'd like the tab symbols to be in a particular font (chromatic sans). I will attach a sample.

As an aside, I am working in an alternate chromatic harmonica tuning called Diminished.

If the tab symbols could end up underneath the staff and be auto aligned this would also help tremendously.

I'd appreciate any thoughts, Thanks so much,


Attachment Size
G Major Scale 2 octaves.pdf 50.11 KB

In reply to by jasonharmonica

I also play harmonica but 99-9/10% of the time, I am playing a four octave chromatic harmonica in C. Besides personal preference, this is by design so I don’t have to use tabs, so of course I have none of these issues. I just play what’s written on the score.

I don’t know what is possible within MuseScore BUT IF you want cover all tab situations; any tab associated with a particular model of harmonica also has to take in consideration the key of that harmonica because of where the notes fall and how they are realized.

For example, an Eb on a Richter Tuned 10 hole diatonic in the key of C is accomplished with an overblow OR a blow bend in holes 1, 4 & 8. However, an Eb on an Eb Richter Tuned 10 hole diatonic in the key of Eb is a regular blow note in holes 1, 4, 8 & 10, Therefore, to do it right you would need tablature to differentiate between the different key harmonicas and the techniques required to realize a particular note on a particular harmonica.

BTW - IS there a tab for an overblow versus a blow bend?

You also need tabs that transpose accurately because not every harmonica player would necessarily use the SAME key harmonica to play in the same key. In other words, use a D harmonica to play in D versus a G, among 2000 OTHER differences between models & tunings. For example, just in 10 hole diatonic harmonicas there are Richter tuned in 12 keys, plus high and low ranges AND major 7th tuning, natural minor, harmonic minor, melodic minor and I am sure a bunch of other tunings available I don’t even know about…

I can’t even imagine how complicated that would be to set up tabs for, not to mention the accuracy and other issues with whether or not certain notes are realistically possible versus theoretically possible due to the range of the instrument and skill level of the player.

In my uneducated opinion, the most logical and easiest to implement solution (IF there was anything implemented by the MuseScore developers) would be some sort of tab based on the most commonly used instruments. So I would have tabs set up for the 10 hole Richter tuned diatonic in C, 10-12-16 hole chromatic harmonicas in C and I guess they could update the other keys and ranges for those instruments that are already in the full Instruments list.

Then select one of those instruments, enable tabs and just tweak the incorrect tablature based on the instrument you plan to perform it on.

In reply to by HuffNPuff

@HuffNPuff: It appears that the harmonica plugin accounts for different keyed harmonicas.

I figured out how to add what I was looking for re: the Diminished chromatic.

(Now I just need to figure out github to submit!)

In harmonica_tablature.qml I added the following:

ListElement { text: "Diminished Chromatic"; tuning: 13 }
ListElement { text: "Diminished Chromatic C, G, D Maj"; tuning: 14 }
ListElement { text: "Diminished Chromatic A, E, B, Cb Maj"; tuning: 15 }
ListElement { text: "Diminished Chromatic F#, C#, Gb, Db, Ab Maj"; tuning: 16 }
ListElement { text: "Diminished Chromatic Eb, Bb, F Maj"; tuning: 17 }

var diminishedChromatic = ["1", 'q', "!", "2", "w", "@", "3", "e", "#", "4", "r","$",
"5", "t", "%", "6", "y", "^", "7", "u", "&", "8", "i", "",
"9", "o", "(", "0", "p", ")", "-", "[", "_", "=", "]", "+", "}" ];
var diminishedChromaticCGDMaj = ["1", 'q', "!", "2", "w", "@", "W", "e", "#", "E", "r","$",
"5", "t", "%", "6", "y", "^", "Y", "u", "&", "U", "i", "
"9", "o", "(", "0", "p", ")", "P", "[", "", "{", "]", "+", "}" ];
var diminishedChromaticAEBMaj = ["1", 'q', "!", "Q", "w", "@", "W", "e", "#", "4", "r","$",
"5", "t", "%", "T", "y", "^", "Y", "u", "&", "8", "i", "*",
"9", "o", "(", "O", "p", ")", "P", "[", "
", "=", "]", "+", "}" ];
var diminishedChromaticGbDbAbMaj = ["1", 'q', "!", "Q", "w", "@", "3", "e", "#", "4", "r","$",
"R", "t", "%", "T", "y", "^", "7", "u", "&", "8", "i", "",
"I", "o", "(", "O", "p", ")", "-", "[", "_", "=", "]", "+", "}" ];
var diminishedChromaticEbBbF = ["1", 'q', "!", "2", "w", "@", "3", "e", "#", "E", "r","$",
"R", "t", "%", "6", "y", "^", "7", "u", "&", "U", "i", "
"I", "o", "(", "0", "p", ")", "-", "[", "_", "{", "]", "+", "}" ];

case 13: tuning = diminishedChromatic; break;
case 14: tuning = diminishedChromaticCGDMaj; break;
case 15: tuning = diminishedChromaticAEBMaj; break;
case 16: tuning = diminishedChromaticGbDbAbMaj; break;
case 17: tuning = diminishedChromaticEbBbFMaj; break;

I'm using the font "Chromatic Tab" available here:

If that font is installed, one can go to Format -> Style -> Text Styles -> Staff and choose "Chromatic Tab"

Then when the following is chosen, the tablature font is shown under the notes: Plugins -> Harmonica Tablature -> Diminished

There are five different Diminished choices:

1) default. All enharmonic notes show as blow notes
2) C, G, D Maj: All Cs are blow, As are draw/s, and F#s are draw/s
3) A, E, B, Cb Maj: D# = Draw/s, F# = Draw/s
4) F#, C#, Gb, Db, Ab Maj: C = Draw/s, Eb = Draw/s, Gb = Blow
5) Eb, Bb, F Maj: Eb = blow, C = Draw/s, A = Draw/s

In reply to by HuffNPuff

Thanks HuffNPuff.

Actually, I'm quite on the same page as you with using one instrument for everything.

In fact, one of the reasons I like the Diminished Chromatic so much is that all keys play equally as well! For example, E Major is as easy as Db, Bb or G.

But I usually choose an A 12 hole for the extra minor 3rd of low range, and some people base their Diminished on G as well, for the same reason. I haven't upgraded to the 16 hole beast yet! :)

Do you still have an unanswered question? Please log in first to post your question.