You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ab...@googlegroups.com
hi there,
I need to render piano music spanning Treble and bass register. I have read in an old thread that there is a limitation with the ABC parser not producing more than one clef, but that the rendering machine should be able to display multiple clefs.
Since I already use an internal representation of notes and chords, going via the parser is anyway not necessary for me.
However, the API seems pretty restricted with respect to generating a Tune object by hand? For example the Tune class has only private constructor. So my question is: How would I create a Tune with the API (not using the Parser) and populate it with the Clefs and notes/ chords?
Thanks very much!
Best, Hanns Holger
Hanns Holger Rutz
unread,
Aug 8, 2013, 5:59:16 AM8/8/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
val scoreView = new JScoreComponent
val tune = new Tune()
val music = tune.getMusic
val keyT = new KeySignature(Note.C, KeySignature.MAJOR)
val keyB = new KeySignature(Note.C, KeySignature.MAJOR)
keyB.setClef(Clef.BASS)
val voiceT = music.getVoice("1")
val voiceB = music.getVoice("2")
voiceT.addElement(keyT)
voiceB.addElement(keyB)
val n1 = new Note(Note.C)
n1.setStrictDuration(Note.QUARTER)
voiceT.addElement(n1)
... will just assemble the three elements sequentially: