1

Is there any way to create and display music notation inside of a codenameone app?

For Java generally there are some libraries like for example JFugue that let you write music inside a program. Maybe also display it, i didn't try that out.

There is lilypond, which would work in a desktop environment if you were able to run it to make the pdf after generating the file itself.

I wrote a small app in Android Studio and had to write my own music notation logic and drew it with the help of png files on a Canvas. That worked okay for small musical examples of a clef and around 2-7 notes.

Now i want to do something similar in Codenameone and display at least a clef and some notes inside the app (maybe as an image) - they have to be generated with some random element while the program runs.

It would also be great to be able to write and show more than a few notes, displaying it somehow and maybe also with the ability to have it as a pdf file later.

Is it possible to use something that already exists?

Thanks a lot!

itsme
  • 43
  • 4
  • 1
    Nothing comes to mind but the approach you took with Android should work fine for Codename One since we have equivalent drawing APIs. – Shai Almog Feb 17 '22 at 03:45
  • There would be two different approaches i thought about. first, making and importing my own font, would that work? second, there are online compilers for lilypond. but can i use a website and make 3 or 4 clicks on it without the user of the app "seeing" it or having to click themselves? – itsme Feb 18 '22 at 09:23
  • 1
    Sure you can import any TTF file via CSS, Resources or code. Scraping is a fragile approach in general. You can do that but it's got its own problem. – Shai Almog Feb 19 '22 at 08:43

0 Answers0