Skip to content
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

Drum notation? #33

Open
ghost opened this issue Nov 14, 2017 · 144 comments
Open

Drum notation? #33

ghost opened this issue Nov 14, 2017 · 144 comments
Assignees

Comments

@ghost
Copy link

ghost commented Nov 14, 2017

Hello, wonderful developers of Audiveris!

I try to scan my drums sheets from my music school but after a processing, the hi-hat notes (noted with crosses), do not appear on the resulting file; am I missing some configuration? I tried to search for "drums" in your wiki and documentation, is it an expected behavior, a limitation or an error I did?

Thanks for your help :)

~SPJ

@hbitteur
Copy link
Contributor

I'm afraid Audiveris does not recognize drum sheets.
Could you point to a typical example of such drum notation, so that I can confirm?

@chenlung
Copy link

Hi Hervé,

Wikipedia has an article, but there isn't a universal standard for drum notation (noteheads, voices, etc), so I would suggest the ability to define a drumset (i.e. MuseScore).

I've attached two examples of full scores from different books (same typesetting software and transcribing company, I believe) to give an idea:
key to percussion notation example 1
excerpt example 1
key to percussion notation example 2
excerpt example 2

They use a double sharp sign for some note heads, but Elaine Gould ('Behind Bars', page 11) discourages this.

@hbitteur
Copy link
Contributor

Wow! It's a whole bunch of notations!
Some are very similar to (non-drum) standard notations, some are specific. From the point of view of current Audiveris possibilities, we would need to handle specific note heads (reading your top diagram: open hit-hat, crash cymbal, ride cymbal), plus some symbols like tremolos (see your buzz strokes).

On top of that, we'd have to check how MusicXML export format can support all these drum notations. Please have a look at MusicXML 3.1

My guts feeling, based on Audiveris architecture, is that this is technically feasible. However it would be a significant task, and we lack time and human resources right now. Perhaps some external contribution could focus on this development.

When you say "there isn't a universal standard for drum notation (noteheads, voices, etc), so I would suggest the ability to define a drumset", I hear a small voice saying "beware, this sounds like a niche requirement". Before investing large efforts into this, make sure the need is crucial and the "standard" widely shared.

@ghost
Copy link
Author

ghost commented Jan 18, 2018

I couldn't take the time to point out those problems, but I'm aware there is no standard notation for it and that it could take a large amount of work to implement it.
My original question is therefore answered, it's indeed a limitation, but given the state of the art concerning drum notation(s), I also understand perfectly that it's not exactly an urgent issue :)
I'll close the issue.
Thanks again!

@ghost ghost closed this as completed Jan 18, 2018
@chenlung
Copy link

chenlung commented Jan 18, 2018

I was originally inspired by certain sophisticated published transcriptions (hidden empty staves, tablature, drums, etc), so I feel this is an area I could assist (though I am not a coder). Such material has helped improve the scoring tool I use - MuseScore.

@stephanepjeannin: Regardless of the scale of challenge, I still think it's a valid issue and we should leave it open.

@hbitteur: It might be a matter of perspective, but defining drumsets may not be as niche as you think.🙂 May I email you with some private examples? I will also post some public ones so they can be discussed, etc.

@ghost
Copy link
Author

ghost commented Jan 18, 2018

Well, I closed the issue because I got my answer...
However, I agree that the limitation could be addressed. Therefore I reopen it :)

@ghost ghost reopened this Jan 18, 2018
@hbitteur
Copy link
Contributor

@chenlung You can use my private mail (herve dot bitteur at audiveris dot org) for any private example

@hallvors
Copy link

I need these funny triple line things - might be called "buzz strokes" per the above?
Skjermbilete_2021-03-25_23-19-11
This score also uses "square standing on tip" noteheads described as ride cymbals above, though it is used for the crash cymbals part.

I see MusicXML has things like <note><notehead>X</notehead></note> to permit things like the percussion x notehead. However, I don't know if this handles all the special things for percussion notation. I tried to cheat and created a MuseScore file with some percussion instruments and odd note heads, but it failed silently when I tried to export to MusicXML so I guess either the standard or the implementation is not quite ready.

@hallvors
Copy link

Well, actually I already have some MusicXML with drum notation around..
Drum Set.xml.zip

@chenlung
Copy link

@hallvors I couldn't open your file in MuseScore 3.6.2 (crashes).

I've got a mscz with several drumsets if you want to experiment with it?

@hallvors
Copy link

Ops.. Probably my mistake, it is extracted from a bigger MusicXML score, but it does render fine with OSMD (Opensheetmusicdisplay JS library).

I can't really speak for any Audiveris developers here since I'm just a random user :) But if Musescore exports that drum set file nicely to MusicXML I think it might be useful to them as an example of percussion notation in MusicXML.

@Jojo-Schmitz
Copy link

Jojo-Schmitz commented Mar 26, 2021

MuseScore crashes on that xml file, in a Debug build with a failed assertion somewhere deep in Qt:
Fatal: ASSERT failure in QList::at: "index out of range", file C:/Qt/5.15.2/mingw81_64/include/QtCore/qlist.h, line 571

@hbitteur
Copy link
Contributor

hbitteur commented Apr 2, 2022

FYI, Audiveris template matching was recently extended to support cross heads (x-shaped heads). I'm putting this here to help contributors (Brian...) on drum notation.

image

The image above shows how we can interactively apply a head-template for a given shape (here shape NOTEHEAD_CROSS, with a stem located on the right head side) on a given score location. This was meant for Audiveris developer to visually check how the template worked (or not).

To play with this, you will need: to

  • Probably select all advanced topics in Tools | Advanced Topics
  • In Tools | Options, set the constant DistancesBuilder.displayTemplates to true
  • In the current book use Book | Set Book Parameters and select "Support for cross note heads" and press OK or Apply.
  • Then run the HEADS step on your score.

In the Templates tab, use mouse right button to position the template at a desired location. Then read the matching result in the template board on the right column (where you can also select which template to use). Mouse left button is used to read the distance from mouse location to the nearest template foreground point.

OK, that's a bit complex, but this feature was never meant for the end-user :-)

Then browse Audiveris code, beginning with classes:

  • HeadsStep
  • DistancesBuilder

They should be good starting points.
/Hervé

@brian-math
Copy link
Contributor

brian-math commented Apr 2, 2022

@hbitteur thanks for the welcome and the tips for getting started! As Hervé implied, I want to get involved with improving Audiveris' recognition of drum notation: specifically, 5-line unpitched percussion scores. I am brand new to GitHub, so please forgive and correct any mistakes like posting under the wrong heading of the forum.

Let me first address the issue of MusicXML. It seems that MusicXML 4.0 already supports all the needed elements of unpitched percussion for Audiveris export; see https://www.w3.org/2021/06/musicxml40/tutorial/percussion/ for a good introduction. In particular, it supports encoding of:

  • multiple notehead shapes, including standard oval, x, circle-x, diamond, slash, and many others
  • multiple instruments per part (snare drum, kick drum, hi-hat closed or open, crash cymbal, cowbell, etc. etc)
  • positioning of different instruments on their own line or space of the staff (same as for pitched notes for "normal" scores)
  • assignment of a particular MIDI playback sound to each instrument.

Admittedly there are some choices to make with that last point: in the example posted near the top of this thread by chenlung on Jan 17 2018, an x on the space above the score is depicted as an open hi-hat, but many programs that create drum score notation (and many drummers) would use that symbol for a closed hi-hat. Ultimately Audiveris should probably provide a choice to the user among several common schemes for assigning MIDI sounds to each (notehead, score position) pair. But initially for development purposes, it makes sense to choose one of them; I would propose the one used by MuseScore.

Maybe that's enough for now. After I've had a chance to try Hervé's suggestions from the previous post, I'll probably have some questions. And at some point I'll post an overview of what I think will need to be done, in terms of new or improved code development, shape recognition, training, etc., for Audiveris to support unpitched 5-line percussion scores. [GitHub newbie question: should all that be posted here in Issue #33, or somewhere else?]

@chenlung
Copy link

chenlung commented Apr 2, 2022

@hbitteur thanks for the welcome and the tips for getting started! As Hervé implied, I want to get involved with improving Audiveris' recognition of drum notation: specifically, 5-line unhitched percussion scores.

Hi Brian,

I have a score which you may use for testing (specially designed for this). Can I email it to you?

@brian-math
Copy link
Contributor

@chenlung, thanks for the offer. I have dozens if not hundreds of PDF drum scores already, from MuseScore and various other sources. Is there something special about yours? I’m not sure how email works with GitHub—I got an email copy of your posting, does that mean if you post your score I’ll get it by email?

@hbitteur
Copy link
Contributor

hbitteur commented Apr 2, 2022

@brian-math

[GitHub newbie question: should all that be posted here in Issue https://github.com//issues/33, or somewhere else?]

Yes you can use this location for questions, suggestions, etc...
When your modifications get more concrete, it will be time to use a PR (pull request) to include them.

Since you are a GitHub "newbie", to get up and running on Audiveris code, do the following from the command line level in a local folder of your choice:

# Download Audiveris code and put it by default in a sub-folder named audiveris
$ git clone https://github.com/Audiveris/audiveris.git

# Move to the just created/populated sub-folder
$ cd audiveris

# Select development branch
$ git checkout development

# Show current status
$ git status

Before that, you'll need to install Git and Gradle tools, plus Java JDK 17 and your favorite IDE. What's your OS?

@chenlung
Copy link

chenlung commented Apr 2, 2022

@chenlung, thanks for the offer. I have dozens if not hundreds of PDF drum scores already, from MuseScore and various other sources. Is there something special about yours? I’m not sure how email works with GitHub—I got an email copy of your posting, does that mean if you post your score I’ll get it by email?

@brian-math You might be covered overall, but I think the score will still serve you in some form, even beyond five-line drumsets (should you get to those).

And I think that's just a notification, so feel free to drop me a line.

@brian-math
Copy link
Contributor

brian-math commented Apr 2, 2022

Hervé, I want to say that the existing instructions on the site for installing Audiveris were very clear, and I had almost no problems getting it up and running a week ago. The only problems arose regarding the tesseract language files. It seemed that the default was to download version 4.1.0 of those files, whereas it was (exceedingly!) clear from the instructions that only v. 3.0.4 would work. When I first ran Audiveris, I got an error "Could not initialize Tesseract with language deu" [or eng or fra or ita] and suggesting that the environment variable TESSDATA_PREFIX needed to be set. Eventually I discovered that the language files (on a Mac) are saved in /opt/local/share/tessdata/xxx.traindata (where xxx is deu, eng, fra, ita, etc), and after adding that environment variable definition to my .login file, the error message went away. But I still had to figure out how to find and download the tesseract 3.0.4 language files and substitute them for the 4.1.0 files in the aforementioned directory. Some better explanation of this process might have helped. But otherwise it was no problem! Mac OS Mojave 10.14.6.

@hbitteur
Copy link
Contributor

hbitteur commented Apr 3, 2022

I suppose you are using Audiveris development branch.
And so, you are living on the "bleeding edge" of this software, taking advantage (?) of every modification made on this branch.
One of them was the migration from Tesseract 3.x to Tesseract 4.x used in "legacy" mode, which means still using the old (3.x) Tesseract data files.

During this switch, I discovered by chance that TESSDATA_PREFIX environment variable that was supposed (in 3.x) to point to the parent folder of tessdata folder is now supposed in (4.x) to point directly to tessdata folder. This might explain your problem.

This needs to be documented before the next release is published...

@hbitteur
Copy link
Contributor

hbitteur commented Apr 3, 2022

Template generation

In Audiveris 5.x, heads are recognized by template matching while most of the other fixed-shape symbols are handled by a trained neural network.
This is likely to change in 6.x where the new patch classifier should be able to handle heads as well as the other symbols.
But for the time being, we need to extend templates so that even the drum-related heads get recognized.

For this, the key class is org.audiveris.omr.image.TemplateFactory. It works with a specific free true-type font named "MusicalSymbols" which does not need to be installed on the user machine, since it is provided in Audiveris res folder (res/MusicalSymbols.ttf file). See for example https://fonts2u.com/musicalsymbols.font to have a look at this font.

With this font, in TemplateFactory we simply specify the code to use for every specific head shape. For example:

  • 207 for NOTEHEAD_BLACK
  • 250 for NOTEHEAD_VOID
  • 119 for WHOLE_NOTE
  • 192 for NOTEHEAD_CROSS (the one that was recently added to support cross heads)

Drum notation will require a few additional codes. A quick search gave:

  • 79 for diamond-like head shape (electric snare, ride cymbal)
  • 220 for fat cross heads (rim_shot, open hi-hat)

But I could not find any circled fat cross head (crash cymbal) in this font. What can we do?

  1. Use another musical font? This means 1/ finding out a new suitable font and 2/ checking and perhaps modifying the font codes used in Audiveris software. Fortunately, these codes are kept hidden in 2 key classes, TemplateFactory class to get the images needed to generate templates and Symbols class which handles the symbols display on Audiveris images. However, besides the font code, the program sometimes needs additional information such as the x and y shift of a symbol with respect to font origin. And this involves a bunch of classes.
  2. Combine 2 font symbols, one for the fat cross and another one for the circle around it. For example code 111, a small circle which unfortunately is significantly smaller than the cross, so it should be picked up from a scaled variant of the font. A bit complex, but doable. I prefer this solution because it doesn't break anything.

Any other idea?

@hbitteur
Copy link
Contributor

hbitteur commented Apr 3, 2022

image

image

image

image

You can play with this small tool integrated in Audiveris.
It is launched by Debug | Launch Symbols Ripper, provided that you have selected the debug features in the Tools | Advanced Topics
Mind the fact that this tool allows to select a font among the ones installed on your machine. So MusicalSymbols font must be installed in that case.

@brian-math
Copy link
Contributor

@hbitter Thanks for this detailed information about the music font used for note heads; it is very interesting.

I would suggest not to worry too much right now about the circled x. It seems to me that ~95% of drum notation uses only standard oval and x note heads. The next most common head seems to be a diamond. I have never encountered a circle-x used for a crash cymbal; rather, the main crash is normally an x on the first ledger line above the staff (or perhaps the space above that, for a 2nd crash cymbal). I have seen a circle-x used for an open hi-hat cymbal, but there are at least two other common notations in use for the open hi-hat, and we can probably reasonably translate to one of them if we can recognize an x-in-a-circle glyph. This should be good enough until we get to version 6.x. But if not, I like your idea of combining two existing symbols from the font.

By the way, as mentioned at the bottom of @chenlung 's Jan 17 2018 post, the double sharp symbol should not be used for drum cymbal notation, even though it certainly appears in some scores (probably because it was an existing music notation symbol to which the transcriber had easy access). So I think we should stick to the Code 192 x and not use the Code 220 double sharp.

I've spent a good deal of today preparing 1) a detailed analysis of how Audiveris performs, step by step, when given a drum score as input, and 2) an outline of a proposed set of tasks to get Audiveris able to recognize 5-line drum scores. I'll post those later this evening (US time).

@chenlung
Copy link

chenlung commented Apr 3, 2022

I have never encountered a circle-x used for a crash cymbal; rather, the main crash is normally an x on the first ledger line above the staff (or perhaps the space above that, for a 2nd crash cymbal).

I think MuseScore has the circle-x?

Barnes Music Engraving used Amadeus Music Software for these transcriptions, by the way.

@Jojo-Schmitz
Copy link

I just tried MuseScore site, but there I can download 3.6.2.5 version, but not 4.x Any idea?

MuseScore 4 is still in development, but already available as 'nightly builds'

@hbitteur
Copy link
Contributor

hbitteur commented Jun 9, 2022

Yes thanks, I will use that .png image (even though it contains 1 page against 4 pages in the PDF version).
Bad luck, the resolution is much too low in this .png version. Interline is about 7 pixels, Audiveris needs something around 20 pixels

@hbitteur
Copy link
Contributor

hbitteur commented Jun 9, 2022

MuseScore 4 is still in development, but already available as 'nightly builds'

I will try it. Purpose is to make sure that MusicXML as produced by Audiveris is OK, and a practical test is to feed a few music sequencers like Finale, MuseScore, Primus, ... with it.
I insist on doing this because docs on MusicXML are not always crystal-clear about what to output precisely.

@brian-math
Copy link
Contributor

I was about to post a screenshot of the B B King song. But I guess I won't bother if it's unusable in Audiveris.

What happens if you go to this link?

https://www.drumeo.com/beat/20-easy-songs-beginner-drummers/

Does it load without you having to create a [free] account with them? Do the links "Click for the sheet music" function?

@hbitteur
Copy link
Contributor

hbitteur commented Jun 9, 2022

Does it load without you having to create a [free] account with them? Do the links "Click for the sheet music" function?

Yes I can download the file, and a double-click on it opens a PDF viewer with no banner. Fine.
It's only when loading the PDF into Audiveris, which uses JPodRenderer to convert it to a BufferedImage that I get this banner (and in some files only, but on all pages of these files)

@hbitteur
Copy link
Contributor

hbitteur commented Jun 9, 2022

MuseScore, on the other hand, plays the correct content but also displays that content instead of the repeat sign. Perhaps this depends on some MuseScore option I don't know of.

I can confirm identical results between MuseScore 3 and MuseScore 4: no repeat sign appears, measure content is displayed as for a "standard" measure.

@Jojo-Schmitz
Copy link

Jojo-Schmitz commented Jun 9, 2022

Guess that'd be something for @lvinken to look at (MusicXML im-/export of (multi-)measure-repeats).

@hbitteur
Copy link
Contributor

hbitteur commented Jun 9, 2022

Yes I can download the file, and a double-click on it opens a PDF viewer with no banner. Fine.

Actually, a watermark is indeed displayed across the page by a PDF viewer (and by the web browser as well I suppose), but it is very faint, so we don't really notice it. You can check this on your own.
The problem is that JPodRenderer makes it much more visible... :-(

@hbitteur
Copy link
Contributor

With commit ee68a8c simile marks are now handled for 2 and 4 measure marks.
Note the underlying barline is integrated in the symbol to allow the glyph classifier to work correctly.
image

Finale works correctly with the provided MusicXML data for REPEAT_TWO_BARS symbol but displays two measures, each with a REPEAT_ONE_BAR symbol. Why not?
Source in Audiveris:
image

Gives in Finale:
image

[Slurs in Finale come from circles not yet handled by Audiveris and mistaken with slurs. But this is another story...]

@Jojo-Schmitz
Copy link

Not the same thing, repeat last 2 measures is not that same as repeat last measure twice

@hbitteur
Copy link
Contributor

Good point!

@hbitteur
Copy link
Contributor

Listening to Finale playback though, I think it plays the correct content (the 2 measures to be replicated are slightly different).
So sound seems OK, but I agree that their display is misleading.

@lvinken
Copy link

lvinken commented Jun 10, 2022

Just checked. MuseScore 3.6.2 supports "repeat last bar" symbol, but does not export this to or import from MusicXML.

MuseScore 4.0 supports "repeat last bar", "repeat last two bars" and "repeat last four bar" symbols, including MusicXML import and export (did not actually test the "four bar" variety). MusicXML produced by MuseScore 4.0 seems to match https://www.w3.org/2021/06/musicxml40/musicxml-reference/examples/tutorial-percussion/.

In case something does not work, please provide details.

@brian-math
Copy link
Contributor

Thank you for confirming that my observations with MuseScore 3.6.2 are as expected.

@brian-math
Copy link
Contributor

@hbitteur What is your advice about the number of different circle-x noteheads to include in the code? The SMuFL font includes noteheadCircleX, noteheadCircleXHalf, and noteheadCircleXWhole (E0B3, E0B2, E0B1), but they look very similar, and I doubt the OMR engine is going to be able to detect the difference between the three different heads in an input score. OTOH maybe we require at least two separate heads for logical reasons--one with and one without a stem? Would including all three help in correctly assigning time durations?

@brian-math
Copy link
Contributor

@hbitteur I have made a commit 01a8dad to the development branch on my brian-math GitHub account of my progress so far on recognizing circle-x note heads. I'd appreciate your suggestions about what should be done next to make this work.

I have been testing using the score "Come As You Are," page 2, which you used for testing two-measure repeats on June 10. Prior to adding the two new mapShape lines to Symbols.java, I received a few dozen "Error: no symbol to paint HeadInter NOTEHEAD_CIRCLE_X." So I believe Audiveris was recognizing several such note heads on this page. However, after adding those lines to Symbols (lines 324 and 419), there seem to be no circle-x note heads being recognized. (Or am I just not seeing those inters?)

Dragging the NOTEHEAD_CIRCLE_X template (in the Templates tab of running Audiveris) onto the actual circle-x note heads in the score image, the template is evidently much smaller than the printed note heads, producing very poor match scores of around 0.1. Another clue is the following line from the log file during HEADS step:

HeadSeedTally 208 | Scale information: HeadSeeds{NOTEHEAD_DIAMOND_FILLED[R:1.5] NOTEHEAD_TRIANGLE_DOWN_FILLED[R:1.7] NOTEHEAD_CIRCLE_X[R:2.3] NOTEHEAD_BLACK[R:1.5]}

I suppose this means that the circle-x note heads have radius 2.3, compared to 1.5 for the oval note heads?

Is there a way to force Audiveris automatically or manually to scale up the circle-x template to match the oversize circle-x note heads in this score?

@hbitteur
Copy link
Contributor

@brian-math My understanding is that noteheadCircleX, noteheadCircleXHalf, and noteheadCircleXWhole (E0B3, E0B2, E0B1) represent notes with different durations (1/4, 1/2 and 1), please correct me if I'm wrong.
They may be difficult to disambiguate via our current approach for heads (template matching), but we should give it a try.

Now, I can't see all these 3 shapes in the modifications you made, noteheadCircleXHalf seems to have disappeared. Was this done on purpose? My advice would be to address either none or all three of them for the sake of completeness from an end-user point of view, notably regarding note duration.

Head size is given by the chosen musical font (Bravura as of this writing), meaning that for the same font size, a black oval head and a circle-X head have the bounds defined by Bravura font for each of these shapes. And what you get when dragging out of shape board to some target staff shows you the actual head size for the target staff.
You can also use the Debug | Launch Symbol Ripper menu to check precise appearance for each musical font item.

It's true that in your score example ("Come as you are"), the circle-X appear somewhat larger than their oval shape counterparts, still referring to what Bravura provides. The question is to decide on "which is right" regarding oval/circle size ratio: Bravura or "Score as you are"?

If needed (see my question above) we can "cheat", still using Bravura font, and impose a ratio specific for circle-x heads. To do so, we will have to define a specific CircleHeadSymbol class which automatically applies a specific ratio, and then modify Symbols class accordingly. A bit like the BraceSymbol class that you can use as an example. Advantage of this approach is that it works both for display and for template generation. The same specific circle-X sizing will apply to all scores from now on... So let's be careful.

HeadSeedTally 208 | Scale information: HeadSeeds{NOTEHEAD_DIAMOND_FILLED[R:1.5] NOTEHEAD_TRIANGLE_DOWN_FILLED[R:1.7] NOTEHEAD_CIRCLE_X[R:2.3] NOTEHEAD_BLACK[R:1.5]}

This output line gives you the mean observed abscissa offset from head center to stem connection point. The offset is expressed in interline fraction. 'R' stands for Right and 'L' for Left side of the head. And that dx is provided per head shape.

@brian-math
Copy link
Contributor

@hbitteur Yes I intentionally left out noteheadCircleXHalf from the initial code on the premise that it might not be needed, since it looks almost identical to noteheadCircleX and both should have a stem attached. But it will be easy to add the half-note version for completeness and consistency.

I noticed that in the score "Come as you are" under consideration, the "x" portion of the circle-x heads occupies almost exactly the space between two score lines. Since the arms of the x appear to create a right angle but at a 45 degree angle to vertical, the circle diameter should be sqrt{2} times the interline distance L. And the horizontal distance from the head center to the stem attachment point should be the radius of the circle, (sqrt{2}/2 ~ .707) L. So I'm not sure why the abscissa offset is reported as 2.3 L...

In fact, I'm a bit confused about why any NOTEHEAD_CIRCLE_X abscissa offsets are being reported in the log at all, since I could not see any such circle-x head inters in the Audiveris display after the HEADS step. Does this mean that the matching to the circle-x template was actually successful in many cases, and either I missed them, or for some reason they are still not being "painted" with the font character?

I agree that we should be cautious about hard-coding in some specific ratio to handle the sizing of the circle-x glyph in the scores coming from drumeo, without first testing several other sources. I believe MuseScore can be coerced into creating circle-x heads, so I'll create a sample MuseScore file to see how big they are. Could you perhaps do the same with Finale?

@brian-math
Copy link
Contributor

MuseScore circle-x notes
Here's a screen shot showing the MuseScore circle-x notes. The upper part contains an ordinary quarter note for comparison, then a circle-x quarter, and finally a circle-x half. The lower part is a circle-x whole. The circle-x quarter is a little taller than 1 interline, but not as tall as in the drumeo scores. Interestingly, the MuseScore circle-x half and whole notes are smaller: essentially 1 interline tall.

@hbitteur
Copy link
Contributor

hbitteur commented Jul 1, 2023

I think we can close this issue. At last!:-)

@hbitteur hbitteur closed this as completed Jul 1, 2023
@hbitteur hbitteur reopened this Oct 27, 2023
@hbitteur
Copy link
Contributor

@brian-math
Hello Brian,
I'm facing problems transcribing drum scores with circle-x notes, for instance the BangBang score available on RedEye percussion site.

The first mesure of the second system is as follows:

image

At the end of the REDUCTION step, the measure appears as:

image

The result looks OK (except for the very first note head above staff, but let's forget this).
The problem will get more obvious during the RHYTHMS step, with the measure displayed in pink background, which indicates a rhythm error.

Let's look at the space just above the middle line. It contains 4 heads with a circle-x.

  • The first one is transcribed as a NOTEHEAD_CIRCLE_X (duration: 1/4)
  • The 3 other ones as NOTEHEAD_CIRCLE_X_VOID (duration: 1/2)

We need very good eyes to detect this visually.
Here below is the content of shape board for heads in drum notation.
The display is zoomed two times to be more visible.
Heads are organized by columns, with respective durations of 1/4, 1/2, 1, 2:

image

Looking very carefully, we can observe that the two circled heads are indeed not identical.

But the template-matching mechanism currently used by our OMR engine suffers similar problems. Many"black" circle-x heads are mistaken for "half" circle-x heads.
And since we cannot easily detect/fix these errors manually, such scores are painful to transcribe.

So, what can we do?

My personal thinking would be to, at least, prevent the template-matching tool to assign these "half" heads that are too similar to their "filled" counterpart. Manually assigning them would still remain possible though.

What do you think?

@hbitteur
Copy link
Contributor

@brian-math
I have limited the shapes handled by template matching to:

  • All the standard (oval) ones, i.e. the upper line of head palette as seen in the message above,
  • Just the first one on all the other ones (small, cross, diamond, triangle, circle).

This may be a bit too strict, but it works nicely now.
We'll decide on other scores if we need to allow the second column (i.e. half notes) for perhaps cross, diamond and triangle but certainly not circle.

Another question: I noticed a few "triangle up " motifs, with some "Cowbell" text, in RedEye Percussion scores. Should we add support for this motif?

@brian-math
Copy link
Contributor

@hbitteur
This does seem a bit strict. Aside from the circle-x heads, all the others look fairly distinct in the filled (¼) and open (½) versions. I have seen percussion scores where those ½-note shapes are used, so it seems a shame to prohibit the engine from detecting them if it can do so reliably.
I completely agree that the ½-note circle-x heads should be removed from template matching (but remain available for user selection/replacement where needed).

Regarding triangle-up heads, it's true that these do occur occasionally in percussion scores, and it would probably be very little additional work to include them. The question is whether the growing palette of heads is likely to result in increasing head mis-identification by the engine...

@hbitteur
Copy link
Contributor

hbitteur commented Oct 31, 2023

I have seen percussion scores where those ½-note shapes are used, so it seems a shame to prohibit the engine from detecting them if it can do so reliably.

OK, beside the oval motif, I suggest to augment the catalog for template matching with the ½ versions for cross, diamond and triangle motifs. I'd left apart the ½ version for:

  • small, because the small motif seems to be used only for grace notes
  • circle, because it's too similar to the filled version

@hbitteur
Copy link
Contributor

Regarding triangle-up heads, it's true that these do occur occasionally in percussion scores, and it would probably be very little additional work to include them.

Agreed.
If, as a general goal, we'd like Audiveris to correctly handle a significant part of the printed scores of Redeye percussion site, then we should probably include this triangle-up.
Could you decide on the related instrument name, sound value and possible pitch position(s)?
There is no hurry though.

The question is whether the growing palette of heads is likely to result in increasing head mis-identification by the engine...

Sure.
This is however mitigated by the fact that the end user can still override the drum set definitions, especially which motif can occur on which pitch position. This drastically reduces the set of shapes to be actually tried by template matching on a given pitch position.

@hbitteur
Copy link
Contributor

While working on discussion #672, I had to reconsider how Audiveris processes 1-line staves. There were many locations, here and there in the source code, where the engine implicitly assumed a 5-line staff.
I think the code is OK now.

My question is about drum notation on such 1-line staves. I found only two examples on Redeye site (BangBang and HoldItNowHitIt). Based on this limited data, I extended the drum-set.xml file as shown below:

  <staff line-count="1">
      
    <!-- -1 -->
    <entry pitch-position="-1" motif="oval"  sound="Hi_Bongo"/>
    <entry pitch-position="-1" motif="cross" sound="Maracas"/> <!-- Surely wrong... -->
    
    <!-- 0 -->
    <entry pitch-position="0"  motif="oval"  sound="Hand_Clap"/>
    
    <!-- 1 -->
    <entry pitch-position="1"  motif="oval"  sound="Low_Bongo"/>
    <entry pitch-position="1"  motif="cross" sound="Cowbell"/>
    
  </staff>

Since this is a 1-line staff, I think we have to handle pitch positions -1, 0 and +1.
But which motif and which sound should be defined on each position?
I had to provide some data just to try the engine. But my definitions are surely wrong.

You are the expert! :-)
Do you know of other examples (probably on other sites)?

@brian-math
Copy link
Contributor

Agreed. If, as a general goal, we'd like Audiveris to correctly handle a significant part of the printed scores of Redeye percussion site, then we should probably include this triangle-up. Could you decide on the related instrument name, sound value and possible pitch position(s)? There is no hurry though.

We already have in drum-set.xml mappings (for the downward-pointing triangle):
<entry pitch-position="-3" motif="triangle" sound="Cowbell"/>
and
<entry pitch-position="-2" motif="triangle" sound="Cowbell"/>.

On the RedEyePercussion site, the score OldTimeRock&Roll has an upward-pointing triangle on sheet 2, system 1, pitch-position -5, which I believe is (also) played as a Cowbell in the recording. So after creating a "triangle-up" head shape, you could add

<entry pitch-position="-5" motif="triangle-up" sound="Cowbell"/>.

On the same site, the score for WhoLetTheDogsOut actually has two 5-line percussion staves per system, one for a standard Drumset and the other labeled as "TIMS" (Timbales?). This latter has some triangle-up heads at pitch-position 3 labeled "Triangle" (MIDI percussion instrument #81), and some others at pitch-position 1 (in the 2nd-last system) that are unlabeled (and I don't know what instrument they represent). Based on this, you could add

<entry pitch-position="3" motif="triangle-up" sound="Triangle"/>

although I think this is probably rather non-standard usage.

That same score also uses the triangle-down head for both "Cowbell" and "Small Cowbell" at pitch-position -1, but I think you can leave it to the user to add this to the local drum-set.xml file; in any case, there does not seem to be a MIDI percussion instrument Small Cowbell defined.

@brian-math
Copy link
Contributor

My question is about drum notation on such 1-line staves. I found only two examples on Redeye site (BangBang and HoldItNowHitIt). Based on this limited data, I extended the drum-set.xml file as shown below:
...
Since this is a 1-line staff, I think we have to handle pitch positions -1, 0 and +1. But which motif and which sound should be defined on each position? I had to provide some data just to try the engine. But my definitions are surely wrong.

You are the expert! :-) Do you know of other examples (probably on other sites)?

I haven't encountered many 1-line percussion staves. Poking around the internet, they seem to be used typically for one single instrument, or sometimes two related instruments (above and below the line), such as hi and low bongos. A typical score might have many 1-line percussion staves for different instruments. It would be impossible to try to anticipate them all.

I think your definitions are fine. They provide an example of how to define multiple instruments on all three possible pitch-positions of a 1-line staff, which the end user can easily modify for a given score.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants