hi there,
i want to make an applet to display musical notations
my question is does java has a library which can display the musical notation
or should i fetch images of the notations and then display them?
thanks in advance
Maneesh, you seem to be assuming that musical notation should be considered text. I don't think that's the case. How would you handle multiple notes played at the same time? Would there be glyphs for all combinations of these? I tried to find info on Unicode representations of music, and I couldn't even find any way to represent the pitch of a single note. Much less a chord. Yes, there representations of a quarter note or half note - but there's no way to indicate the pitch of that note. Which is of severely limited usefulness, I think. I believe Ali would be much better off trying to render musical notation as images, not just text.
Ali: no, I don't know of any standard library for this stuff. Maybe there is one, maybe not. But I'm pretty sure that text and Fonts are not going to be the answer. They might play a role in your answer, I suppose, but not much.
I dont know if you really understand music theory, but if you dont, i suggest yuo to take a fast studying about music, before starting programmin about music..
or, if you want another music softwares to look at, I suggest you guitar pro, take the trial and kinda see how it works, just a tip, so that your program can be even better
=D
hi there,
yes writing music is hard...that's true...however i already have an applet which play the musical sound and display a keybnoard. all i need to do now is to represent the sound by musical notes on a script.
so i am investigating a way to get the sound generated(represented by a number) and display the corresponding notes..the problem arises when a key is pressed more than once...so the notes change.
a solution i thought about was to store all the possible combination of the notation in a database(in form of images) then retrieve them with respect to the note been pressed.
the problems :-
the num of combinations is very large
and how to keep track of a key been pressed repeatedly(again).
i'll keep digging around...any suggestions are most welcome...
I've done a fair bit with music and Java, but I've not (yet) attempted to print music (to the screen or a paper).
There are fonts out there to do this; the feta font is used by LilyPond to produce its music notation. I'm not sure how useful that is, because you would have to manually position glyphs.
As far as when someone presses a key more than once, check out how MIDI handles it -- there are NoteOn and NoteOff events generated. You could do the same. (Or, you could just produce a MIDI file, as Java does support MIDI through its javax.sound.midi package).
I did start looking at how to display music in Java, and I think that the abc4j project that Ulf referenced did do that. I haven't had the chance to look at that in more detail, but that is where I would start.
ali sookun wrote:all i need to do now is to represent the sound by musical notes on a script.
you mean that you want to construct the scores for the music?
if so, you already have a knowledege about music scores?
ali sookun wrote:
so i am investigating a way to get the sound generated(represented by a number) and display the corresponding notes..the problem arises when a key is pressed more than once...so the notes change.
actually, i think you got a worst problem than you think, the notes change if it is pressed for an determinated period of time, the notes representation change if your score will be 4/4 or something else.
ali sookun wrote:
a solution i thought about was to store all the possible combination of the notation in a database(in form of images) then retrieve them with respect to the note been pressed.
that would probably result on a ultra giant database, i think.
ali sookun wrote:
the problems :-
the num of combinations is very large
... yes it is.
so, i think if you want to do this from the very own beggining, you'll probably succeed, but you will end having your own API for music writing, when theres always others that can be found
i think your solution, will be to use some of these API that already exists, as Ulf Dittmer said, http://code.google.com/p/abc4j/ is probably your solution for that case.
i mean, that is if you dont want to write your own api
thanks lucas
yep i dont know lot about music..i just started with this application...
currently i am doing a bit of research on music that is how the notes are dsiplayed in some applications...