Re: OO and MIDI support

2007-11-04 Thread Erik Sandberg
On Friday 05 October 2007, Hans Aberg wrote:
 On 5 Oct 2007, at 01:20, Graham Percival 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.

Erik


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: OO and MIDI support

2007-11-04 Thread Hans Aberg

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




___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


OO and MIDI support

2007-10-05 Thread Hans Aberg

On 5 Oct 2007, at 01:20, Graham Percival 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.


  Hans Åberg




___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user