lilypond-user
[Top][All Lists]
Advanced

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

Re: OO and MIDI support


From: Hans Aberg
Subject: Re: OO and MIDI support
Date: Sun, 4 Nov 2007 21:43:46 +0100

On 4 Nov 2007, at 17:43, Erik Sandberg wrote:

Midi support in lilypond is quite limited, and this is not likely
to change in the near future.

Might it possible to handle this by OO (object orientation)? The idea
is that if objects can be defined (in pseudocode)
   turn := default: ...
           midi: ...
           short: ...
           quintuplet: ...
   ;
And one then is able to write code like
   d8^\turn[staff->short,midi->quintuplet]
if one in this position wants the turn to not be the defaults, but
then the staff to be written in the "short" form, and MIDI be written
as a quintuplets.

The principle is quite general. So it might be useful for handing a
number of problems. The enhanced MIDI support would emerge as a
byproduct of this OO support.

I don't understand all of this, but wouldn't it be possible to achieve most of this functionality with tags? You could just use \keepWithTag #'midi when creating midi, and then tag stuff with midi in the definition of \turn.

I am not sure how this stuff you are mentioning is working, but essentially what OO does is creating an easy to use user interface. It is perfectly possible to do OO programming by hand in C, and C++ gets some of its OO from such C by hand programming techniques, only developed as language features. And Guile has some OO package, I think. What I wrote above is a form of tagging, whose definition later can be changed by the "->" above, and in the compilation, selected by some context variables.

  Hans Ã…berg






reply via email to

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