• Post Reply Bookmark Topic Watch Topic
  • New Topic

Music score notation in Java classes?  RSS feed

 
Mary Dawson
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mary Dawson
Feb 8th 09

Dear Javaranch members,
Could you tell me if you know of music notation(including 'flat' & 'sharp' ) in Java classes? I wanted to develop a program that'd translate guitar tablature into music score and vice versa.
Hope you can help,
Yours
Mary (aka 'Tingaling')
 
Campbell Ritchie
Marshal
Posts: 56599
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch
Don't know myself, but somebody asked a similar question recently: here. The poster was referred to something called abc4j. Please look at that and see whether that helps you.
 
Campbell Ritchie
Marshal
Posts: 56599
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Question too difficult for beginners'. Moving.
 
Mark Vedder
Ranch Hand
Posts: 624
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you asking how to print or display music notation in Java?

If so, there are Unicode characters that represent some music symbols. If you go to the Unicode Character Search page at FileFormat.info and search for music flat for example, you will find that the Unicode sequence is u266D. So we can output that in Java like this:



Keep in mind you will need a font capably of printing that character. The FileFormat.info site has a link on each characters page that will show some fonts that can display that character.

You can also enter the character directly into your Java source file. How you do such will vary depending on the editor you are using. (FileFormat.info has some tips.) Worse case, print them all out and then use copy and paste. Just be sure to save the file with an appropriate file encoding. UTF-8 would be the best recommendation.

Is that what you are looking for?
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also, see this thread.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!