Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Music extraction feature

Status
Not open for further replies.

Mac53

New Member
Hi guys.I'm working on a school project where I have to convert scanned image files of sheet music into their corresponding musical notes.I am struggling to find code and algorithms on line that can help with this.As an example if on a sheet of music there is a C# note,I have to interpret this through software and output a c# note that is stored in some type of look up table as a wav file.
 
You do realize that you've taken on a huge undertaking, one that could easily require a team of programmers working for months or years, right? This is not a trivial task. You're basically first going to have to do OCR (optical character recognition) on the symbols. Then you have to be able to put them together in some sensible way. Probably the easiest part of the project would be actually generating the notes, either through MIDI or simply by outputting some kind of encoded file.

It is doable, but just barely.
 
That is not really too hard if you already know how to program with Java, C, .NET etc. You need to learn few computer vision algorithms like detecting lines and other basic shapes.
Can you post an example image of a scanned sheet of music? What programming language you are planning to use?
 
Last edited:
You say it's not too hard, but I've actually worked on OCR projects, so I know how difficult it is to do this kind of pattern recognition. And it's not the programming--that's the easy part: it's coming up with techniques that actually work for recognizing stuff. Detecting lines is one thing: recognizing a flat sign in the middle of a bunch of staff lines with note stems nearby is horribly difficult.

Are you at all familiar with printed music? The symbols used vary all over the place; one publisher's sharp sign may look a lot different from another one's.

I'm sure it is do-able; just not sure how realistic this would be for a one-semester student project.
 
Last edited:
You say it's not too hard, but I've actually worked on OCR projects, so I know how difficult it is to do this kind of pattern recognition. And it's not the programming--that's the easy part: it's coming up with techniques that actually work for recognizing stuff. Detecting lines is one thing: recognizing a flat sign in the middle of a bunch of staff lines with note stems nearby is horribly difficult.

Are you at all familiar with printed music? The symbols used vary all over the place; one publisher's sharp sign may look a lot different from another one's.

I'm sure it is do-able; just not sure how realistic this would be for a one-semester student project.

Of course it is difficult if you are hoping to process the works of Mozart, but recognizing very simple notes is very doable in one semester by one student. Not hard at all if you limit the problem properly.

There are couple of open source Optical Music Recognition software. Maybe OP should look at them more closely:
**broken link removed**)
https://audiveris.kenai.com/

The audioveris documentation looks like it could be very usefull to you (Mac53):
https://audiveris.kenai.com/docs/manual/index.html?manual=operation

I also found this paper: https://www.electro-tech-online.com/custompdfs/2011/07/B2BB_ChallengeOfOMR.pdf
 
Last edited:
Of course it is difficult if you are hoping to process the works of Mozart, but recognizing very simple notes is very doable in one semester by one student. Not hard at all if you limit the problem properly.

That I'll agree with.

If the goal of the project is to try to recognize a page of simple, clearly-printed music, then the O.P. at least has a fighting chance. Maybe they can post an example, if they have one.

Pattern recognition is a fascinating area of computer science, that's for sure.
 
Thanks Guys.I realise that the task is big and understand also that it needs to be limited properly to be realised by a student in 1 semester.I am not an expert in music but I am quite read up on it.Enough to be able to limit the kind of pattern I'll be trying to detect.As a start I'll work on recognising notes, rather than the rythm or time signatures.I intend to use C as suggested by my supervisor.What I basically need is direction as to websites or links having open source code that I can use as a starting point for the optical character recognition.I am planning to limit the problem to detecting 7 notes A to G with the possibility of the other 5 (sharp)notes.
 
Mac33-musical feature extraction

...by the way guys I will be detecting printed notes,not hand written notes.
 
...by the way guys I will be detecting printed notes,not hand written notes.

I pretty much assumed that. No way you're going to be able to decipher hand-scribbled music!

Any chance you can post a sample of what you intend to scan?
 
Simple music plays only a single note at a time (Mary has a little lamb). But real music plays frequently in chords that have many simultaneous notes.
 
Music Feature extraction

Hi guys.I cant really post an image right now of what I'll be detecting but I can describe it.I know about the complexities of music:dynamics,time signatures,bars,ties,beams etc but to narrow the problem down to start with,I'll be detecting notes of the treble clef staff (4/4 time signature) that are within one bar and are crotchets and I'll be detecting their vertical position within the staff to determine what note it is and no,I won't be detecting chords.Basically OMR is a huge area of research and it has lots of subtopics and so it's necessary to limit the problem if it is to be achieved.So what I need guys once again is open source code,algorithms that are used.I can use c or matlab to achieve this.
 
So what I need guys once again is open source code,algorithms that are used.I can use c or matlab to achieve this.

So were the links I posted useful or have you seen and read them already? I posted links to two open source OMR software and one thesis paper. Give some feedback so we can help you further.

EDIT: Can you use the Image Processing Toolbox in Matlab?
 
Last edited:
Thanks Mister T.The links were very helpful ,especially the thesis paper.I am taking an image processing course alongside my project to help me so I will be learning how to use the matlab toolbox.I do however know matlab already so any code that I can use as a starting point is welcome.This topic constitutes a huge area of research so what I need is to get some code and approach that is to the point and not at post grad level.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top