On Wed, 2026-08-12 at 00:02 +0200, C. Stroppel wrote:
> Hi Richard,
> 
> Thank you for your open answer and also for the warning about the
> dead 
> ends regarding slurs! To be completely honest, I am still doubting my
> own skills a bit here. I tried to import a absolute bare minimum
> example 
> like {c' d' e' f} but it resulted in a completely blank screen and a 
> silent failure.

By contrast, I just tested this somewhat random file using Import
LilyPond (Limited) and it worked perfectly:


\version "2.24"
\score { 
          \new Staff
          << { g''4 \grace {f''8} } >>
       } 

The lesson is that LilyPond allows you to omit all sorts of context
which the Denemo importer is expecting. But the bottom line is that it
is very limited - I've not tried that command in a long time. However
what *does* work quite well (and does the bulk of the work of getting
the notes into a Denemo score) is the command 

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Location: Main Menu ▶ Edit
Label: Paste LilyPond notes
Name: PasteClipboard
Tooltip: Paste LilyPond notes from the text clipboard
This will import music written as LilyPond syntax
You open the LilyPond file in a texteditor, copy the stretch of notes
(control-c command in your texteditor usually) and then use this
command.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
I think this command requires pitches to be absolute, not relative, (so
use Frescobaldi's relative->absolute converter) and there are lots of
extra syntax that it won't cope with (e.g. \repeat {} etc), but for
long strings of notes it should be fine. E.g this works

g''4 \grace {f''8} b'' e

(you put that into the clipboard and invoke the command, it asks you
what time signature you are in and then it imports the notes into a
temporary tab and asks you to confirm pasting that into you score)
but it falls over if e.g. _\trill is put on a note - I suspect that
adding stuff like that to the current parser might not be too
difficult, except that there is such a lot of it...

I'll follow up with another reply to the rest of your email later...

Richard









> 
> I even tried exporting a simple melody from Denemo to LilyPond and 
> importing that exact, unaltered file back into Denemo. That failed 
> silently as well.
> 
> Since the "Import LilyPond" option exists in the menu, I have a
> genuine 
> worry that I am just being foolish or missing a crucial step, plugin,
> or 
> specific file header. Is the built-in import really so limited that
> it 
> cannot handle even a single, basic row of four notes? Or am I just
> doing 
> something fundamentally wrong as a user?
> 
> To answer your question about whether I use Denemo: I actually come
> from 
> the LilyPond side of things and usually use Frescobaldi. I did try
> out 
> Denemo in the past, but precisely because of this difficulty with 
> opening existing LilyPond files, I could never really use it. Out of 
> necessity, I ended up writing my own small editor that writes
> LilyPond.
> 
> If the baseline is indeed that even these simple structures fail, my 
> mission is clear: I want to build a stable C++ converter that
> extracts 
> at least the raw notes and rhythms from average LilyPond files while 
> completely ignoring the layout in the first step, so it never crashes
> no 
> matter what you throw at it.
> 
> But before I proceed with reverse-engineering the XML format for my
> PDF 
> guide, I would love to know if I am just misusing the current import 
> function.
> 
> Best regards,
> Christian
> 


Reply via email to