lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

frescobaldi extensions [was: python-ly, ly.indent]


From: mason
Subject: frescobaldi extensions [was: python-ly, ly.indent]
Date: Sat, 17 Aug 2019 16:02:59 -0700
User-agent: NeoMutt/20180716-346-437793-dirty

On 08/17, Urs Liska wrote:
> I can't promise it will eventually pay off in terms of effort, but I' 
> definitely encourage you to have a look at Frescobaldi's extension API, which 
> has been merged to master and will be available in the next release (whenever 
> that will be). It allows you to create and register extensions with a pretty 
> simply framework, and with that you (nearly) automatically get
> 
> * a Tool panel (see first attached image)
> * a Tool menu with actions defined by the extension
> * optional integration in various context menus
> * a configuration page in the Preferences (second attached image)
> 
> Writing an extension has two main advantages: Having the interface for the 
> stuff one wants to do within Frescobaldi, and having access to all of 
> Frescobaldi's functionality, just like you were adding something to 
> Frescobaldi itself. Of course you still have to do the actual programming 
> yourself, but it's a very convenient framework to start with. I think one 
> major use case for such extensions is creating interfaces for complex 
> projects or repertoires where you have to deal with creating LilyPond files, 
> managing content in directory structures, validating user input etc. The 
> extension shown in the attachments is there to keep track of the progress in 
> a project with 600+ music examples where the first and most important task 
> was to provide navigation and filtering in that vast amount of individual 
> files.
> 
> You may have a look at https://github.com/frescobaldi-extensions where two 
> different kinds of example extensions provide a first introduction. The third 
> repository with documentation is (as usual) very preliminary, but it may also 
> give introductory insights. I'd be glad if someone else would give it a try 
> and start using this new feature to give more feedback and different 
> perspectives. So far I'd say it's fairly stable but both the conception and 
> testing have been pretty much restricted to my own requirements so far.

Thanks. While I personally prefer command line tools, I would consider
turning this into a Frescobaldi extension if that would mean the
difference between something only being useful to me versus potentially
being useful to others. Some questions:

I am planning to include several openLilyLib packages as submodules.
Edition Engraver integration is a particularly high priority, because
one goal is to be able to maintain editions of scores and parts for
different paper and tablet sizes. I could see a dependency on
openLilyLib packages as being a problem for a Frescobaldi extension.
Unless the extension provides the relevant packages, the user will need
to supply the correct version of those packages, which will be hard
unless openLilyLib starts providing versioned releases of packages. (It
looks like ScholarLY already does,[1] but Edition Engraver does not.)
Are there plans to integrate any OLL packages into Frescobaldi (or
Lilypond proper, for that matter)?

For now my priority is to create the command line tools that will meet
my immediate needs, but if there is a way to do this so that I can then
more easily reuse the same code as the backend of a Frescobaldi
extension I will. I'm not familiar with Frescobaldi's code, but I
imagine that relying on tools provided by python-ly where possible would
be wise, and that I should generally avoid reimplementing something
Frescobaldi already does.

For example, the functions I've written so far use `print(line, file=f)`
to write Lilypond files line by line. See here[2] for instance. I assume
that Frescobaldi already has a way to write Lilypond files in order to
make the score wizard work, and that a Frescobaldi extension might be
better off taking the same approach. Is this something that can be
abstracted and used outside Frescobaldi in the way that its indentation
functionality can?

Based on your familiarity with Frescobaldi and Frescobaldi extensions,
do you have any general advice, or parts of Frescobaldi or that
extension I should look at? Ideally I would write this as a Frescobaldi
extension from the beginning, but it's unfamiliar territory for me and
for now I need to make something usable for my next Lilypond project
before spending a lot of time learning new skills. In addition to being
unfamiliar with Frescobaldi, I have never worked with graphical user
interfaces before.

Thanks,

Mason

[1] https://github.com/openlilylib/scholarly/releases
[2] https://notabug.org/chaosmonk/lilypond-project-manager/src/master/utils.py

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]