Forums Register Login

Java and musical notation

+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
All text is rendered by Fonts.
I think you will have to find a font which supports notations and use it for your purpose.
+Pie Number of slices to send: Send
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.
+Pie Number of slices to send: Send
ok thank for your information...
i just wanted to know the different possibilities before investigating the problem.
+Pie Number of slices to send: Send
Mike,
You are most probably right. I have no idea how one goes about "writing" music

When I saw the post I did a quick google and found this which made me believe it could be treated as just any other text. Looks like I was wrong!



+Pie Number of slices to send: Send
Ali,
Found this: http://www.softsynth.com/links/java_music.html
Google around and you will find more interesting links.
+Pie Number of slices to send: Send
you know, writing music is really really hard,

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
+Pie Number of slices to send: Send
This one looks helpful: http://code.google.com/p/abc4j/
+Pie Number of slices to send: Send
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...
+Pie Number of slices to send: Send
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.
+Pie Number of slices to send: Send
 

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
+Pie Number of slices to send: Send
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...
+Pie Number of slices to send: Send


good luck, friend!
I've got no option but to sell you all for scientific experiments. Or a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 6150 times.
Similar Threads
printing from an applet toolbar the image displayed in the applet via a thread
Java Applet loading large image file
contour plot in java applet
Java swing library for svg like action
Web Application
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 05:48:48.