MIDI export: \partial measure and volta repeats

2009-06-17 Thread Federico Bruni

Hi,

I'm trying to export a lilypond score to MIDI (then I want to import 
it in TuxGuitar).

I have 2 problems:


1. the score starts with a partial measure, but the MIDI can't 
understand that...so when I import it in TuxGuitar, the notes are not 
placed correctly in the bars.

There's any cool workaround?

I know TuxGuitar does not support partial measure.. Maybe I should 
write a score tailored for the midi output (beside the one for the PDF 
output) and substitute \partial with some rests.




2. the repeats and alternatives are not displayed correctly. I've read 
about this workaround:

http://lilypond.org/doc/v2.13/Documentation/user/lilypond/Repeats-in-MIDI#Repeats-in-MIDI

But the problem is: I have a two voice score and the repeats are in 
the voices.
Again, I can't see any solution but writing a tailored score for the 
MIDI output (that is, creating a copy of the voices and replacing 
volta repeats with unfold repeats).


Or there is a smarter way to get the same result?

Thanks for your help!

Federico

==

To be very clear, I'm thinking about something like this:

% pdf output music
upper= { music with \partial and volta repeats...}
lower= { music with \partial and volta repeats...}

\score {
 <<
 \new Staff = "guitar" <<
  \context Voice = "upper guitar" { \clef "G_8" \voiceOne 
\upper }
  \context Voice = "lower guitar" { \clef "G_8" \voiceTwo 
\lower } >>

 \new TabStaff = "tab" <<
   \context TabVoice = "upper tab" { \clef "moderntab" \voiceOne 
\upper }
   \context TabVoice = "lower tab" { \clef "moderntab" \voiceTwo 
\lower } >>

 >>

\layout {
}
}


% midi output music
uppermidi= { music without \partial and with unfold repeats... }
lowermidi= { music without \partial and with unfold repeats... }

\score {
 <<
 \new Staff = "guitar" <<
  \context Voice = "upper guitar" { \clef "G_8" \voiceOne 
\uppermidi }
  \context Voice = "lower guitar" { \clef "G_8" \voiceTwo 
\lowermidi } >>

 \new TabStaff = "tab" <<
   \context TabVoice = "upper tab" { \clef "moderntab" \voiceOne 
\uppermidi }
   \context TabVoice = "lower tab" { \clef "moderntab" \voiceTwo 
\lowermidi } >>

 >>

\midi {
}
}



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


Re: MIDI export: \partial measure and volta repeats

2009-06-17 Thread Federico Bruni

Federico Bruni wrote:

Hi,

I'm trying to export a lilypond score to MIDI (then I want to import it 
in TuxGuitar).

I have 2 problems:



Just a quick explanation.
I know it may seem weird exporting from Lilypond to TuxGuitar (most of 
people is interested about the other way around, from .tg 2 .ly).


But I've just happened to need to open this score in TuxGuitar.

Also, there is a third problem I forgot to mention:

3. the MIDI output is polyphonic according to timidity (I think, see 
below), but not when I import it in TuxGuitar:


Playing Guitar/Tablature/Bach/bourree.midi
MIDI file: Guitar/Tablature/Bach/bourree.midi
Format: 1  Tracks: 2  Divisions: 384
Sequence: control track
Text: creator:
Text: GNU LilyPond 2.13.0
Track name: guitar
Instrument: acoustic guitar (steel)

If I set a channel per voice in the MIDI output, I get a two track 
file in TuxGuitar. But I want one tab, not two...


I guess I'd better write it from scratch..but I'd like to try some 
smart solutions before giving up :-)

If you have hints, please share it.

Thanks!


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


Re: MIDI export: \partial measure and volta repeats

2009-06-17 Thread Francisco Vila
2009/6/17 Federico Bruni :
> 1. the score starts with a partial measure, but the MIDI can't understand
> that...so when I import it in TuxGuitar, the notes are not placed correctly
> in the bars.
> There's any cool workaround?

> I know TuxGuitar does not support partial measure.. Maybe I should write a
> score tailored for the midi output (beside the one for the PDF output) and
> substitute \partial with some rests.

I'd do exactly that.

> 2. the repeats and alternatives are not displayed correctly. I've read about
> this workaround:
> http://lilypond.org/doc/v2.13/Documentation/user/lilypond/Repeats-in-MIDI#Repeats-in-MIDI
>
> But the problem is: I have a two voice score and the repeats are in the
> voices.
> Again, I can't see any solution but writing a tailored score for the MIDI
> output (that is, creating a copy of the voices and replacing volta repeats
> with unfold repeats).

Again, I'd do that. I think that tailored scores for MIDI output are
the standard way of doing things. In a perfect world, the score you
code for printing with lilypond would serve without any modifications
to produce a perfect MIDI show, but there is still a large gap between
those worlds, given their respective, very different requirements.

-- 
Francisco Vila. Badajoz (Spain)
www.paconet.org


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


Re: MIDI export: \partial measure and volta repeats

2009-06-17 Thread Francisco Vila
2009/6/17 Federico Bruni :
> 3. the MIDI output is polyphonic according to timidity (I think, see below),
> but not when I import it in TuxGuitar:
>
> Playing Guitar/Tablature/Bach/bourree.midi
> MIDI file: Guitar/Tablature/Bach/bourree.midi
> Format: 1  Tracks: 2  Divisions: 384
> Sequence: control track
> Text: creator:
> Text: GNU LilyPond 2.13.0
> Track name: guitar
> Instrument: acoustic guitar (steel)
>
> If I set a channel per voice in the MIDI output, I get a two track file in
> TuxGuitar. But I want one tab, not two...
>
> I guess I'd better write it from scratch..but I'd like to try some smart
> solutions before giving up :-)
> If you have hints, please share it.

Maybe you should try to \partcombine both on a single staff, only for
MIDI. Staves become MIDI channels with their voices merged.

-- 
Francisco Vila. Badajoz (Spain)
www.paconet.org


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


Re: MIDI export: \partial measure and volta repeats

2009-06-17 Thread Peter Chubb
> "Federico" == Federico Bruni  writes:

Federico> Hi, I'm trying to export a lilypond score to MIDI (then I
Federico> want to import it in TuxGuitar).  I have 2 problems:


Federico> 1. the score starts with a partial measure, but the MIDI
Federico> can't understand that...so when I import it in TuxGuitar,
Federico> the notes are not placed correctly in the bars.  There's any
Federico> cool workaround?

MIDI should understand this. But:...

Federico> I know TuxGuitar does not support partial measure.. Maybe I
Federico> should write a score tailored for the midi output (beside
Federico> the one for the PDF output) and substitute \partial with
Federico> some rests.



Federico> 2. the repeats and alternatives are not displayed
Federico> correctly. I've read about this workaround:
Federico> 
http://lilypond.org/doc/v2.13/Documentation/user/lilypond/Repeats-in-MIDI#Repeats-in-MIDI

\unfoldRepeats will still work.

Do like this:

\score {
\unfoldRepeats <<
\context Staff << 
what you had before
>>
\midi {
}
}

--
Dr Peter Chubb  http://www.gelato.unsw.edu.au  peterc AT gelato.unsw.edu.au
http://www.ertos.nicta.com.au   ERTOS within National ICT Australia


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


Re: MIDI export: \partial measure and volta repeats

2009-06-17 Thread Federico Bruni

Francisco Vila wrote:

 I think that tailored scores for MIDI output are
the standard way of doing things. In a perfect world, the score you
code for printing with lilypond would serve without any modifications
to produce a perfect MIDI show, but there is still a large gap between
those worlds, given their respective, very different requirements.



Thanks Francisco,

I just wanted to be sure I was not making the lilypond file much 
larger than necessary.

Good to know that those workaround are ok  :-)


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


Re: RFC: new vertical layout engine

2009-06-17 Thread Joe Neeman
On Tue, Jun 16, 2009 at 3:32 PM, Cameron Horsburgh wrote:

> At Mon, 15 Jun 2009 18:25:54 +0300,
> Joe Neeman  wrote:
> >
> > [1  ]
> > [1.1  ]
> >
> > [1.2  ]
> > I've started working on a new system for doing vertical layout in one
> pass (ie. positioning and
> > stretching the systems simultaneously). This should give better default
> behaviour than the
> > current code and it should also allow easier and more useful overrides. I
> plan to merge the code
> > after 2.14 is released, so it should appear in the 2.16 stable version.
> The code is currently in
> > the dev/jneeman git branch. It basically works (I hope), but it is
> missing a lot of previously
> > existing functionality. I'm interested in hearing from people who like to
> override vertical
> > spacing stuff (even more so if they can compile from git and test
> things): what sort of
> > overrides do you use and what sort of overrides would you like to have
> available? Also, are
> > there any "high-level" overrides that would free you from having to
> position systems manually?
> >
>
> I produce a lot of conductor's scores (with one system to a page) but
> I've always found the spacing to detract a lot from the overall
> excellence of the typesetting. I've just tried out the new code on one
> of my scores and I must say I am very impressed with the result. In
> fact, I'm going to print my most recent score and replace the one I
> delivered a couple of weeks ago. It is far, far better.
>
> I don't usually use a lot of the fancier layout stuff, so I'm
> wondering what you have removed from this version. However, I would
> most certainly use some of the grouping schemes Reinhold mentioned in
> his message.


As of my latest push, I think there are no regressions in the
configurability, although some tweaks got a bit uglier (to fix a lyric line,
you need to override next-staff-spacing on the staff above it).


> What I would ideally like (for systems-per-page = #1) is for the top
> line of the top staff and the bottom line of the bottom staff to be
> the same for every page, and everything suitably spread out
> between. In other words, the top and bottom staves should be given
> absolute positions and everything else is calculated afterwards.


With first-system-spacing and last-system-spacing in the paper block, this
is now achievable:
\paper {
  first-system-spacing = #'((space . 20) (stretchability . 0))
  last-system-spacing = #'((space . 20) (stretchability . 0))
}

 It isn't perfect, though, because it doesn't (yet) consider the top-matter
or the bottom-matter. For example, the top staff of the first page will be
above the top staff of the second page because the first page doesn't have a
page number and the second one does.

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


Re: MIDI export: \partial measure and volta repeats

2009-06-17 Thread Federico Bruni

Peter Chubb wrote:



Federico> 2. the repeats and alternatives are not displayed
Federico> correctly. I've read about this workaround:
Federico> 
http://lilypond.org/doc/v2.13/Documentation/user/lilypond/Repeats-in-MIDI#Repeats-in-MIDI

\unfoldRepeats will still work.

Do like this:

\score {
\unfoldRepeats <<
	\context Staff << 
		what you had before

>>
\midi {
}
}



Thanks Peter,

in my first try I couldn't get unfoldRepeats to work (I thought it 
should be placed inside the voices) so I substituted all the "\repeats 
volta" with "\repeat unfold" and it worked fine.


But this solution is much better, I don't need to change all the 
repeat volta..



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


Re: MIDI export: \partial measure and volta repeats

2009-06-17 Thread Federico Bruni

Francisco Vila wrote:

2009/6/17 Federico Bruni :

3. the MIDI output is polyphonic according to timidity (I think, see below),
but not when I import it in TuxGuitar:

Playing Guitar/Tablature/Bach/bourree.midi
MIDI file: Guitar/Tablature/Bach/bourree.midi
Format: 1 �Tracks: 2 �Divisions: 384
Sequence: control track
Text: creator:
Text: GNU LilyPond 2.13.0
Track name: guitar
Instrument: acoustic guitar (steel)

If I set a channel per voice in the MIDI output, I get a two track file in
TuxGuitar. But I want one tab, not two...

I guess I'd better write it from scratch..but I'd like to try some smart
solutions before giving up :-)
If you have hints, please share it.


Maybe you should try to \partcombine both on a single staff, only for
MIDI. Staves become MIDI channels with their voices merged.



I've tried this (of course in the midi score) but it's not working, I 
still have not poliphony in TuxGuitar:



\score {
\unfoldRepeats  <<
\context Staff = "guitar"  \partcombine  \uppermidi \lowermidi
 >>


So this is the last problem left...


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


Re: RFC: new vertical layout engine

2009-06-17 Thread Cameron Horsburgh
At Wed, 17 Jun 2009 14:24:18 +0300,
Joe Neeman  wrote:
> 
> On Tue, Jun 16, 2009 at 3:32 PM, Cameron Horsburgh  
> wrote:
> 
>
> I produce a lot of conductor's scores (with one system to a page) but
> I've always found the spacing to detract a lot from the overall
> excellence of the typesetting. I've just tried out the new code on one
> of my scores and I must say I am very impressed with the result. In
> fact, I'm going to print my most recent score and replace the one I
> delivered a couple of weeks ago. It is far, far better.
>
> I don't usually use a lot of the fancier layout stuff, so I'm
> wondering what you have removed from this version. However, I would
> most certainly use some of the grouping schemes Reinhold mentioned in
> his message.
> 
> As of my latest push, I think there are no regressions in the 
> configurability, although some
> tweaks got a bit uglier (to fix a lyric line, you need to override 
> next-staff-spacing on the
> staff above it).

Ah, I rarely use lyrics, and I don't remember ever needing to tweak them.

> What I would ideally like (for systems-per-page = #1) is for the top
> line of the top staff and the bottom line of the bottom staff to be
> the same for every page, and everything suitably spread out
> between. In other words, the top and bottom staves should be given
> absolute positions and everything else is calculated afterwards.
> 
> With first-system-spacing and last-system-spacing in the paper block, this is 
> now achievable:
> \paper {
>   first-system-spacing = #'((space . 20) (stretchability . 0))
>   last-system-spacing = #'((space . 20) (stretchability . 0))
> }
>

This looks pretty useful. I'll have a play with it in the next day or
two. Thanks for the work!

--

Cameron Horsburgh

Blog: http://spiritcry.wordpress.com/




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


Re: MIDI export: \partial measure and volta repeats

2009-06-17 Thread Francisco Vila
2009/6/17 Federico Bruni :
> Francisco Vila wrote:
>>
>> 2009/6/17 Federico Bruni :
>>>
>>> 3. the MIDI output is polyphonic according to timidity (I think, see
>>> below),
>>> but not when I import it in TuxGuitar:
>>>
>>> Playing Guitar/Tablature/Bach/bourree.midi
>>> MIDI file: Guitar/Tablature/Bach/bourree.midi
>>> Format: 1 �Tracks: 2 �Divisions: 384
>>> Sequence: control track
>>> Text: creator:
>>> Text: GNU LilyPond 2.13.0
>>> Track name: guitar
>>> Instrument: acoustic guitar (steel)
>>>
>>> If I set a channel per voice in the MIDI output, I get a two track file
>>> in
>>> TuxGuitar. But I want one tab, not two...
>>>
>>> I guess I'd better write it from scratch..but I'd like to try some smart
>>> solutions before giving up :-)
>>> If you have hints, please share it.
>>
>> Maybe you should try to \partcombine both on a single staff, only for
>> MIDI. Staves become MIDI channels with their voices merged.
>>
>
> I've tried this (of course in the midi score) but it's not working, I still
> have not poliphony in TuxGuitar:
>
>
> \score {
>        \unfoldRepeats  <<
>        \context Staff = "guitar"  \partcombine  \uppermidi \lowermidi
>  >>
>
>
> So this is the last problem left...

>From your message I understood that you wanted one tab, not two. But
what I did not understand is that you do want polyphony and for some
reason you don't get any. What are exactly the symptoms that make you
say there is not polyphony? Two voices merged on a track should sound
polyphonic.

-- 
Francisco Vila. Badajoz (Spain)
www.paconet.org


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


Re: MIDI export: \partial measure and volta repeats

2009-06-17 Thread Federico Bruni

Francisco Vila wrote:
 

From your message I understood that you wanted one tab, not two. But

what I did not understand is that you do want polyphony and for some
reason you don't get any. What are exactly the symptoms that make you
say there is not polyphony? Two voices merged on a track should sound
polyphonic.



The midi output is OK.

I'm not getting the polyphony *just when I import the midi in TuxGuitar*.
So it may be an issue with the TuxGuitar midi plugin..

TuxGuitar has added support to polyphony quite recently (april 2009, 
version 1.1), so maybe the midi plugin is not ready to import a two 
voice midi correctly.


Julian (TuxGuitar developer), are you reading us?


Cheers,
Federico


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


Re: MIDI export: \partial measure and volta repeats

2009-06-17 Thread Mats Bengtsson

Federico Bruni wrote:

Francisco Vila wrote:

 I think that tailored scores for MIDI output are
the standard way of doing things. In a perfect world, the score you
code for printing with lilypond would serve without any modifications
to produce a perfect MIDI show, but there is still a large gap between
those worlds, given their respective, very different requirements.



Thanks Francisco,

I just wanted to be sure I was not making the lilypond file much 
larger than necessary.

Good to know that those workaround are ok  :-)
Please note that Francisco did not say that you have to repeat any of 
the actual music in your LilyPond file. It should be easy to obtain the 
things that have been discussed in this thread using only two separate 
\score blocks for the printed version and the MIDI version, if you make 
use of variables in a suitable way.


Regarding your problems with polyphony, you should figure out what kind 
of MIDI construct that TuxGuitar will turn into the kind of polyphony 
that you are looking for. There are many different ways to generate MIDI 
files. Some related information on how LilyPond generates MIDI files and 
how this can be customized, is provided in 
http://lsr.dsi.unimi.it/LSR/Item?id=438


  /Mats


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


Re: MIDI export: \partial measure and volta repeats

2009-06-17 Thread Federico Bruni

Mats Bengtsson wrote:


Please note that Francisco did not say that you have to repeat any of 
the actual music in your LilyPond file. It should be easy to obtain the 
things that have been discussed in this thread using only two separate 
\score blocks for the printed version and the MIDI version, if you make 
use of variables in a suitable way.




yes, actually the example written by Peter Chubb helped me 
understanding how to use \unfoldRepeats.


But what about the starting partial measure?
*How can I tell in the midi score section: "hey, substitute the 
\partial in the first measure with a rest"?*


If I can set this variable, I can remove the voices I wrote 
specifically for the MIDI.

And my score would get back to normal size :)

Regarding your problems with polyphony, you should figure out what kind 
of MIDI construct that TuxGuitar will turn into the kind of polyphony 
that you are looking for. There are many different ways to generate MIDI 
files.




I see, I'll search some info in the TuxGuitar website (today I can't 
reach it).

Thanks for your help


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


Re: RFC: new vertical layout engine

2009-06-17 Thread Kieren MacMillan

Hi Joe,

What I would *really* love are high-level commands to set intra-piece  
(section) system-count and page-count options.
For example, I'd like to say that in an ABA form piece, the B section  
must be on two pages (whereas the leading A and trailing A' sections  
can be "auto-flowed" by Lilypond


Could that be possible?

Thanks,
Kieren.


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


Re: MIDI export: \partial measure and volta repeats

2009-06-17 Thread Francisco Vila
2009/6/17 Federico Bruni :
> But what about the starting partial measure?
> *How can I tell in the midi score section: "hey, substitute the \partial in
> the first measure with a rest"?*
>
> If I can set this variable, I can remove the voices I wrote specifically for
> the MIDI.
> And my score would get back to normal size :)

You define a variable for the upbeat measure twice. Once with partial
for the printed score, once with rests for the MIDI. Then put the
appropriate variable in sequence with the rest of the music,
separately for each score section. I'll bake a working example if it
is not clear.

-- 
Francisco Vila. Badajoz (Spain)
www.paconet.org


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


Re: MIDI export: \partial measure and volta repeats

2009-06-17 Thread Federico Bruni

Francisco Vila wrote:

2009/6/17 Federico Bruni :

But what about the starting partial measure?
*How can I tell in the midi score section: "hey, substitute the \partial in
the first measure with a rest"?*

If I can set this variable, I can remove the voices I wrote specifically for
the MIDI.
And my score would get back to normal size :)


You define a variable for the upbeat measure twice. Once with partial
for the printed score, once with rests for the MIDI. Then put the
appropriate variable in sequence with the rest of the music,
separately for each score section. I'll bake a working example if it
is not clear.



An example would be very useful..

I don't know hot to add the two new variables in sequence with the 
rest of the music.


I tried to define them this way, but I guess there's something wrong 
with polyphony:


beatpartial= \relative c'   {
<< \partial  4  e8  fs-4  >>
<< \partial  4  g,8-3  fs-3  >>
}

beatrests= \relative c'   {
<< s2.  e8 fs-4   >>  <<  s2.  g,8-3  fs-3  >>
}


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


Re: MIDI export: \partial measure and volta repeats

2009-06-17 Thread Francisco Vila
2009/6/17 Federico Bruni :
> An example would be very useful..
>
> I don't know hot to add the two new variables in sequence with the rest of
> the music.

firstPartial = { \partial 4  e'8  fis' }
secondPartial = { \partial 4 g8  fis }

firstRests = { s2. e'8 fis' }
secondRests = { s2. g8 fis }

firstRestOfTheMusic = { g'1 }
secondRestOfTheMusic = { g1 }

\score { << { \firstPartial \firstRestOfTheMusic }
{ \secondPartial \secondRestOfTheMusic } >>
}

\score { << { \firstRests \firstRestOfTheMusic }
{ \secondRests \secondRestOfTheMusic } >>
}

> I tried to define them this way, but I guess there's something wrong with
> polyphony:

>        << \partial  4  e8  fs-4  >>
>        << \partial  4  g,8-3  fs-3  >>

Yes, you put single notes in a simultaneous construct. Please make
expressions by enclosing notes into curly braces.

-- 
Francisco Vila. Badajoz (Spain)
www.paconet.org


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


Re: MIDI export: \partial measure and volta repeats

2009-06-17 Thread Mats Bengtsson

Francisco Vila wrote:

2009/6/17 Federico Bruni :
  

But what about the starting partial measure?
*How can I tell in the midi score section: "hey, substitute the \partial in
the first measure with a rest"?*

If I can set this variable, I can remove the voices I wrote specifically for
the MIDI.
And my score would get back to normal size :)



You define a variable for the upbeat measure twice. Once with partial
for the printed score, once with rests for the MIDI. Then put the
appropriate variable in sequence with the rest of the music,
separately for each score section. I'll bake a working example if it
is not clear.

  
An alternative that perhaps is even simpler, is to use the \tag  and 
\keepWithTag features, see

http://lilypond.org/doc/v2.12/Documentation/user/lilypond/Different-editions-from-one-source#Using-tags
for a general description and
http://lists.gnu.org/archive/html/lilypond-user/2009-02/msg00314.html
for an example where it's used to make different versions in midi and 
printed output.


   /Mats

--
=
Mats Bengtsson
Signal Processing
School of Electrical Engineering
Royal Institute of Technology (KTH)
SE-100 44  STOCKHOLM
Sweden
Phone: (+46) 8 790 8463 
   Fax:   (+46) 8 790 7260
Email: mats.bengts...@ee.kth.se
WWW: http://www.s3.kth.se/~mabe
=



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


Re: SacredHarpHeads: possible solution to major/minor problem

2009-06-17 Thread Neil Puttock
2009/6/17 Ted Walther :
> Neil, great work on Sacred Harp stuff.

Thank you. :)

I think this was one of my first attempts at LilyPond hacking.

>
> In minor keys, the sixth degree is played half a step higher than is
> written.  Can you alter the minor mode so that when I correctly write
> the sixth degree half a step higher, it doesn't show the sharp sign?

Sounds like you'd find a suppress-accidental feature useful too
(http://lists.gnu.org/archive/html/lilypond-devel/2009-06/msg00346.html).

Alternatively, I think it would be possible to create a new accidental
style which combines the basic features of one of the standard styles
(would you be using 'default?) with a check for the sixth degree.

Regards,
Neil


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


Re: SacredHarpHeads: possible solution to major/minor problem

2009-06-17 Thread Jonathan Kulp

Neil Puttock wrote:

2009/6/17 Ted Walther :

Neil, great work on Sacred Harp stuff.


Thank you. :)

I think this was one of my first attempts at LilyPond hacking.


In minor keys, the sixth degree is played half a step higher than is
written.  Can you alter the minor mode so that when I correctly write
the sixth degree half a step higher, it doesn't show the sharp sign?


Sounds like you'd find a suppress-accidental feature useful too
(http://lists.gnu.org/archive/html/lilypond-devel/2009-06/msg00346.html).

Alternatively, I think it would be possible to create a new accidental
style which combines the basic features of one of the standard styles
(would you be using 'default?) with a check for the sixth degree.



Can't you just a modal key signature instead of a tonal one? 
You're describing the Dorian mode, after all.  If the tonic is G, 
then tell Lilypond the key is D minor and you should be all set.


Jon

--
Jonathan Kulp
http://www.jonathankulp.com


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


Re: SacredHarpHeads: possible solution to major/minor problem

2009-06-17 Thread Mark Polesky

Jonathan Kulp wrote:
> Can't you just a modal key signature instead of a tonal one?
> You're describing the Dorian mode, after all.  If the tonic is
> G, then tell Lilypond the key is D minor and you should be all
> set.

Even better:

\key g \dorian

- Mark


  


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


Re: SacredHarpHeads: possible solution to major/minor problem

2009-06-17 Thread Jonathan Kulp

Mark Polesky wrote:

Jonathan Kulp wrote:

Can't you just a modal key signature instead of a tonal one?
You're describing the Dorian mode, after all.  If the tonic is
G, then tell Lilypond the key is D minor and you should be all
set.


Even better:

\key g \dorian



Is that already a pre-defined macro?  Sweet!

Jon

--
Jonathan Kulp
http://www.jonathankulp.com


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


Re: SacredHarpHeads: possible solution to major/minor problem

2009-06-17 Thread Ted Walther

On Wed, Jun 17, 2009 at 04:28:29PM -0700, Mark Polesky wrote:


Jonathan Kulp wrote:

Can't you just a modal key signature instead of a tonal one?
You're describing the Dorian mode, after all.  If the tonic is
G, then tell Lilypond the key is D minor and you should be all
set.


Even better:

\key g \dorian


How would that affect the key signature that shows at the beginning of
each line?

How about a \sacredHarpKey that does the correct mapping etc?

In Sacred Harp music, the \sacredHarpHeads depends on the key you are
in.  Using Dorian would mess that up.

The way the different note-heads are used needs its own solution.
\dorian doesn't appear to be it.

By the way, instead of Scheme code, here is what I was using to set
sacredHarpHeads 3 years ago:

For the major keys, this definition works:

sacredHarpHeads = \set shapeNoteStyles = ##(fa #f la fa #f la mi)

But for minor keys, this definition must be in place:

sacredHarpHeads = \set shapeNoteStyles = ##(la mi fa #f la fa #f)

But that doesn't address the accidental issue at all.

Neil, are you up to making some sacred harp major and minor keys that
supress the accidental?

There must be a way in the scheme code to suppress the accidental!!!

Ted

--
   There's a party in your skull.  And you're invited!

Name:Ted Walther
Phone:   604-755-7732
Skype:   tederific
Email:   t...@reactor-core.org
Address: 1755 246 St, LANGLEY BC  V2Z1G4


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


Re: SacredHarpHeads: possible solution to major/minor problem

2009-06-17 Thread Jonathan Kulp

Ted Walther wrote:

On Wed, Jun 17, 2009 at 04:28:29PM -0700, Mark Polesky wrote:


Jonathan Kulp wrote:

Can't you just a modal key signature instead of a tonal one?
You're describing the Dorian mode, after all.  If the tonic is
G, then tell Lilypond the key is D minor and you should be all
set.


Even better:

\key g \dorian


How would that affect the key signature that shows at the beginning of
each line?

How about a \sacredHarpKey that does the correct mapping etc?

In Sacred Harp music, the \sacredHarpHeads depends on the key you are
in.  Using Dorian would mess that up.

The way the different note-heads are used needs its own solution.
\dorian doesn't appear to be it.



I plead total ignorance of Sacred Harp notation, but Dorian mode 
is exactly what you describe, a minor mode with raised 6th scale 
degree.  If you say "\key g \dorian", then the key signature will 
have one flat in it, and the scale degrees should all be correct: 
g (1st) a (2nd), and so forth.  It seems like this should do what 
you want.


Jon

--
Jonathan Kulp
http://www.jonathankulp.com


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


Time signature and bar engraver workarounds

2009-06-17 Thread Kalen Mercer
I am working on a piece with no time signature or bar engraver.
However, I do want to
have a few bars here and there, and a bar to end the piece. I am using
the SATB vocal
score on this page: http://lilypond.org/doc/v2.12/Documentation/user/lilypond-
learning/Vocal-ensembles#Vocal-ensembles

Is there a tweak for adjusting when the bar engraver works or not?
___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Time signature and bar engraver workarounds

2009-06-17 Thread James E. Bailey


On 18.06.2009, at 03:30, Kalen Mercer wrote:

I am working on a piece with no time signature or bar engraver.  
However, I do want to
have a few bars here and there, and a bar to end the piece. I am  
using the SATB vocal
score on this page: http://lilypond.org/doc/v2.12/Documentation/ 
user/lilypond-

learning/Vocal-ensembles#Vocal-ensembles

Is there a tweak for adjusting when the bar engraver works or not?
Yes, you'll want to see in the Learning Manual on how to make objects  
invisible.


James E. Bailey



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


Re: RFC: new vertical layout engine

2009-06-17 Thread Andrew Hawryluk
On Tue, Jun 16, 2009 at 3:52 AM, Joe Neeman wrote:
> On Mon, Jun 15, 2009 at 9:05 PM, Reinhold Kainhofer 
> wrote:
>>
>> -BEGIN PGP SIGNED MESSAGE-
>> Hash: SHA1
>>
>> Am Montag, 15. Juni 2009 17:25:54 schrieb Joe Neeman:
>> > I've started working on a new system for doing vertical layout in one
>> > pass
>> > (ie. positioning and stretching the systems simultaneously).
>>
>> Since I have also attempted to improve the vertical stretching of
>> orchestral
>> (choir + full orchestra) full scores (but failed, since I couldn't get the
>> springs-and-rods problem to return any useful solution), I spend a while
>> thinking about what should be done:
>
> Those are some comprehensive comments, thanks! Some remarks/questions
> below...
>>
>> - -) Being able to set stretching factors on a StaffGroup-level. In
>> particular,
>> for full scores there are staff groups for woodwind, brass, vocal voices,
>> strings etc. When the whole system is stretched vertically, there is more
>> space in printed scores between the groups than between the staves inside
>> the
>> individual groups (i.e. the instrumental staff groups use a different
>> spring
>> constant than the staff group for the whole system). See e.g. a modern
>> Bärenreiter edition:
>>
>> http://www.fam.tuwien.ac.at/~reinhold/LilyPond/VerticalStretching/Schubert_StabatMater_0050.pdf
>> Current bad lilypond results (with huge stretching) are:
>>
>> http://www.fam.tuwien.ac.at/~reinhold/LilyPond/VerticalStretching/stretching_oly_largestretch.pdf
>>
>> This is really necessary for full scores for the conductor to get a quick
>> overview over the instrument groups. In particular, look at the
>> stretching_oly_vocalstaves.pdf file (current results with lilypond!), hide
>> the
>> group brackets at the left and try to guess which staves belong
>> together...
>> Sample file (with hardly any stretching):
>>
>> http://www.fam.tuwien.ac.at/~reinhold/LilyPond/VerticalStretching/stretching_oly_vocalstaves.pdf
>>
>> You would never guess which staves belong together..
>
> This will certainly the possible in the layout code, but I don't see how to
> make it nicely accessible through properties. Currently, the information
> about staff groups doesn't make it as far as the backend. If I can't find a
> nice way to do this, the functionality will be available anyway by setting
> 'previous-space on the first staff and 'next-space on the last staff of a
> staff group.
>
>> - -) The stretching should not be done by simply inserting the same space
>> between all the staves, since then staves with a high skyline (e.g. one
>> staff
>> has some dynamic signs, while other don't) will be spaced too much
>> compared to
>> staves with a low skyline. The stretching should rather attempt to space
>> the
>> center-line of the staves (almost) equally.
>
> This is already done (assuming it works; I haven't checked carefully).
>
>>
>> - -) For staves with lyrics it might give better results to almost ignore
>> the
>> lyrics for spacing and then squeeze in the lyrics in the remaining space.
>> Otherwise the vocal staves with lyrics will be spaced way too much
>> compared to
>> e.g. the strings section. For a hand-engraving, see e.g. the 1897
>> Breitkopf
>> edition of Schubert's Stabat mater:
>>
>> http://www.fam.tuwien.ac.at/~reinhold/LilyPond/VerticalStretching/Partitur_Breitkopf1897-
>> Seite2.pdf
>> Compare this to the current LilyPond output:
>>
>> http://www.fam.tuwien.ac.at/~reinhold/LilyPond/VerticalStretching/stretching_oly_vocalstaves.pdf
>
> Ok, I was planning anyway to divide VerticalAxisGroups into "spaceable" (eg.
> staves) and "non-spaceable"
> (eg.  dynamics in a piano staff) categories. The "spaceable" lines will
> participate in the layout algorithm (ensuring that space is reserved for the
> non-spaceable lines) and then the non-spaceable lines will be distributed
> somehow in between the spaceable ones. This is how I intend to do centered
> dynamics for piano staves; I could do something similar for lyrics (maybe
> for figured bass also?).

Could there be a property that specifies whether the non-spaceable are to be
a) centered bewteen the neighboring lines,
b) positioned as close to the upper line as possible, or
c) positioned as close to the lower line as possible?

This would cover (a) piano-centered dynamics and lyrics between choral
staves, (b) lyrics below single staves and figured bass, and (c)
chords and lyrics above single staves (rare, but seen in choral works
with divisi).

>> - -) It should be possible to keep one context (in particular FiguredBass)
>> as
>> close as possible to another staff (yes, we have that already by disabling
>> stretching above).
>>
>>
>> - -) Fixed positioning of staves/contexts should be possible, even if some
>> contexts are killed (in particular, when there are several measures where
>> a
>> vocal voice is quiet, the lyrics context is automatically killed meanwhile
>> and
>> the explicit positioning is messed up right now.
>
> I'm not

Re: MIDI export: \partial measure and volta repeats

2009-06-17 Thread Federico Bruni

Mats Bengtsson wrote:


An alternative that perhaps is even simpler, is to use the \tag  and 
\keepWithTag features, see
http://lilypond.org/doc/v2.12/Documentation/user/lilypond/Different-editions-from-one-source#Using-tags 


for a general description and
http://lists.gnu.org/archive/html/lilypond-user/2009-02/msg00314.html
for an example where it's used to make different versions in midi and 
printed output.




I like very much this alternative.
Unfortunately, I can't make it working: it says that \tag... is 
unexpected string.


Also, I probably made a mess in the score section.
I attach the file: any advice is appreciated
\version "2.13.0"
\include "english.ly"
\include "tablature.ly"

\header {
title = "Bourrée"
composer = "Johann Sebastian Bach"
}

\paper {
left-margin = 15\mm
line-width = 180\mm
indent = 0\mm
top-margin = 10\mm}
% for testing purposes only; in newer versions of lilypond, they will be
% already defined:
#(define-public guitar-seven-string-tuning '(4 -1 -5 -10 -15 -20 -25))
#(define-public guitar-drop-d-tuning   '(4 -1 -5 -10 -15 -22))
#(define-public bass-four-string-tuning'(-17 -22 -27 -32))
#(define-public bass-drop-d-tuning '(-17 -22 -27 -34))
#(define-public bass-five-string-tuning'(-17 -22 -27 -32 -37))
#(define-public bass-six-string-tuning '(-12 -17 -22 -27 -32 -37))



upper = \relative c'   {
\set Staff.midiInstrument = #"acoustic guitar (nylon)"
\set fingeringOrientations = #'(left)
\time 4/4
\key g \major
\tag #'partial  { \partial 4  e'8  fis' }
\tag #'rests  { s2. e'8 fis' }
\repeat volta 2  {
\mark  \markup { \bold A } %1st section
g4-4  fs8-2  e  ef4-4  e8  fs-2  |  b,4  cs8-2  ds-4  e4  d8-4  c-1  |  
b4  a8-1  g  fs4-4  g8  a-2  |  b  a  g  fs-4  e4-2  e'8  fs-4   \break |  
g4-4  fs8-2  e ef4-4  e8  fs-2  |  b,4  cs8-2  ds-4  e4  d8-4  c-1  |  
b4  a8-1  g  fs4-2  d }
  \alternative { 
  { < g,-2  b-1  d  g >2  \deadNote < g  b  d  g >4   
e''8  fs-4   \break }
  { < g,,-2  b-1  d  g >2  \deadNote < g  b  d  g >4  
b'8  g }  
  }

\repeat volta 2  {
\mark  \markup { \bold B }  % 2nd section
d'4-4  a8-3  c-1  b4  g'8-4   d-3  |  e4  b8  d-1  c4\3-4  b8  a-3  |  
gs4-1  a8-3  b   c4-1  b8  a  \break |
a2.-3  d8-4  a-3  |  b4  g'8-4  d-3  e4  b8  d-1  |  c\3-4  
ef16\glissando-3 e\2  a8-4  e8\2\glissando  fs4\2-3  cs8-3 e |  d4-3  df8-2  b  
bf16-2(  b\3-3 ) bf4 b8  \break |
b2.  a'8-4  fs-1  |  g4-3  fs8-1  e  a4-4  e8  g-3  |  fs4-1  e8  d-3  
g4-4  d8  f-1  |  e4  a8-4  e  fs4-3  cs8-2  e  |  ds4-4  b2  e8  b  \break|
c-2  e,-2  d'-2  a-1  b  ds,-1  c'-1  g  |  a-1  fs-4  a  fs  g  e-1  
fs-3  e  |  ef4-1  e8-3  fs-4  g\4-4  fs16(  g\4 )  fs8  e } 
\alternative { 
{  e2.  b'8  g  }
{  e1  }
}
}

lower=  \relative c'{
\tag #'partial  { \partial 4  g,8  fis }
\tag #'rests { s2. g8 fis } 
\repeat volta 2  {  %1st section
e4  a  b-1  a  |  g-3  fs-1  e  fs-2  |  g-2  a  b-1  a  |  g-3  b-1  
e,8  fs-1  g-3  fs-3  |
e4  a  b-1  a  |  g-3  fs-1  e  fs-2  |  g-3  c-2  d2\5-3 }
\alternative {
{ s2.  g,8-3  fs-3 }
{ s2.  g4-2  }
}
\repeat volta 2  {  % 2nd section
fs-2  d'  g,-2  b-1  |  c-1  gs-2  a  d  |  e-2 a, e' e, |
a8  b-2  a  g-4  fs4-2  fs  |  g-2  b-1  c-1  af-2  |  a  df-1  d  bf-1 
 |  b-1  e-1  fs,2-1  |
b8-1  bf-1  b-2  cs-4  ds4-1  b-1  |  e-1  d  df-1  a  |  d  c-2  b-1  
g-2  |  c-2  b-1  a  fs-1  |
b4.-1  c8-2  b-1  a  af4-3  |   a4  fs'-3  g,-3  e'-2  |  gs,-1  ds'8-1 
 r  e,4  a  |  b2-2  b4.  r8  }
\alternative { 
{  e,2.  g4-2  }
{  e1  }
}
}

\score { \keepWithTag  #'partial  {
 <<
 \new Staff = "guitar" <<
 \context Voice = "upper guitar" { \clef "G_8" \voiceOne \upper }
  \context Voice = "lower guitar" { \clef "G_8" \voiceTwo \lower } >>
 \new TabStaff = "tab" <<
   \context TabVoice = "upper tab" { \clef "moderntab" \voiceOne \upper }
   \context TabVoice = "lower tab" { \clef "moderntab" \voiceTwo \lower } >>
 >>

\layout  {
}
} 


\score {
\keepWithTag  #'rests  {
\unfoldRepeats  <<
\new Staff = "guitar" <<
 \context Voice = "upper guitar" { \clef "G_8" \voiceOne \upper }
  \context Voice = "lower guitar" { \clef "G_8" \voiceTwo \lower } >>
}
>>
\midi {
\context  {
\Score
tem