Re: Anki and LilyPond

2014-10-22 Thread Urs Liska
These messages are stripped off the original text, but it could be that 
*I* started this thread ;-)


Am 22.10.2014 00:54, schrieb truthling:

Yes, it is possible to import/export .txt files!  I've been making cards very
successfully to study for biology by putting my questions/answers into a
spreadsheet, converting to a .txt file, and importing into Anki.  I think
the same can be done with the Lilypond Addon.

When importing a .txt file, Anki fields can be separated by tabs as well,
which is automatically done if you copy/past from a spreadsheet.  Each
column in a spreadsheet is a different field which can contain Lilypond
code, questions, answers, etc.

I would love to work on this with others.  I will be working on this for my
personal study materials, but working with others would be even better.


I'd be glad to work on this too. As I don't have any experience with 
Anki but do have some experience with organizing this kind of project I 
suggest we create a project at https://github.com/openlilylib. Maybe you 
could contact me privately and tell me more what would be necessary to 
organize a text based repository of Anki cards.




Here's another idea/question:  is it possible to introduce a degree of
randomness into Lilypond code?  This would address the problem of needing to
manually write code to engrave music for every question you want to ask on
an Anki card.

For example, if I want to create cards to test my knowledge of triad
chords...  Is it possible to define the chord quality and/or inversion
(Major, minor, diminished, augmented) and leave it to Lilypond to build that
chord from a randomly generated root note?  This way, each time Anki
presented a card to test if we know a Major triad, it would be from a
different root note.   Or perhaps the clef that the chord is built in can be
different each time...  or the key signature, and so on.

This would save tons of time in creating cards in Anki.

What do you think?


Will Anki run LilyPond each time to generate what is displayed on a 
card? I can't imagine that, but *if* that would be the case it should 
definitely be possible to introduce some randomness, either completely 
or through a set of choices.
Otherwise Johan is completely right that it's easy to generate cards 
with a script.


Best
Urs



By the way, Curtis and Ben;  I'd love to see the decks you have created :)

Cheers!
Andrew



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Anki-and-LilyPond-tp150742p167776.html
Sent from the User mailing list archive at Nabble.com.

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



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


Re: Generating random notes

2014-10-22 Thread Urs Liska

For users reading the list by email it would be nice to  quote some context.

Am 22.10.2014 05:20, schrieb truthling:

Were you successful with this Phillip?



One thing to note in this context is that there is a fundamental 
difference between generating random content from within a LilyPond 
compilation (i.e. a Scheme function) and through a script generating .ly 
file(s).


I'd say: Whenever there even *may* be the need to postprocess or 
recreate anything you should definitely generate .ly files. But when 
your intention is to *always* produce random results (e.g. thinking of a 
random exercise generator for a web application) a Scheme function seems 
more elegant and natural.


Urs

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


Re: Generating random notes

2014-10-22 Thread Philip Rhoades

truthling,


On 2014-10-22 14:20, truthling wrote:

Were you successful with this Phillip?



I did get some help from the Lilypond list before - I attach the the 
files I was playing around with then.  To be honest, although it was an 
interesting exercise, I went back to converting the Sagreras Guitar book 
into the AN I developed but then was almost immediately overwhelmed with 
other life issues (that are continuing) and I haven't been able to even 
practise that stuff very much.  After I have finally moved house I hope 
to get back to it . .


Regards,

Phil.



--
View this message in context:
http://lilypond.1069038.n5.nabble.com/Generating-random-notes-tp157801p167781.html
Sent from the User mailing list archive at Nabble.com.

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


--
Philip Rhoades

GPO Box 3411
Sydney NSW  2001
Australia
E-mail:  p...@pricom.com.au\include "gnote2_2.ily"

\new StaffGNoteTwo {
% \new Voice {
  $@(let
  ((notes
  (ly:music-property
  #{
  
  #}
  'elements)))
  (map
  (lambda (x)
  (list-ref notes
  (random
  (length notes
  (iota 400)))
}
\version "2.18.0"

randomNotes =
{
  $@(let ((notes (ly:music-property #{  #}
'elements)))
  (map (lambda (x) (list-ref notes (random (length notes (iota
400)))
}

\new Voice {
  \transpose c c {
\randomNotes
  }
}

\score {
  {
#(let ((random-state (seed->random-state (current-time
   (ly:export
(make-sequential-music
 (map (lambda (x)
(let ((idx (random 12 random-state)))
  (make-event-chord
   (list
(make-music 'NoteEvent
'duration (ly:make-duration 2 0 1 1)
'pitch (ly:make-pitch
(quotient idx 7)
(remainder idx 7)
0))
  (make-list 24)
  }
}

\score {
  {
#(let ((random-state (seed->random-state (current-time
   (ly:export
(make-sequential-music
 (map (lambda (x)
(let ((idx (random 12 random-state)))
  (make-event-chord
   (list
(make-music 'NoteEvent
'duration (ly:make-duration 2 0 1 1)
'pitch (ly:make-pitch
(quotient idx 7)
(remainder idx 7)
0))
  (make-list 24)
  }
}

\version "2.18.0"
\score {
  {
$(let ((random-state (seed->random-state (current-time

   (make-sequential-music
(map (lambda (x)
   (let ((idx (random 12 random-state)))
 (make-event-chord
  (list
   (make-music 'NoteEvent
 'duration (ly:make-duration 2 0 1/1)
 'pitch (ly:make-pitch
 (quotient idx 7)
 (remainder idx 7)
 0))
  (make-list 24
  }
}
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Feedback Request for Music Fonts

2014-10-22 Thread Urs Liska


Am 21.10.2014 12:59, schrieb Kieren MacMillan:

Hi Urs,


That's an excellent complement to your already impressive collection of fonts. 
I can't stress enough how this should be able to increase LilyPond's acceptance 
on the long run!

+1 x 2

BTW: I don’t think I saw a response from you about Abraham’s Henle example 
(http://fonts.openlilylib.org/beethoven/Beethoven_Op10No3.pdf).


This can very well be because there just has been to much stuff 
recently, and I didn't have an opportunity to make a decent printout ...



What did you think??


Now I *did* two printouts, one scaled to have proportional page margins 
and one with original size and cropped margins on A4 paper.
What I *don't* have available is the original score (and I don't want to 
use a scan from IMSLP or something like that).


So under this circumstances it looks very convincing, even more with 
each time I look again. Maybe the dynamics look slightly thin, but 
again, I didn't compare to the original.
What I would like to see now is how arbitrary music looks typeset that 
way. I think I'll try to find the time (haha) to enter a few style 
studies after Schumann's Carnaval that I have from my time of studies. 
Probably they will look even more convincing now ;-)


Best
Urs



Best,
Kieren.
___

Kieren MacMillan, composer
www:  
email:  i...@kierenmacmillan.info




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


Re: Automatic ottava handling

2014-10-22 Thread Gilberto Agostinho
Hi David,

This new version is really excellent! I think it handles chords wonderfully
well, and I also like the alist idea very much!


David Nalesnik-2 wrote
> The alist argument needs to be there.  I don't believe you can have an
> optional parameter except at the tail end of the music function, but I'll
> need to verify that. (And you definitely don't want the variable coming
> after the music expression)

That's indeed a pity, I often forget that the music expression itself is
considered as a variable in these functions, so you really can't have an
optional argument in between. But the empty alist is not a bad solution at
all, I think, and it is wonderful to have the possibility to deal with bass
clefs and short/long ottavation names.

As for that idea of handling rests, how difficult would it be to implement
it as another variable inside of this alist? So the user would inform how
many quarter note rests (or some other time unit) in between two "ottaved"
notes would be necessary in order to break the ottavation. I don't know how
tricky this can be (I have no clue how difficult it would be to deal with
the number of quarter notes/beats/time units/bars between notes in
LilyPond). 

Thanks once again and take care!
Gilberto



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Automatic-ottava-handling-tp167190p167790.html
Sent from the User mailing list archive at Nabble.com.

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


Re: Generating random notes

2014-10-22 Thread Philip Rhoades

truthling,


On 2014-10-22 14:20, truthling wrote:

Were you successful with this Phillip?



I did get some help from the Lilypond list before - I attach the the 
files I was playing around with then.  To be honest, although it was an 
interesting exercise, I went back to converting the Sagreras Guitar book 
into the AN I developed but then was almost immediately overwhelmed with 
other life issues (that are continuing) and I haven't been able to even 
practise that stuff very much.  After I have finally moved house I hope 
to get back to it . .


Regards,

Phil.



--
View this message in context:
http://lilypond.1069038.n5.nabble.com/Generating-random-notes-tp157801p167781.html
Sent from the User mailing list archive at Nabble.com.

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


--
Philip Rhoades

GPO Box 3411
Sydney NSW  2001
Australia
Web:  http://philiprhoades.org
E-mail:  p...@philiprhoades.org\include "gnote2_2.ily"

\new StaffGNoteTwo {
% \new Voice {
  $@(let
  ((notes
  (ly:music-property
  #{
  
  #}
  'elements)))
  (map
  (lambda (x)
  (list-ref notes
  (random
  (length notes
  (iota 400)))
}
\version "2.18.0"

randomNotes =
{
  $@(let ((notes (ly:music-property #{  #}
'elements)))
  (map (lambda (x) (list-ref notes (random (length notes (iota
400)))
}

\new Voice {
  \transpose c c {
\randomNotes
  }
}

\score {
  {
#(let ((random-state (seed->random-state (current-time
   (ly:export
(make-sequential-music
 (map (lambda (x)
(let ((idx (random 12 random-state)))
  (make-event-chord
   (list
(make-music 'NoteEvent
'duration (ly:make-duration 2 0 1 1)
'pitch (ly:make-pitch
(quotient idx 7)
(remainder idx 7)
0))
  (make-list 24)
  }
}

\score {
  {
#(let ((random-state (seed->random-state (current-time
   (ly:export
(make-sequential-music
 (map (lambda (x)
(let ((idx (random 12 random-state)))
  (make-event-chord
   (list
(make-music 'NoteEvent
'duration (ly:make-duration 2 0 1 1)
'pitch (ly:make-pitch
(quotient idx 7)
(remainder idx 7)
0))
  (make-list 24)
  }
}

\version "2.18.0"
\score {
  {
$(let ((random-state (seed->random-state (current-time

   (make-sequential-music
(map (lambda (x)
   (let ((idx (random 12 random-state)))
 (make-event-chord
  (list
   (make-music 'NoteEvent
 'duration (ly:make-duration 2 0 1/1)
 'pitch (ly:make-pitch
 (quotient idx 7)
 (remainder idx 7)
 0))
  (make-list 24
  }
}
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Anki and LilyPond

2014-10-22 Thread Kieren MacMillan
Hi all,

> However, I don't think LilyPond can do this but it is rather trivial to
> write a simple program (Perl, Python, ...) that generates the cards,

If you’re just looking to generate random notes, Lilypond (well, Scheme, 
anyway) can do this just fine:


Hope this helps!
Kieren.
___

Kieren MacMillan, composer
www:  
email:  i...@kierenmacmillan.info
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


New member - Bar numbers placement problem

2014-10-22 Thread Les Editions Valmajour
Hello everyone! I am new on the list, from France and professionnal 
musician, engraving music as a hobby. Lilypond is fantastic, but so 
powerful that I think it's for now too powerful for my little knowledge, 
and I need your help.


I would like to position the bar numbers for a piano system in front of 
and centered on StartSystem Brace. Like if it was in the place of the 
Instrument Name (or Short Instrument Name).
I've tried to use the invisible Dynamics staff and force the display of 
bar numbers, but the result is not working fine, as you can see in the 
attached screen capture; if there is no dynamics in the system, the 
number is not displayed at the same position


Do anyone have an idea how to do this right?
Thank you so much,
Pierre
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Automatic ottava handling

2014-10-22 Thread David Nalesnik
Gilberto,

On Wed, Oct 22, 2014 at 4:39 AM, Gilberto Agostinho <
gilbertohasn...@gmail.com> wrote:

> Hi David,
>
> This new version is really excellent! I think it handles chords wonderfully
> well, and I also like the alist idea very much!
>

Great--good to hear!


>
>
> David Nalesnik-2 wrote
> > The alist argument needs to be there.  I don't believe you can have an
> > optional parameter except at the tail end of the music function, but I'll
> > need to verify that. (And you definitely don't want the variable coming
> > after the music expression)
>
> That's indeed a pity, I often forget that the music expression itself is
> considered as a variable in these functions, so you really can't have an
> optional argument in between. But the empty alist is not a bad solution at
> all, I think, and it is wonderful to have the possibility to deal with bass
> clefs and short/long ottavation names.
>

This is indeed my mistake.  There is no such requirement for optional
parameters.
To make the parameter for the alist-variable optional, you need only make a
simple change to the list of predicates in the definition of ottavate:

ottavate =
#(define-music-function (parser location upper lower options mus)
   (number-pair? number-pair? (list? '()) ly:music?)

Then, you are able to write

{
  \ottavate #'(3 . 6) #'(-3 . -6) { ... }
}

or, if you like

{
  \ottavate #'(3 . 6) #'(-3 . -6) \default { ... }
}

and the function will use the default values for "options"--here, the empty
list '(), which will select the default values for all of the various
symbols--well, the two that are provided now: opening-clef and name-style.


> As for that idea of handling rests, how difficult would it be to implement
> it as another variable inside of this alist? So the user would inform how
> many quarter note rests (or some other time unit) in between two "ottaved"
> notes would be necessary in order to break the ottavation. I don't know how
> tricky this can be (I have no clue how difficult it would be to deal with
> the number of quarter notes/beats/time units/bars between notes in
> LilyPond).
>

I can add any number of symbols to the alist, and one representing length
of rests.  But this (and any smart analysis of pitch groupings) requires
collecting them, which is the big stumbling block for me at the moment.
Well, I should say it is probably going to require a big rewrite.  I'll
keep you posted.

Best,
David
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: New member - Bar numbers placement problem

2014-10-22 Thread Les Editions Valmajour

Hi Kieren,
I thought about this option, and I found how to add a counter in the 
shortInstrumentName; http://lsr.di.unimi.it/LSR/Item?id=543 (and it 
works and give the perfect placement I want) but I don't know how to 
link it to the number of the bar beginning the system :)

Thanks anyway,
Best regards,
Pierre

Le 22-10-2014 15:55, Kieren MacMillan a écrit :

Bonjour, Pierre!


I would like to position the bar numbers for a piano system in front of and 
centered on StartSystem Brace. Like if it was in the place of the Instrument 
Name (or Short Instrument Name).

The best way, I imagine, would be for shortInstrumentName to actually *be* a 
call-back function that displays the bar number.
That, unfortunately, is beyond my Lily-fu… but hopefully someone on the list 
will find a way.

Sorry I couldn’t be of more concrete help.

Best,
Kieren.
___

Kieren MacMillan, composer
www:  
email:  i...@kierenmacmillan.info




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


Re: New member - Bar numbers placement problem

2014-10-22 Thread Kieren MacMillan
Bonjour, Pierre!

> I would like to position the bar numbers for a piano system in front of and 
> centered on StartSystem Brace. Like if it was in the place of the Instrument 
> Name (or Short Instrument Name).

The best way, I imagine, would be for shortInstrumentName to actually *be* a 
call-back function that displays the bar number.
That, unfortunately, is beyond my Lily-fu… but hopefully someone on the list 
will find a way.

Sorry I couldn’t be of more concrete help.

Best,
Kieren.
___

Kieren MacMillan, composer
www:  
email:  i...@kierenmacmillan.info


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


Re: Mac OSX 10.10 (Yosemite) and LilyPond compatibility?

2014-10-22 Thread Omer Katzir
I actually have a problem, I can't compile the files, no error, just
not doing it. I'm not sure if it's my very old machine or the upgrade.

On Wed, Oct 22, 2014 at 2:51 AM, Paul Morris  wrote:
> Thanks for the info everyone.  I've upgraded and LilyPond and Frescobaldi are
> working fine.  Good to know I shouldn't try to do anything with MacPorts for
> now.
>
> Cheers,
> -Paul
>
>
>
> --
> View this message in context: 
> http://lilypond.1069038.n5.nabble.com/Mac-OSX-10-10-Yosemite-and-LilyPond-compatibility-tp167723p167778.html
> Sent from the User mailing list archive at Nabble.com.
>
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user



-- 
Omer Katzir
The Silent Troubadour
http://omerkatzir.com

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


Re: New member - Bar numbers placement problem

2014-10-22 Thread David Nalesnik
Hi,

On Wed, Oct 22, 2014 at 8:59 AM, Les Editions Valmajour <
p...@editions-valmajour.fr> wrote:

> Hi Kieren,
> I thought about this option, and I found how to add a counter in the
> shortInstrumentName; http://lsr.di.unimi.it/LSR/Item?id=543 (and it works
> and give the perfect placement I want) but I don't know how to link it to
> the number of the bar beginning the system :)
> Thanks anyway,
> Best regards,
> Pierre
>
> Le 22-10-2014 15:55, Kieren MacMillan a écrit :
>
>  Bonjour, Pierre!
>>
>>  I would like to position the bar numbers for a piano system in front of
>>> and centered on StartSystem Brace. Like if it was in the place of the
>>> Instrument Name (or Short Instrument Name).
>>>
>> The best way, I imagine, would be for shortInstrumentName to actually
>> *be* a call-back function that displays the bar number.
>>
>
Interesting idea to hook onto instrument names since that would handle the
positioning.

See my experiments in the attached file.

I first tried an engraver, but you can see the problem!  The bar number
text is set once and for all to 21--which is the last measure LilyPond sees
(one beyond the 100 of the score).

I next tried a callback for InstrumentName.after-line-breaking.  It works,
but there's no way I know of to get the bar number, so you have to add it
to the list that the function is called with.

Maybe the best way is to write something to change the positioning of
BarNumber, but I need to work on something other than LilyPond for the time
being, so any takers welcome!

Hope this helps.

Best,
David
\version "2.19.15"

barLineAtSystemBeginning =
#(lambda (context)
   (let ((text #f))
 (make-engraver
  (acknowledgers ((system-start-text-interface engraver grob source-engraver)
  (set! text grob)))
  ((process-music trans)
   (if (ly:grob? text)
   (let ((bar-number (ly:context-property context 'currentBarNumber)))
 (set! (ly:grob-property text 'text) 
   (markup (number->string bar-number)

#(define (use-my-text text-list) 
   (lambda (grob)
 (let* ((orig (ly:grob-original grob))
(siblings (if (ly:grob? orig)
  (ly:spanner-broken-into orig)
  '()))
(text-list (cons "" text-list)))
   (let loop ((sibs siblings) (text text-list))
 (if (or (null? sibs) (null? text))
 '()
 (begin
  (ly:grob-set-property! (car sibs) 'text (car text))
  (loop (cdr sibs) (cdr text


music = \repeat unfold 20 {
  c4 d e f
}

% Engraver %
\score {
  \new PianoStaff \with { instrumentName = "" } <<
\new Staff {
  \relative c'' {
\music
  }
}
\new Staff {
  \clef bass
  \music
}
  >>
  \layout {
\context {
  \Score
  \consists #barLineAtSystemBeginning
  \remove "Bar_number_engraver"
}
  }
}

 WORKS BUT CAN'T BE AUTOMATED

\score {
  \new PianoStaff \with { instrumentName = "" } <<
\new Staff {
  \relative c'' {
\music
  }
}
\new Staff {
  \clef bass
  \music
}
  >>
  \layout {
\context {
  \Score
  \override InstrumentName.after-line-breaking = #(use-my-text '("7" "14"))
  \remove "Bar_number_engraver"
}
  }
}___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Feedback Request for Music Fonts

2014-10-22 Thread Abraham Lee

All,


It was brought to my attention that there were some printing issues 
with the Beethoven font (white spots would appear at certain 
overlapping lines). These are now fixed and updated on 
fonts.openlilylib.org. I have also added .WOFF font files, though I'm 
not really sure how to use them, but maybe you can!


Enjoy!

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


Re: Mac OSX 10.10 (Yosemite) and LilyPond compatibility?

2014-10-22 Thread Gabriel Striewe
On Wed, Oct 22, 2014 at 06:49:21PM +0300, Omer Katzir wrote:
> I actually have a problem, I can't compile the files, no error, just
> not doing it. I'm not sure if it's my very old machine or the upgrade.
> 
Me, too, am having problems compiling lilypond (2.18.2) with homebrew. I filed a
bug on homebrew git. Might have to do with gcc. 

I will come back when it's solved. 

Gabriel


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


Re: Feedback Request for Music Fonts

2014-10-22 Thread Urs Liska
Could you please send me (directly) an updated example so I can forward it?

Thanks
Urs

Am 22. Oktober 2014 18:33:45 MESZ, schrieb Abraham Lee 
:
>All,
>
>
>It was brought to my attention that there were some printing issues 
>with the Beethoven font (white spots would appear at certain 
>overlapping lines). These are now fixed and updated on 
>fonts.openlilylib.org. I have also added .WOFF font files, though I'm 
>not really sure how to use them, but maybe you can!
>
>Enjoy!
>
>-Abraham
>
>
>
>
>___
>lilypond-user mailing list
>lilypond-user@gnu.org
>https://lists.gnu.org/mailman/listinfo/lilypond-user
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Automatic ottava handling

2014-10-22 Thread Gilberto Agostinho
Hi David,


David Nalesnik-2 wrote
> To make the parameter for the alist-variable optional, you need only make
> a
> simple change to the list of predicates in the definition of ottavate

This is great! I now works perfectly only with two pair of numbers, i.e.,
without #'()


David Nalesnik-2 wrote
> I can add any number of symbols to the alist, and one representing length
> of rests.  But this (and any smart analysis of pitch groupings) requires
> collecting them, which is the big stumbling block for me at the moment.
> Well, I should say it is probably going to require a big rewrite.  I'll
> keep you posted.

I totally understand it. It is very easy to say "value of rests between two
pitches", but calculating it would be a completely different story. If one
day you tackle this problem, please give us all an update on this thread (or
on a new one). But I can't emphasize this enough: your function is extremely
useful as it is right now!

Take care and thanks again for all of your efforts,
Gilberto



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Automatic-ottava-handling-tp167190p167807.html
Sent from the User mailing list archive at Nabble.com.

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


Re: New member - Bar numbers placement problem

2014-10-22 Thread Les Editions Valmajour

Thx David,
I feel it's getting close, but I'm stuck waiting for help because I 
don't understand the Scheme code. :)

Thank you!
Pierre

Le 22-10-2014 18:12, David Nalesnik a écrit :

Hi,

On Wed, Oct 22, 2014 at 8:59 AM, Les Editions Valmajour 
mailto:p...@editions-valmajour.fr>> wrote:


Hi Kieren,
I thought about this option, and I found how to add a counter in
the shortInstrumentName; http://lsr.di.unimi.it/LSR/Item?id=543
(and it works and give the perfect placement I want) but I don't
know how to link it to the number of the bar beginning the system :)
Thanks anyway,
Best regards,
Pierre

Le 22-10-2014 15:55, Kieren MacMillan a écrit :

Bonjour, Pierre!

I would like to position the bar numbers for a piano
system in front of and centered on StartSystem Brace. Like
if it was in the place of the Instrument Name (or Short
Instrument Name).

The best way, I imagine, would be for shortInstrumentName to
actually *be* a call-back function that displays the bar number.


Interesting idea to hook onto instrument names since that would handle 
the positioning.


See my experiments in the attached file.

I first tried an engraver, but you can see the problem!  The bar 
number text is set once and for all to 21--which is the last measure 
LilyPond sees (one beyond the 100 of the score).


I next tried a callback for InstrumentName.after-line-breaking.  It 
works, but there's no way I know of to get the bar number, so you have 
to add it to the list that the function is called with.


Maybe the best way is to write something to change the positioning of 
BarNumber, but I need to work on something other than LilyPond for the 
time being, so any takers welcome!


Hope this helps.

Best,
David


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


Re: New member - Bar numbers placement problem

2014-10-22 Thread David Nalesnik
On Wed, Oct 22, 2014 at 4:17 PM, Les Editions Valmajour <
p...@editions-valmajour.fr> wrote:

>  Thx David,
> I feel it's getting close, but I'm stuck waiting for help because I don't
> understand the Scheme code. :)
> Thank you!
> Pierre
>
>
What do you want it to do that it isn't doing, or it a problem of knowing
how to use it?

The second example should give you what you asked for.  The only problem is
that you have to tell it the measure numbers.  Once you have the layout
down, that would be easy to do--if tedious.

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


Re: Anacrusis in multiple tunes on page

2014-10-22 Thread Keith OHara
Patrick or Cynthia Karl  mac.com> writes:
> 
> Recently you posted:
> 
> What I am trying to do is is to put multiple tunes on a single page
> as for a "set" of tunes for a dance. The problem that I'm having is
> that many of these tunes start both the "A" part and the "B" part
> with an anacrusis and end the part with a shorter measure to 
> make the  number of beats work out.
 

> and Keith OHara responded:
> >
> > From what you wrote I see no problem,

> I think what he means is that your "more or less minimal example".
> doesn't throw any warning or error messages in LilyPond 2.18.0.  

I also meant that I saw no problem for LilyPond 2.18 to handle what
he described in text.   In traditional music, all the measures are the
same length, but sometimes the logical "A" and "B" parts begin a
fraction of a measure early, or repeats happen in the middle of a 
measure.

> music = \relative b' {
>   \partial 4 c4
>   c1
>   \break
>   \partial 4 d4
>   d1 }

This looks like it has five beats in a measure.  We don't want to dance
to that.  We want to finish the first tune in time to start the pickup
for the next tune in rhythm, so the tunes fit into a set.
\relative b' {
 \partial 4 c4
 c2. \bar"!" \break
 d4 d1 }

Maybe new LilyPond will allow you to put \partial in the middle of a 
piece, but we do not want to use \partial in the middle of a piece.


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