Re: vim-transpose

2024-06-18 Thread Stefan Thomas
Dear Kenneth,
thanks for Your reply.
I  already have a file lilypond.vim in ~/.vim/ftplugin/. Could I paste the
content of Transpose.vim into that file?

Am Di., 18. Juni 2024 um 10:09 Uhr schrieb Kenneth Flak <
kennethf...@protonmail.com>:

> Hi,
>
> The plugin is missing some vital parts, but you should be able to get it
> working by renaming Transpose.vim to lilypond.vim and moving it into the
> after/ftplugin folder of your (n)vim configuration. Haven't tested it yet,
> though...
>
> Best,
> Kenneth
>
> Stefan Thomas, Jun 18, 2024 at 09:35:
> > Dear community,
> > has anyone of You successfully installed LilyVimTranspose?
> > See [1]https://github.com/gustaphe/LilyVimTranspose
> >
> > References:
> >
> > [1] https://github.com/gustaphe/LilyVimTranspose
>
>
>
>


vim-transpose

2024-06-18 Thread Stefan Thomas
Dear community,
has anyone of You successfully installed LilyVimTranspose?
See https://github.com/gustaphe/LilyVimTranspose


Re: autocompletion with vim

2024-06-06 Thread Stefan Thomas
Hello everyone,
these are really a lot of suggestions, I will try them out and then get
back to you.

Am Do., 6. Juni 2024 um 11:05 Uhr schrieb Kenneth Flak <
kennethf...@protonmail.com>:

> This issue seems related:
>
> https://github.com/uga-rosa/cmp-dictionary/issues/58
>
> Fennel, Jun 06, 2024 at 11:51:
> > It seems like cmp-dictionary​ doesn’t play nice with oil.nvim, and I
> > am not
> > removing that to make this work unfortunately. Here’s a stack trace if
> > you’re
> > interested:
> >
> > Error executing luv callback:
> > ...vim/lazy/cmp-dictionary/lua/cmp_dictionary/dict/trie.lua:43: bad
> > argument #1 to 'decode' (string expect
> > ed, got nil)
> > stack traceback:
> > [C]: in function 'decode'
> > ...vim/lazy/cmp-dictionary/lua/cmp_dictionary/dict/trie.lua:43: in
> > function <...vim/lazy/cmp-dicti
> > onary/lua/cmp_dictionary/dict/trie.lua:42>
> >
> >
> >
> > [C]: in function 'nvim_buf_delete'
> > .../fennel/.local/share/nvim/lazy/oil.nvim/lua/oil/util.lua:159: in
> > function 'rename_buffer'
> > .../fennel/.local/share/nvim/lazy/oil.nvim/lua/oil/init.lua:746: in
> > function 'maybe_hijack_directo
> > ry_buffer'
> > .../fennel/.local/share/nvim/lazy/oil.nvim/lua/oil/init.lua:1265: in
> > function 'setup'
> > /home/fennel/.config/nvim/init.lua:209: in main chunk
> >
> > if you have any suggestions, I’d love to hear them! This has been very
> > frustrating for me.
> >
> > Fennel
> >
> > ​
>
>
>
>


autocompletion with vim

2024-06-05 Thread Stefan Thomas
Dear community,
did any of You manage to get the autoload-function for lilypond  of vim to
work?
Thanks for Your help,
Stefan


Re: gvim point and click

2024-06-04 Thread Stefan Thomas
Dear Timothy,
for all, who are interested in, I finally got it to work (with Your help
and also with chatgpt).
I wrote in okular/settings/configure okular/edior:

> custom editor  gvim --servername GVIM --remote-send ":e %f:call
> SetCursorAdjusted(%l,%c)"

And I wrote in .vimrc

function! SetCursorAdjusted(line, col)
  " Adjust line number down by 1
  let lnum = a:line - 1
  " Use the cursor function to set the cursor position
  call cursor(lnum, a:col)
endfunction

Now I start gvim with
gvim --servername GVIM
and everything works fine!

Am Mo., 3. Juni 2024 um 10:35 Uhr schrieb Timothy Lanfear <
timo...@lanfear.me>:

> Maybe you could try the call cursor command
>
> vim +"call cursor(%l,%c)" %f
>
> As in David' remarks, you may need to adjust the quoting to get the
> desired result.
>
> vim +"call cursor(5,3)" file.ly
>
> works on the shell command line.
> On 03/06/2024 06:24, Stefan Thomas wrote:
>
> Dear David,
> thanks for Your reply.
> Unfortunately, none of your suggestions have brought the desired result!
> Best,
> Stefan
>
> Am Mo., 3. Juni 2024 um 03:19 Uhr schrieb David Wright <
> lily...@lionunicorn.co.uk>:
>
>> On Sun 02 Jun 2024 at 16:10:56 (+0200), Stefan Thomas wrote:
>> > again, I'm trying to activate point and click in gvim. I made a little
>> > success:
>> > I wrote in the editor options of okular:
>> > gvim --remote-silent +%l %f +normal! %c
>> > When I click on a note, the right document is opened and the cursor is
>> > placed at the correct line, but not at the correct note in the lilypond
>> > file.
>> > What can I do?
>>
>> Perhaps the command you're trying to invoke is, for example:
>>
>>   gvim --remote-silent +:123:norm45l path-to-file
>>
>> using literal constants for line number 123 and column 45.
>>
>> Naively, that would mean okular would have something like:
>>
>>   gvim --remote-silent +:%l:norm%cl %f
>>
>> but, not being familiar with okular, I can't tell how it would
>> handle %cl (where l means move to the right by %c columns) and
>> whether it would need any quoting. For example,
>>
>>   gvim --remote-silent '+:%l:norm%c l' %f
>>
>> might work better.
>>
>> Cheers,
>> David.
>>
> --
> Timothy Lanfear, Bristol, UK.
>
>


Re: gvim point and click

2024-06-02 Thread Stefan Thomas
Dear David,
thanks for Your reply.
Unfortunately, none of your suggestions have brought the desired result!
Best,
Stefan

Am Mo., 3. Juni 2024 um 03:19 Uhr schrieb David Wright <
lily...@lionunicorn.co.uk>:

> On Sun 02 Jun 2024 at 16:10:56 (+0200), Stefan Thomas wrote:
> > again, I'm trying to activate point and click in gvim. I made a little
> > success:
> > I wrote in the editor options of okular:
> > gvim --remote-silent +%l %f +normal! %c
> > When I click on a note, the right document is opened and the cursor is
> > placed at the correct line, but not at the correct note in the lilypond
> > file.
> > What can I do?
>
> Perhaps the command you're trying to invoke is, for example:
>
>   gvim --remote-silent +:123:norm45l path-to-file
>
> using literal constants for line number 123 and column 45.
>
> Naively, that would mean okular would have something like:
>
>   gvim --remote-silent +:%l:norm%cl %f
>
> but, not being familiar with okular, I can't tell how it would
> handle %cl (where l means move to the right by %c columns) and
> whether it would need any quoting. For example,
>
>   gvim --remote-silent '+:%l:norm%c l' %f
>
> might work better.
>
> Cheers,
> David.
>


gvim point and click

2024-06-02 Thread Stefan Thomas
Dear community,
again, I'm trying to activate point and click in gvim. I made a little
success:
I wrote in the editor options of okular:
gvim --remote-silent +%l %f +normal! %c
When I click on a note, the right document is opened and the cursor is
placed at the correct line, but not at the correct note in the lilypond
file.
What can I do?
Thanks for Your help,
Stefan


Re: spontini-editor

2024-06-01 Thread Stefan Thomas
dear Paolo,
rhanks, that helped me a lot. There is one more thing: how çan I set the
default include path for lilypond?

Paolo Prete  schrieb am Fr., 31. Mai 2024, 21:18:

> Check here (tell me if you have issues):
>
>
> https://github.com/paopre/Spontini/blob/master/documentation/miscellaneous.md#midi-input
>
> Hope it helps!
>
>
>
> On Fri, May 31, 2024 at 8:38 PM Stefan Thomas 
> wrote:
>
>> Dear Paolo,
>> thank for Your help. I've installed chrome and I changed the workspace. I
>> can also see, that webmidi works with this browser.
>> But I don't know how I could activate midi input with Spontini. A hint
>> would be great.
>> Thanks,
>> Stefan
>>
>> Am Fr., 31. Mai 2024 um 00:43 Uhr schrieb Paolo Prete <
>> paolopr...@gmail.com>:
>>
>>>
>>>
>>> On Thu, May 30, 2024 at 7:14 PM Stefan Thomas <
>>> kontrapunktste...@gmail.com> wrote:
>>>
>>>> Dear Paolo,
>>>> I could install Spontini. When I open it in chromium browser I get the
>>>> message "InvalidStateError: Platform dependent initialization failed."
>>>>
>>>
>>> Hi Stefan, this is a Chromium bug (you don't have it in Chrome) on MIDI
>>> input. See for example, https://versioduo.com/webmidi-test/ (but it
>>> affects many other programs and websites)
>>> you can avoid the annoying popup by removing line 129 in
>>> lib/webgui/main.js:
>>>
>>> turnOnMidiInputAndListenOnChannel(-1)
>>>
>>> Just remove this line and reload the editor clearing the cache (hold
>>> down the Ctrl key and click the Reload button)
>>> But given that I don't think chromium people will fix it in the near
>>> future, IF you need MIDI input (which is IMHO useful) I suggest you to
>>> switch to Chrome
>>>
>>>
>>>
>>>> What does that mean? I can also open files, but Spontini doesn't find
>>>> the root directory of my scores, which is ~/partituren/
>>>>
>>>>
>>> Just set the workspace to ~/partituren/ in the SpontiniServer window.
>>> See:
>>> https://github.com/paopre/Spontini/blob/master/documentation/spontini-server.md
>>>
>>> Hope this helps!
>>>
>>>
>>>
>>


Re: spontini-editor

2024-05-31 Thread Stefan Thomas
Dear Paolo,
thank for Your help. I've installed chrome and I changed the workspace. I
can also see, that webmidi works with this browser.
But I don't know how I could activate midi input with Spontini. A hint
would be great.
Thanks,
Stefan

Am Fr., 31. Mai 2024 um 00:43 Uhr schrieb Paolo Prete :

>
>
> On Thu, May 30, 2024 at 7:14 PM Stefan Thomas 
> wrote:
>
>> Dear Paolo,
>> I could install Spontini. When I open it in chromium browser I get the
>> message "InvalidStateError: Platform dependent initialization failed."
>>
>
> Hi Stefan, this is a Chromium bug (you don't have it in Chrome) on MIDI
> input. See for example, https://versioduo.com/webmidi-test/ (but it
> affects many other programs and websites)
> you can avoid the annoying popup by removing line 129 in
> lib/webgui/main.js:
>
> turnOnMidiInputAndListenOnChannel(-1)
>
> Just remove this line and reload the editor clearing the cache (hold down
> the Ctrl key and click the Reload button)
> But given that I don't think chromium people will fix it in the near
> future, IF you need MIDI input (which is IMHO useful) I suggest you to
> switch to Chrome
>
>
>
>> What does that mean? I can also open files, but Spontini doesn't find the
>> root directory of my scores, which is ~/partituren/
>>
>>
> Just set the workspace to ~/partituren/ in the SpontiniServer window. See:
> https://github.com/paopre/Spontini/blob/master/documentation/spontini-server.md
>
> Hope this helps!
>
>
>


Re: spontini-editor

2024-05-30 Thread Stefan Thomas
Dear Paolo,
I could install Spontini. When I open it in chromium browser I get the
message "InvalidStateError: Platform dependent initialization failed."
What does that mean? I can also open files, but Spontini doesn't find the
root directory of my scores, which is ~/partituren/

Am Do., 30. Mai 2024 um 13:59 Uhr schrieb Paolo Prete :

>
> Hello Stefan,
>
> Unfortunately not, at the moment. Maybe it would be good to open a mailing 
> list dedicated to easier editing with LilyPond, and direct questions there?
>
> Otherwise, tell me what the best and fastest choice might be.
>
>
> In the meantime you can ask questions in the LilyPond-user mailing list, as 
> is also the case for other editors (like Frescobaldi). I normally read this 
> mailing list.
>
>
> Il gio 30 mag 2024, 10:49 Stefan Thomas  ha
> scritto:
>
>> Dear communiy,
>> is there a user group for the spontini editor?
>>
>


spontini-editor

2024-05-30 Thread Stefan Thomas
Dear communiy,
is there a user group for the spontini editor?


Re: how to remove marks automatically

2024-05-25 Thread Stefan Thomas
Dear Silvain,
thank You, this worked perfectly for me!
Providing you have juste one space as in the example,
in the part \mark \markup {
you can do a search and replace

\\mark.\\markup.{[^{]+{[^}]+}[^}]+}

with nothing

(I tested it in Geany on Ubuntu)

dot means one character
[^{]* means a non-empty sequence of characters without any { character
\ needs escaping
Your could add \s at the end to remove empty spaces or lines


Le 25.05.24 à 18:15, Stefan Thomas a écrit :

Dear community,
I would like to remove automatically all the "\mark \markup { \box { LETTER
} }" in the below quoted text. Can I do this with regex? Does someone know
how?
Thanks,
Stefan

\version "2.22.2"

violine =  {
\clef "treble" | % 1
R1*8 | % 9
\mark \markup { \box { A   } } R1*8 -\markup{ \tiny {Lija+Tambor} }
\mark \markup { \box { B   } }
 R1*8
\mark \markup { \box { C   } }
r4 2. \fermata :32
}



-- 
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org <https://perso.silvain-dupertuis.org>


how to remove marks automatically

2024-05-25 Thread Stefan Thomas
Dear community,
I would like to remove automatically all the "\mark \markup { \box { LETTER
} }" in the below quoted text. Can I do this with regex? Does someone know
how?
Thanks,
Stefan

\version "2.22.2"

violine =  {
\clef "treble" | % 1
R1*8 | % 9
\mark \markup { \box { A   } } R1*8 -\markup{ \tiny {Lija+Tambor} }
\mark \markup { \box { B   } }
 R1*8
\mark \markup { \box { C   } }
r4 2. \fermata :32
}


Re: dynamics in coulour

2024-02-20 Thread Stefan Thomas
Thanks, I'll check it out!
Best,
Stefan

Am Di., 20. Feb. 2024 um 16:33 Uhr schrieb Ritchie Fraser <
euphoge...@gmail.com>:

> Hi Stefan,
>
> I did just that last week I need to do the same thing for a cue part. This
> is how I achieved it.
>
>
> \new CueVoice {
>\override Staff.StaffSymbol.color = #magenta
>\override Accidental.color = #magenta
>\override Beam.color = #magenta
>\override NoteHead.color = #magenta
>\override Stem.color = #magenta
>\override Rest.color = #magenta
>\override TextScript.color = #magenta
>\override DynamicText.color = #magenta
>\override DynamicTextSpanner.color = #magenta
> f,4\f^"Bb Bass" r4 r4 |
> c4 r4 r4 |
> g'4 r4 r4 |
> c,2. |
> f4\f r4 r4 |
> d4 r4 r4 |
> g4 r4 r4 |
> c,2. |
> fis2.\pp\( |
> g4\) r4 r4 |
> e2.\( |
> f4\) r4 r4 |
> }
>
> Regards
>
> Ritchie
>
> On Tue, 20 Feb 2024 at 14:49, Stefan Thomas 
> wrote:
>
>> Dear community,
>> is it possible to display the dynamics, also haipins and other things
>> like crescendo etc., in coulour?
>> Could someone could give me a hint?
>> Thanks,
>> Stefan
>>
>
>
> --
> Kind Regards
>
> Ritchie
> -
> Ritchie Fraser
>
>


dynamics in coulour

2024-02-20 Thread Stefan Thomas
Dear community,
is it possible to display the dynamics, also haipins and other things like
crescendo etc., in coulour?
Could someone could give me a hint?
Thanks,
Stefan


Re: Anyone know this ornament?

2024-02-19 Thread Stefan Thomas
Dear Auke,
I don't know this ornament either but maybe it could be useful to see a few
bars more of this music.
Best,
Stefan

>
> Hallo,

I'm transcribing the organ music of Josef Ferdinand Norbert Seger. The prelude
I'm currently working on, shows an ornamentation I am not familiar with.
See screenshot. I think it is probably meant as arpeggio, but I'm not sure.
Does anyone know for sure what it is?

Regards, Auke


Re: right enharmonic spelling

2023-12-09 Thread Stefan Thomas
Dear David,
thanks for your reply. But would also a solution with regex be possible?

David Kastrup  schrieb am Sa., 9. Dez. 2023, 13:49:

> Stefan Thomas  writes:
>
> > Dear community,
> > I'm using a lot frescobaldi with MIDI input. I would like to know is how
> > could I achieve automatically the right enharmonic spelling. e.g. when I
> > want to get bis instead of c'?
>
> If I remember correctly, the MIDI entry box allowed you to set the key
> it was working with.  Just bump the number of sharps until you like the
> enharmonic spelling.
>
> --
> David Kastrup
>


right enharmonic spelling

2023-12-09 Thread Stefan Thomas
Dear community,
I'm using a lot frescobaldi with MIDI input. I would like to know is how
could I achieve automatically the right enharmonic spelling. e.g. when I
want to get bis instead of c'?
Maybee one could usw a python Script with python.ly?


multiple transpositions

2023-08-12 Thread Stefan Thomas
Dear community,
is it possible to transpose a sequence of notes with only one motif several
times at once?
I'have in mind something like this:
motiv = { c'4 d' e' c' }
\multitranspose d e fis gis \motiv
% result:  d'4 e' fis' d'   e' fis' gis' e'e' fis' gis' e' gis'
ais' bis' gis'
Or maybee something like recursive transposition could be done?
For example, as in the snippet above, a motif is to be transposed several
times by a certain interval.
Thanks for Your help
Stefan


Re: question to generating random pitches snippet

2023-06-13 Thread Stefan Thomas
Dear Jean,
thanks for Your answer. I understand now!

Am Di., 13. Juni 2023 um 16:43 Uhr schrieb Jean Abou Samra <
j...@abou-samra.fr>:

> Le mardi 13 juin 2023 à 16:34 +0200, Stefan Thomas a écrit :
>
> Exactly. Sorry I've forgotten to send the link.
>
>
> The snippet contains the expression
>
> (random 12 random-state)
>
> meaning that a random pitch between c' and 11 steps higher (i.e., g'') is
> chosen. You can change that to, e.g.,
>
> (random 15)
>
> to have a pitch between c' and c''' , or
>
> (+ -7 (random 15))
>
> for a pitch between c and c' .
>


Re: question to generating random pitches snippet

2023-06-13 Thread Stefan Thomas
Exactly. Sorry I've forgotten to send the link.

Am Di., 13. Juni 2023 um 16:15 Uhr schrieb Kenneth Flak <
kennethf...@protonmail.com>:

>
> On 13 Jun 2023  16:12, Jean Abou Samra wrote:
> >Le mardi 13 juin 2023 à 15:56 +0200, Stefan Thomas a écrit :
> >> Dear community,
> >> I discovered the snippet that lets you generate random pitches in
> Lilypond.
> >> How does Lilypond "know" what are the lowest, what are the highest
> pitches?
> >> How could I change that?
> >
> >
> >
> >Which snippet are you talking about?
>
>
> Maybe this one?
>
>
> https://lilypond.org/doc/v2.25/Documentation/snippets/pitches_003a-generating-random-notes.html
>
>


question to generating random pitches snippet

2023-06-13 Thread Stefan Thomas
Dear community,
I discovered the snippet that lets you generate random pitches in Lilypond.
How does Lilypond "know" what are the lowest, what are the highest pitches?
How could I change that?
Thanks for Your help
Stefan


line-width in lilypond book

2022-10-25 Thread Stefan Thomas
Community,
I just noticed that it doesn't seem to make any difference whether I write
 \begin[line-width=394\pt]{lilypond}
or
 \begin[line-width=394\pt]{lilypond}
in a latex file, that I process with lilypond-book.
The lines don't fit the page margins.
Does anyone know what to do here?
Thanks,
Stefan


Re: pitch-class sets in lilypond

2022-09-23 Thread Stefan Thomas
Dear community,
this is so far my module for working with pitch-class sets.
If You want to try it, You should save the 2 files in the same folder.
I've added a snippet in Frescobaldi, which  works fine (at least for me):

-*- python;

import sys

sys.path.append('/yourfolder/stefanspcs')

import stefanspcs

text = stefanspcs.get_prime_from_lily(text)

text = stefanspcs.get_lilyfrom_prime(text)

print(text)

You can select some music (pitches only, no durations, and so on) and You
will see the prime-form when You run Your the above qwoted

In this way You can do some other things with this module, if You're
interested.

Best,

Stefan

Am Di., 20. Sept. 2022 um 21:31 Uhr schrieb Jean Abou Samra <
j...@abou-samra.fr>:

>
>
> Le 20/09/2022 à 16:27, Lukas-Fabian Moser a écrit :
> >
> > Hi Stefan,
> >
> > Am 20.09.22 um 13:00 schrieb Stefan Thomas:
> >> Dear community,
> >> sorry, it's a bit an off topic: If You are not interested in
> >> pitch-class set theory, You don't have to read the following.
> >> I've worked on a python module dealing with pitch-class set theory as
> >> I've read in "The structure of atonal music" by Allen Forte.
> >> I know that there already exists some modules like that but I want to
> >> integrate it in lilypond.
> >> I'm still working on this module, but at the  moment I can do:
> >>
> >>   * Getting the normal form and prime form of a pcs.
> >>   * Transposing and inverting a pcs
> >>   * Finding subsets of a pcs given in primeform.
> >>
> >> I'm working on:
> >>
> >>   * Finding different kinds of similarity of pcs.
> >>   * Getting subcomplexes k and kh of a pcs.
> >>   * Finding primeform and so on, when pitches in lilypond-style are
> >> given.
> >>   * Getting pitches in lilypond-style when pitches in midinote-nums
> >> or as pcs are given.
> >>
> >> Let me know it if You are interested. Maybee it's only something of
> >> interest for nerdy persons like me, but maybee for others too.
> >
> > I don't know if this is of use to you, but I created a bunch of
> > LilyPond routines for dealing with PC sets (like in Forte, but also
> > with a finer equivalence relation not identifying a set with its
> > inverse) last year. I attach it unchanged, as I don't have time to
> > clean it up at the moment; you'll probably want to uncomment some of
> > the routines at the end to see what the functions do.
> >
> > I'm curious: You write that you are working on a Python module; how
> > does this integrate in LilyPond?
> >
>
>
> What does the include file dodeka.ily contain?
>
toene_notnums = { }
toene_notnums["a,,,"]=21
toene_notnums["bes,,,"]=22
toene_notnums["ais,,,"]=22
toene_notnums["b,,"]=23
toene_notnums["bis,,"]=24
toene_notnums["his,,"]=24
toene_notnums["c,,"]=24
toene_notnums["des,,"]=25
toene_notnums["cis,,"]=25
toene_notnums["d,,"]=26
toene_notnums["es,,"]=27
toene_notnums["dis,,"]=27
toene_notnums["e,,"]=28
toene_notnums["eis,,"]=29
toene_notnums["f,,"]=29
toene_notnums["ges,,"]=30
toene_notnums["fis,,"]=30
toene_notnums["g,,"]=31
toene_notnums["as,,"]=32
toene_notnums["gis,,"]=32
toene_notnums["a,,"]=33
toene_notnums["bes,,"]=34
toene_notnums["ais,,"]=34
toene_notnums["b,,"]=35
toene_notnums["bis,,"]=36
toene_notnums["his,,"]=36
toene_notnums["c,"]=36
toene_notnums["des,"]=37
toene_notnums["cis,"]=37
toene_notnums["d,"]=38
toene_notnums["es,"]=39
toene_notnums["dis,"]=39
toene_notnums["e,"]=40
toene_notnums["eis,"]=41
toene_notnums["f,"]=41
toene_notnums["ges,"]=42
toene_notnums["fis,"]=42
toene_notnums["g,"]=43
toene_notnums["as,"]=44
toene_notnums["gis,"]=44
toene_notnums["a,"]=45
toene_notnums["bes,"]=46
toene_notnums["ais,"]=46
toene_notnums["b,"]=47
toene_notnums["bis,"]=48
toene_notnums["his,"]=48
toene_notnums["c"]=48
toene_notnums["des"]=49
toene_notnums["cis"]=49
toene_notnums["d"]=50
toene_notnums["es"]=51
toene_notnums["dis"]=51
toene_notnums["e"]=52
toene_notnums["eis"]=53
toene_notnums["f"]=53
toene_notnums["ges"]=54
toene_notnums["fis"]=54
toene_notnums["g"]=55
toene_notnums["as"]=56
toene_notnums["gis"]=56
toene_notnums["a&quo

Re: pitch-class sets in lilypond

2022-09-20 Thread Stefan Thomas
Dear community,
I really didn't expect so many replies to my last post.
That is why I have to apoligize not have beeing clear in my words.
As I wrote, I'm writing the module in python, I'm not familiar with scheme,
I'm a hobby-programmer.
When I wrotei, I'm planning to integrate it in lilypond, I should better
have writen in Frescobaldi, which can deal with python scripts.
Sorry, but I guess direct integration in Lilypond would be to heavy for me.
Best,
Stefan

Am Mi., 21. Sept. 2022 um 01:49 Uhr schrieb Kieren MacMillan <
kie...@kierenmacmillan.info>:

> Hi all!
>
> The timing, of course, couldn't be worse…  ;)  There's a workshop/reading
> of my newest [Lilypond-engraved, of course!] musical on Oct 15, and my
> co-writer and I *just* found out (as the result of a session with our
> brilliant dramaturge/director) that there are a whole pant-load of
> revisions to be done.
>
> That being said… I've done a fair bit of work around this, some alone and
> some in collaboration with Urs Liska (who isn't able to continue that
> work), and I would *love* to be involved in any “committee” work going on
> with regard to helping Lilypond enter the 20th Century. ;)
>
> Please keep me in the loop!
> Kieren.
>
> > On Sep 20, 2022, at 10:27 AM, Lukas-Fabian Moser  wrote:
> > Hi Stefan,
> > Am 20.09.22 um 13:00 schrieb Stefan Thomas:
> >> Dear community,
> >> sorry, it's a bit an off topic
>


Re: pitch-class sets in lilypond

2022-09-20 Thread Stefan Thomas
Dear Lukas,
the file, unfortunately, doesn't work for me, I don't have dodeka.ly

Am Di., 20. Sept. 2022 um 16:28 Uhr schrieb Lukas-Fabian Moser :

> Hi Stefan,
> Am 20.09.22 um 13:00 schrieb Stefan Thomas:
>
> Dear community,
> sorry, it's a bit an off topic: If You are not interested in pitch-class
> set theory, You don't have to read the following.
> I've worked on a python module dealing with pitch-class set theory as I've
> read in "The structure of atonal music" by Allen Forte.
> I know that there already exists some modules like that but I want to
> integrate it in lilypond.
> I'm still working on this module, but at the  moment I can do:
>
>- Getting the normal form and prime form of a pcs.
>- Transposing and inverting a pcs
>- Finding subsets of a pcs given in primeform.
>
> I'm working on:
>
>- Finding different kinds of similarity of pcs.
>- Getting subcomplexes k and kh of a pcs.
>- Finding primeform and so on, when pitches in lilypond-style are
>given.
>- Getting pitches in lilypond-style when pitches in midinote-nums or
>as pcs are given.
>
> Let me know it if You are interested. Maybee it's only something of
> interest for nerdy persons like me, but maybee for others too.
>
> I don't know if this is of use to you, but I created a bunch of LilyPond
> routines for dealing with PC sets (like in Forte, but also with a finer
> equivalence relation not identifying a set with its inverse) last year. I
> attach it unchanged, as I don't have time to clean it up at the moment;
> you'll probably want to uncomment some of the routines at the end to see
> what the functions do.
>
> I'm curious: You write that you are working on a Python module; how does
> this integrate in LilyPond?
>
> Lukas
>


pitch-class sets in lilypond

2022-09-20 Thread Stefan Thomas
Dear community,
sorry, it's a bit an off topic: If You are not interested in pitch-class
set theory, You don't have to read the following.
I've worked on a python module dealing with pitch-class set theory as I've
read in "The structure of atonal music" by Allen Forte.
I know that there already exists some modules like that but I want to
integrate it in lilypond.
I'm still working on this module, but at the  moment I can do:

   - Getting the normal form and prime form of a pcs.
   - Transposing and inverting a pcs
   - Finding subsets of a pcs given in primeform.

I'm working on:

   - Finding different kinds of similarity of pcs.
   - Getting subcomplexes k and kh of a pcs.
   - Finding primeform and so on, when pitches in lilypond-style are given.
   - Getting pitches in lilypond-style when pitches in midinote-nums or as
   pcs are given.

Let me know it if You are interested. Maybee it's only something of
interest for nerdy persons like me, but maybee for others too.
Best,
Stefan


bookpart without pagebreak?

2022-08-30 Thread Stefan Thomas
Dear community,
I would like to know how  the pagebreak could be avoided between the two
"movements" in the below quoted snippet:
\version "2.22.0"
\header { title = "My great Work"
  composer ="Stefan Thomas"
   }
Music = \relative c' {c4 d e f g1   }
titleI = \header {
  title = ""
  subtitle = "First Movement"
}
\bookpart {
\titleI
  \score { \new Staff \Music }
}

Music = \relative g'  { \time 2/4 g4 e8 f g4 e c1  }
titleII = \header {
  title = ""
  composer=""
  subtitle = "Second Movement"
}
\bookpart {
\titleII
  \score { \new Staff \Music }
}


Re: openmusic

2022-07-21 Thread Stefan Thomas
Dear community,
thanks for Your answers. I've downloaded and installed omlily and I tried
to export a basic patch, but I can't see any ly-file.
What is wrong with this patch?
Thanks for your help
Stefan


openmusic

2022-07-20 Thread Stefan Thomas
Dear community,
does anyone of You use openmusic in conjunction with lilypond?
I would like to know how to export a patch to lilypond. A small example or
any hint would be very appreciated!
Best,
Stefan


question concerning arranger tool

2022-06-20 Thread Stefan Thomas
Dear community,
I try to understand more of the arranger tool, have a look at
https://github.com/gilles-th/arranger.ly
Could someone give an instructional example, what the functions copy-out
can do and how it works?
I generally think taht there should be more examples in the docs. I'm
willing to help in this regard but therefore I sould understand a bit more
of the staff.
Thanks,
Stefan


filter the nth note

2022-06-19 Thread Stefan Thomas
Dear community,
I would like to do something like the following, but automatically, without
typing all the music again:
allNotes= { c'8 g' e' g' d' g' f' g' c' g' e' g'   }
someNotes = { c' d' c' }
In other words: I would like to filter out every 4th note of allNotes, so
that I could do in combination with changePitch (see
https://github.com/gilles-th/arranger.ly/blob/master/changePitch.ly) the
following:
patI = { c8 r r4 }
someNotes =  { \cPI { \someNotes s } }
Thanks for Your help,
Stefan


Re: how to split into two parts

2022-04-24 Thread Stefan Thomas
Dear Gilles,
thanks again for Your explanation!
Best,
Stefan

Am Sa., 23. Apr. 2022 um 22:45 Uhr schrieb Gilles Thibault :

>
> > I would like to ask You two questions concerning the code, You've
> > sended:
>
> > 1. How does the function noteToRest "know", that the f sharp has to be
> > converted to a rest?
>
> It is not an EventChord, only a NoteEvent
>
> > 2. Is it possible to to convert
> >fis'8 r8
> > to
> >r4
>
> You can then use "arranger.ly"
>
> %%%
> \version "2.22.0"
>
> \include "arranger.ly"
>
> global = { \time 7/8 s8*7*2 }
> #(init '(dummy))
>
> flutes =  {
>8 r fis' 8 r  8 r8 r
>8  r fis'  8 r r4 }
>
> noteToRest = #(define-music-function (music) (ly:music?)
>(map-some-music
>   (lambda(evt)
> (case (name-of evt) ;; defined in "chordsAndVoices.ly"
>   ((EventChord) evt)
>   ((NoteEvent) (make-music 'RestEvent
>'duration (ly:music-property evt
> 'duration)))
>   (else #f)))
>   music))
>
> flA = \extractNote #2 \flutes
> flB = \extractNote #1 \noteToRest \flutes
>
> #(rm 'flB '(1 4) #{ r4 #})
>
> \score { <<
>\new Staff << \global \flutes >>
>\new Staff << \global \flA >>
>\new Staff << \global \flB >>
>>>
> }
>
> 
>
> If you want to insert #{ r4 #} in the second beat of several bars, you
> can use x-rm
> and apply :
>
> #(apply x-rm 'flB #{ r4 #} (map (lambda(n)(list n 4))
>  '(1 3 7 12 19))) % => '((1 4) (3 4) (7
> 4))
>
> If the 2 first bars are a rhythmic pattern used a lot of time in the
> piece, you would probably prefer to use the function cp (changePitch).
>
> --
> Gilles
>


Re: changing lyrics font-style to italics

2022-04-19 Thread Stefan Thomas
Dir Rip_Mus,
thanks for the tip!
It works!

Am Mo., 18. Apr. 2022 um 19:37 Uhr schrieb Rip _Mus <
ripetizioni.mus...@gmail.com>:

> Dear Stefan,
> have a look:
>
> \version "2.22.1"
>
> \score {
>   \new Staff = "voce"
>   {
> \new Voice = "main" {
>   \relative c' {
> <<
>   {c4 d e c c d e c}
>   \new Lyrics \with {
> alignBelowContext = "voce"
>   }
>   \lyricsto "main" { Fra Mar -- ti -- no Cam -- pa -- na -- ro }
> >>
>   }
> }
>   }
> }
>
> \layout {
>   \context {
> \Lyrics
> \override LyricText.font-shape = #'italic
>   }
> }
>
> Il giorno lun 18 apr 2022 alle ore 19:28 Stefan Thomas <
> kontrapunktste...@gmail.com> ha scritto:
>
>> Dear community,
>> for certain reasons I would like to change the font-style of a Lyrics
>> context to italic.
>> I tried  it with
>> \override LyricText #'font-style = #'italic
>> but without success.
>> Does someone know how to do it?
>> Thanks,
>> Stefan
>>
>


changing lyrics font-style to italics

2022-04-18 Thread Stefan Thomas
Dear community,
for certain reasons I would like to change the font-style of a Lyrics
context to italic.
I tried  it with
\override LyricText #'font-style = #'italic
but without success.
Does someone know how to do it?
Thanks,
Stefan


Re: how to split into two parts

2022-04-18 Thread Stefan Thomas
Dear Hans,
sorry, it was a mistake of mine.
I should have written
flA = { \global \extractNote #2 \flutes }
flB = { \global  \extractNote #1 \flutes }
My idea is: if there are 2 pitches at once, they shall be splitted (this
works fine), if there is only one sinle, it should be only in the first
flute and there should be a rest in the second one.
Best,
Stefan

Am Mo., 18. Apr. 2022 um 13:43 Uhr schrieb Hans Aikema <
hans.aik...@aikebah.net>:

>
>
> > On 18 Apr 2022, at 12:23, Stefan Thomas 
> wrote:
> >
> > 
> > Dear community,
> > I would like to split the following example into two parts:
> > \version "2.22.1"
> > global = { \time 7/8 }
> > flutes = {
> >   \global
> > 8 r fis' 8 r  8 r8 r
> > 8  r fis'  8 r r4
> > }
> > I know I can do it with chordsAndVoices.ly
> > But the result is the desired only for the first flute.
> > Whe I do
> > flA = { \global \extractNote #2 \flutes }
> > flB = { \global \extractNote #2 \flutes }
> > I get
> > flA = { \global g'8 r fis' 8 r   gis'8 r8 r
> > g'8  r fis'   gis'8 r r4
> > } % as expexted
> > flB = { \global
> > f' 8 r fis' 8 r  d' 8 r8 r
> > f'8  r fis'  d'8 r r4
> > }
> > But I would like to get for the 2nd flute:
> > flB = { \global
> > f' 8 r r4  d' 8 r8 r
> > f'8  r r d'8 r r4
> > }
> >
> > Is there an easy way to get this result  automatically?
> > Thanks,
> > Stefan
>
> Didn't know about the chordsAndVoices, but I do spot that you both times
> "\extractNote #2" - which to me seems to instruct to extract the second
> note of the chord.
>
> I expect
> flB = { \global \extractNote #1 \flutes }
>
> to yield you the result you're after
>
> regards,
> Hans
>
>


how to split into two parts

2022-04-18 Thread Stefan Thomas
Dear community,
I would like to split the following example into two parts:
\version "2.22.1"
global = { \time 7/8 }
flutes = {
  \global
8 r fis' 8 r  8 r8 r
8  r fis'  8 r r4
}
I know I can do it with chordsAndVoices.ly
But the result is the desired only for the first flute.
Whe I do
flA = { \global \extractNote #2 \flutes }
flB = { \global \extractNote #2 \flutes }
I get
flA = { \global g'8 r fis' 8 r   gis'8 r8 r
g'8  r fis'   gis'8 r r4
} % as expexted
flB = { \global
f' 8 r fis' 8 r  d' 8 r8 r
f'8  r fis'  d'8 r r4
}
But I would like to get for the 2nd flute:
flB = { \global
f' 8 r r4  d' 8 r8 r
f'8  r r d'8 r r4
}

Is there an easy way to get this result  automatically?
Thanks,
Stefan


Re: Assistance to Create a Recipe for 41-EDO and "Kite Guitar" Tablature

2022-01-14 Thread Stefan Thomas
Dear Devin,
did You succeed with your research? I would be interested in a file with
definitions for notenames and accidental glyphs.
Thanks,
Stefan

Am Do., 29. Juli 2021 um 13:24 Uhr schrieb :

> Thank you; I will do some research.
>
> On 2021-07-28 13:49, Stefan Thomas wrote:
> > Dear Devin,
> > there's also the "society for ekmelic music"  in Salzburg, Austria.
> > They also support mictronal notation with lilypond.
> > Have a look at
> > http://www.ekmelic-music.org/en/extra/ekmelily.htm#Download
> > Maybee this helps You!
> > Best,
> > Stefan
> >
> >> Hi All,
> >>
> >> I need help from users who have some experience with microtonality
> >> (or overrides in general) in Lilypond to create a recipe for
> >> lilypond notation for the Kite Guitar (kiteguitar.com [1]). The Kite
> >> Guitar uses 41 equal divisions of the octave in a clever way, which
> >> balances practicality with playability to get a very close
> >> approximation to 7-limit Just Intonation. I have made some attempts,
> >> but I don't really know Lilypond so well that I can create a handy
> >> recipe such as this. I did some research and found
> >> http://x31eq.com/lilypond/ which is helpful, but I am unable to make
> >> the necessary tweaks with my limited knowledge. (I am happy to send
> >> over what I tried to do, but as my attempts have only failed I do
> >> not want to confuse anyone.)
> >>
> >> The overarching specs are:
> >> 1. 41 Equal Divisions of the Octave
> >>
> >> Tablature-specific:
> >> 2. Frets are spaced two EDO-steps apart (i.e. 2 of the 41)
> >> 3. Strings are tuned 13 EDO-steps apart (i.e. 13 of the 41)
> >>
> >> ^^Lilypond will either need to find the pitch, or allow the user to
> >> override the current calculation as what I am getting is for a
> >> standard guitar.
> >>
> >> Notation-specific:
> >>
> >> 4. There are Sharps and Flats, but there are also upwards "^",
> >> double-upwards "^^", downwards "v", and "double-downwards "vv". (see
> >> https://en.xen.wiki/w/Ups_and_Downs_Notation ) 5. There needs to be
> >> some way to set upwards/downwards in the key signature. ^^ it would
> >> be super-nice if this could be done globally, so that a composer can
> >> focus on the music-making
> >>
> >> Chord-charts:
> >>
> >> 6. Support for chord charts such as
> >>
> >
> https://en.xen.wiki/w/Kite_Guitar_Translations_by_Aaron_Wolf#Auld_Lang_Syne
> >> Any help is appreciated. The growing community of Kite Guitar
> >> players would really appreciate this (many of whom are fellow
> >> software libre supporters/advocates). Also, I can send over some
> >> sample scores created with MuseScore once I receive permission to
> >> share them.
> >>
> >> Thanks in Advance!
> >> Devin
> >
> >
> > Links:
> > --
> > [1] http://kiteguitar.com
>


Re: clef change, invisible

2021-12-02 Thread Stefan Thomas
Dear David,
thanks for Your reply.
Can it also be done with \once \override?

Am Do., 2. Dez. 2021 um 17:07 Uhr schrieb David Kastrup :

> Stefan Thomas  writes:
>
> > Dear community,
> > is it possible to make a clef change invisible, at the end of the line?
> > I don't want to see the bass clef at the end of the first line here:
> > \version "2.22.1"
> > Musik = \relative c'' {
> >   \clef "treble" g f e d
> >   \break
> >   \clef "bass" c4 b a2 }
> > \new Staff \Musik
> > Thanks,
> > Stefan
>
>
>
> --
> David Kastrup
>


clef change, invisible

2021-12-02 Thread Stefan Thomas
Dear community,
is it possible to make a clef change invisible, at the end of the line?
I don't want to see the bass clef at the end of the first line here:
\version "2.22.1"
Musik = \relative c'' {
  \clef "treble" g f e d
  \break
  \clef "bass" c4 b a2 }
\new Staff \Musik
Thanks,
Stefan


Re: arranger, context voice

2021-11-18 Thread Stefan Thomas
Thanks, I'll check it out.

Am Mi., 10. Nov. 2021 um 22:42 Uhr schrieb Gilles Thibault :

>
> > I would like to understand what is the difference
> > beetween
> >
> >> \new Staff \new Voice \A
> >>
> >  and
> >
> >> \new Staff \A
> >>
>
> This is not related to arranger.ly :
>
> This snippet works :
>
> %%%
>
> \version "2.22.0"
>
> music = { c'1 c' c' c' }
>
> skips = {  s1*2 s1*2^"Hello" }
>
> \new Staff << \skips \music >>
>
> %%%
>
> But if you replace the definition of \skips by
>
> skips = { s1*2( s1*2) }
>
> the snippet fails (no slurs).
>
> It fails also with
>
>skips = { s1*2 s1*2-> }
>
> At last, with
>
> skips = { s1*2 s1*2->^"Hello" }
>
> you'll get an error :
>"script direction not yet known"
>
> --
> Gilles
>


Re: arranger, context voice

2021-11-08 Thread Stefan Thomas
Dear Gilles,
thanks, it works! I would like to understand what is the difference
beetween

> \new Staff \new Voice \A
>
 and

> \new Staff \A
>
Could You be so kind and give me a hint?
Thanks, Stefan


Am Sa., 6. Nov. 2021 um 23:48 Uhr schrieb Gilles Thibault :

> Le 2021-11-01 18:26, Stefan Thomas a écrit :
> > Dear community,
> > I would like to do with arranger.ly something similar to
> > Key = { \key f \major   }
> > music =
> >  { \Key c'4 d' e' f'2.}
> > artiA = { s2.( s) }
> > music =  { \context Voice << {\music}  {\artiA } >> }
> > I tried in in the following way, without success, unfortunately:
> > \version "2.22.1"
> > \include"arranger.ly"
> > global = {
> >   \time 3/4 \tempo "Andante"
> >  s2.*4
> >   }
> >
> > Key = { \key f \major   }
> > music =
> >  { \Key c'4 d' e' f'2.}
> > artiA = { s2.( s) }
> > instruments = #'(A B)
> > #(init instruments)
> > #(begin
> > (rm 'A 1 (sim music artiA) )
> >
> >   )
> >
> > \score {
> >   << \new Devnull \global
> >   \new GrandStaff <<
> >   \new Staff \A
> >   \new Staff \B
> >   >>
> >   >>
> > }
> > Does someone have an idea how to do it?
> > Thanks,
> > Stefan
>
>
> Sorry to answer so late.
>
> Probably
>\new Staff \new Voice \A
> instead of \new Staff \A
>
>
> --
> Gilles
>


arranger, context voice

2021-11-01 Thread Stefan Thomas
Dear community,
I would like to do with arranger.ly something similar to
Key = { \key f \major   }
music =
 { \Key c'4 d' e' f'2.}
artiA = { s2.( s) }
music =  { \context Voice << {\music}  {\artiA } >> }
I tried in in the following way, without success, unfortunately:
\version "2.22.1"
\include"arranger.ly"
global = {
  \time 3/4 \tempo "Andante"
 s2.*4
  }

Key = { \key f \major   }
music =
 { \Key c'4 d' e' f'2.}
artiA = { s2.( s) }
instruments = #'(A B)
#(init instruments)
#(begin
(rm 'A 1 (sim music artiA) )

  )

\score {
  << \new Devnull \global
  \new GrandStaff <<
  \new Staff \A
  \new Staff \B
  >>
  >>
}
Does someone have an idea how to do it?
Thanks,
Stefan


Re: Assistance to Create a Recipe for 41-EDO and "Kite Guitar" Tablature

2021-07-28 Thread Stefan Thomas
Dear Devin,
there's also the "society for ekmelic music"  in Salzburg, Austria.
They also support mictronal notation with lilypond.
Have a look at
http://www.ekmelic-music.org/en/extra/ekmelily.htm#Download
Maybee this helps You!
Best,
Stefan

> Hi All,
>
>
> I need help from users who have some experience with microtonality (or 
> overrides
> in general) in Lilypond to create a recipe for lilypond notation for the
> Kite Guitar (kiteguitar.com). The Kite Guitar uses 41 equal divisions of
> the octave in a clever way, which balances practicality with playability
> to get a very close approximation to 7-limit Just Intonation. I have made
> some attempts, but I don't really know Lilypond so well that I can create
> a handy recipe such as this. I did some research and found
> http://x31eq.com/lilypond/ which is helpful, but I am unable to make the 
> necessary
> tweaks with my limited knowledge. (I am happy to send over what I tried
> to do, but as my attempts have only failed I do not want to confuse
> anyone.)
>
> The overarching specs are:
> 1. 41 Equal Divisions of the Octave
>
> Tablature-specific:
> 2. Frets are spaced two EDO-steps apart (i.e. 2 of the 41)
> 3. Strings are tuned 13 EDO-steps apart (i.e. 13 of the 41)
>
> ^^Lilypond will either need to find the pitch, or allow the user to override
> the current calculation as what I am getting is for a standard guitar.
>
> Notation-specific:
>
> 4. There are Sharps and Flats, but there are also upwards "^", double-upwards
> "^^", downwards "v", and "double-downwards "vv". (see
> https://en.xen.wiki/w/Ups_and_Downs_Notation ) 5. There needs to be some
> way to set upwards/downwards in the key signature. ^^ it would be
> super-nice if this could be done globally, so that a composer can focus
> on the music-making
>
> Chord-charts:
>
> 6. Support for chord charts such as
> https://en.xen.wiki/w/Kite_Guitar_Translations_by_Aaron_Wolf#Auld_Lang_Syne 
> Any
> help is appreciated. The growing community of Kite Guitar players would
> really appreciate this (many of whom are fellow software libre 
> supporters/advocates).
> Also, I can send over some sample scores created with MuseScore once I
> receive permission to share them.
>
> Thanks in Advance!
> Devin
>
>
>
>


Re: how to get shorter stems

2021-06-24 Thread Stefan Thomas
Dear Xavier,
thanks, it worked perfectly!

Am Do., 17. Juni 2021 um 21:43 Uhr schrieb Xavier Scheuer <
x.sche...@gmail.com>:

> On Thu, 17 Jun 2021 at 21:28, Stefan Thomas 
> wrote:
> >
> > Dear community,
> > in the following example the stems in voice three are to short in my
> opinion.
> > How can I shorten them?
> >
> > All =  { \clef "bass" \global
> > << {\upper  } \new Voice { \middle } \new Voice { \under }  >>
> > }
> >
> > \new Staff \All
>
> Hello,
>
> \override Beam.positions = #'(4 . 4)
> d8 e d
>
> Maybe?
>
> Cheers,
> Xavier
>
> --
> Xavier Scheuer 
>
>


how to get shorter stems

2021-06-17 Thread Stefan Thomas
Dear community,
in the following example the stems in voice three are to short in my
opinion.
How can I shorten them?

\version "2.22.0"
global = { \key d \minor  \time 6/8 }
upper = { \voiceOne
  4.  4 8
}
middle = { \voiceThree
s4.
 \override Stem.length = #1 % has no effect!
d8 e d
}
under = { \voiceTwo
 4. 4.
}

All =  { \clef "bass" \global
<< {\upper  } \new Voice { \middle } \new Voice { \under }  >>
}

\new Staff \All


Re: partCombine: how to print "a due" automatically again

2021-06-10 Thread Stefan Thomas
Dear Timothy,
thanks for that tip, it works!

Am Mi., 9. Juni 2021 um 22:05 Uhr schrieb Timothy Lanfear <
timo...@lanfear.me>:

> On 09/06/2021 10:05, Stefan Thomas wrote:
>
> Dear community,
> is there a way to get the "a due" text in combined parts automatically?
>
> I do it by adding a \once \partCombineChords. It doesn't feel great as a
> solution, but it works.
> \version "2.22.0"
> voiceA = \relative c'' {
>   c4 d e f g4 f e d c1
>   \once \partCombineChords R1*27 \break
>   c4 d e f g4 f e d c1  }
> voiceB = { \voiceA }
>
> \score {
>  <<
>\new Staff {  \partCombine \voiceA \voiceB }
>  >>
> }
>
> --
> Timothy Lanfear, Bristol, UK.
>
>


trying arranger and extract music

2021-06-10 Thread Stefan Thomas
Dear community,
I'm currently trying out arranger.ly (have a look at
http://gillesth.free.fr/Lilypond/
).
Unfortunately, I'm not able to manage some of the functions in the right
way.
In the below quoted example I would like to play the Voice "Lower" colla
parte with Upper in measures 4 and 5.
This example doesn't work and I can't find out the mistake:
\version "2.22.0"
\include"arranger.ly"
globalI = {
\time 3/4  s2.
\time 5/8  s8*5
}
globalII = {
\time 4/4  s1
\time 6/8  s2.
\time 3/4  s2.
}

global = { \globalI \globalII }

all = #'(Upper Lower)
#(init all)
UpperI = \relative g' {
g4 f g
e4 d8 c4
}
UpperII = \relative c' {
d4 e f g
e4 d8 c4 bes8
c4 r r
}

LowerI = {
  \eM \UpperI \M #1 {\M #2 s4 } r4 r8
}
LowerII = {
\eM \UpperII s1 s2.

}
#(begin
 (rm 'Upper 1  UpperI )
 (rm 'Upper 3  UpperII )
 (rm 'Lower 1  LowerI )
 (rm 'Lower 4  (em UpperII s1) )

 )


\score {
<<
\new Devnull \global
\new Staff \Upper
\new Staff \Lower

>>

}


partCombine: how to print "a due" automatically again

2021-06-09 Thread Stefan Thomas
Dear community,
is there a way to get the "a due" text in combined parts automatically?
Here's my short snippet:
\version "2.22.0"
voiceA = \relative c'' {
  c4 d e f g4 f e d c1
  R1*27 \break
  c4 d e f g4 f e d c1  }
voiceB = { \voiceA }

\score {
 <<
   \new Staff {  \partCombine \voiceA \voiceB }
 >>
}
Thanks for any help,
Stefan


Re: Triplet beaming help

2021-05-19 Thread Stefan Thomas
Dear Mark,
You can do it easily in this way:
\version "2.22"
tune = \relative c'' {
  \clef treble
  r4^"A"  \tuplet 3/2 { d8 d d } \tuplet 3/2 { d8 d d } d8 r8 |
  r4^"B"  r8 \tuplet 3/2 { d8[ d d] } \tuplet 3/2 { d8[ d d] } d8 |
}
\score { \new Staff \tune }
But I would recommend to do it as quoted below:
\version "2.22"
%sechzehnteltriolen
ST = #(define-music-function (x) (ly:music?)
#{
\set Voice.beamExceptions = #'( )
\set Voice.baseMoment = #(ly:make-moment 1/8)
\set Voice.beatStructure = #'(1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 )
  \tupletSpan 8
  \tuplet 3/2 { $x }
  \tupletSpan \default
 \unset  Voice.baseMoment
\unset Voice.beatStructure
\unset Voice.beamExceptions
 %\unset Voice.beamExceptions

#})
tune = \relative c'' {
  \clef treble
  r4^"A"  \tuplet 3/2 { d8 d d }
  \tuplet 3/2 { d8 d d } d8 r8 |
  r4^"B"  r8
  \repeat "unfold" 2 { \ST { d8 16 ~  16 8 }   }
  d8 \noBeam |
}
\score { \new Staff \tune }
Hope this helps!


Re: het wilhelmus

2021-05-06 Thread Stefan Thomas
Cool, thanks!

Am Di., 13. Apr. 2021 um 13:27 Uhr schrieb Graham King <
graham.k...@tremagi.org.uk>:

> There's an interesting summary here:
> http://www.originals.be/en/originals/8198
>
> HTH
> -- Graham
>
> On 13 Apr 2021, at 11:00, Stefan Thomas 
> wrote:
>
> 
> Dear all,
> thank You for the information!
> All the best,
> Stefan
>
> Am Di., 13. Apr. 2021 um 10:01 Uhr schrieb m.tarensk...@kpnmail.nl <
> m.tarensk...@kpnmail.nl>:
>
>> https://nl.m.wikipedia.org/wiki/Wilhelmus
>>
>> I don't know if such a thing as *the* original source exists. Probably
>> there are several old sources. But the version in this wiki shows the
>> melody without full barlines
>>
>> MT
>>
>> Verzonden vanaf mijn Huawei mobiele telefoon
>>
>>
>>  Oorspronkelijk bericht 
>> Onderwerp: het wilhelmus
>> Van: Stefan Thomas
>> Aan: lilypond-user
>> Cc:
>>
>>
>> Dear community, especially those of You living in my direct neighborhood
>> in the Netherlands,
>> I assume that the melody from "Het Wilhelmus", the National Anthem of NL
>> is a very old one, from the renaissance.
>> As far as I know times signatures and especially changes of time
>> signatures didn't exist in those times.
>> When searching for sheet music of this song I've only found versions with
>> bar changes. Does someone of You know,if and where the original source of
>> this song can be found?
>> Thanks a lot,
>> Stefan
>>
>>


online midi-player

2021-04-28 Thread Stefan Thomas
Dear community,
I'm searching, for pedagogical purposes, for an online-midi-file player.
Especially one that could show you the corresponding piano key when a note
is played.
Do You know something like this?
Thanks for You help,
Stefan


Re: het wilhelmus

2021-04-13 Thread Stefan Thomas
Dear all,
thank You for the information!
All the best,
Stefan

Am Di., 13. Apr. 2021 um 10:01 Uhr schrieb m.tarensk...@kpnmail.nl <
m.tarensk...@kpnmail.nl>:

> https://nl.m.wikipedia.org/wiki/Wilhelmus
>
> I don't know if such a thing as *the* original source exists. Probably
> there are several old sources. But the version in this wiki shows the
> melody without full barlines
>
> MT
>
> Verzonden vanaf mijn Huawei mobiele telefoon
>
>
>  Oorspronkelijk bericht ----
> Onderwerp: het wilhelmus
> Van: Stefan Thomas
> Aan: lilypond-user
> Cc:
>
>
> Dear community, especially those of You living in my direct neighborhood
> in the Netherlands,
> I assume that the melody from "Het Wilhelmus", the National Anthem of NL
> is a very old one, from the renaissance.
> As far as I know times signatures and especially changes of time
> signatures didn't exist in those times.
> When searching for sheet music of this song I've only found versions with
> bar changes. Does someone of You know,if and where the original source of
> this song can be found?
> Thanks a lot,
> Stefan
>
>


het wilhelmus

2021-04-13 Thread Stefan Thomas
Dear community, especially those of You living in my direct neighborhood in
the Netherlands,
I assume that the melody from "Het Wilhelmus", the National Anthem of NL is
a very old one, from the renaissance.
As far as I know times signatures and especially changes of time signatures
didn't exist in those times.
When searching for sheet music of this song I've only found versions with
bar changes. Does someone of You know,if and where the original source of
this song can be found?
Thanks a lot,
Stefan


Re: who is behind omet.ca

2021-04-12 Thread Stefan Thomas
Thank You for all the information,
I think, this information should be available on the site.
But I will contact Mike by myself.
All the best,
Stefan

Am So., 11. Apr. 2021 um 14:17 Uhr schrieb Xavier Scheuer <
x.sche...@gmail.com>:

> On Sun, 11 Apr 2021 at 11:11, Stefan Thomas 
> wrote:
> >
> > Dear Thomas,
> > I've seen these two links before too. But the question remains: Who is
> the owner of the website?
> > Can we trust them?
>
> Hello,
>
> He also set up a modern fork/clone of the moribund Mutopia Project.
> https://blackstock.media/
>
>
> https://lists.bcn.mythic-beasts.com/mailman/private/mutopia-discuss/2020-October/001029.html
> (Mutopia-discuss Archives are only available to the list members)
>
> And he sent several messages on lilypond-user as well. Quite easy to reach
> him IMHO. I've copied his e-mail addresses.
>
> Cheers,
> Xavier
>
> --
> Xavier Scheuer 
>
>


Re: who is behind omet.ca

2021-04-11 Thread Stefan Thomas
Dear Thomas,
I've seen these two links before too. But the question remains: Who is the
owner of the website?
Can we trust them?
Stefan

Am So., 11. Apr. 2021 um 10:45 Uhr schrieb Thomas Morley <
thomasmorle...@gmail.com>:

> Am So., 11. Apr. 2021 um 09:30 Uhr schrieb Stefan Thomas
> :
> >
> > Dear community,
> > a few days I discovered https://ide.omet.ca/ which seems to be a very
> interesting and useful site.
> > But I didn't find there an impressum.
> > Who are the people behind this site? Can I trust them?
> > Does someone of You know something about them?
> > Thanks,
> > Stefan
>
> I found:
> https://linuxmusicians.com/viewtopic.php?t=7229
> and on our own website:
> https://lilypond.org/easier-editing.html
>
> Cheers,
>   Harm
>


who is behind omet.ca

2021-04-11 Thread Stefan Thomas
Dear community,
a few days I discovered https://ide.omet.ca/ which seems to be a very
interesting and useful site.
But I didn't find there an impressum.
Who are the people behind this site? Can I trust them?
Does someone of You know something about them?
Thanks,
Stefan


Re: first trial with arranger.ly

2021-04-10 Thread Stefan Thomas
Dear Jonas,
thanks for Your reply.
I send You the complete fille:

> \version "2.22.0"
> \include"arranger.ly"
> global = { s1*1000 }
>  %% a long length is provided
> #(init '())
>  %% Instruments list initially empty =>
> %% the positions take into account previous timing insertions.
> %% ( \global is re-analysed each time. )
> #(begin
>  ;; Builds \global
> (rm-with 'global 1 #{ \time 3/4 #} / ;; First, time signatures
> 10 #{ \time 5/8 #} /
> 20 #{ \time 4/4 #})
> (cut-end 'global 70)
>  ;; Cuts what's beyond
> (x-rm 'global #{ \mark\default #}
>  ;; Marks
> 10 20 30 40 50 60)
> (tempos
>  ;; Tempo indications
> 1 (metronome "Allegro" "4" 120) /
> 10 (metronome "" "8" "8") /
> 20 (metronome "Allargando" "4" "4.")
> 30 "Piu mosso"
> 60 (markup #:column ("FINAL"
> (metronome "Allegro vivo" "4" 200
> (rm-with 'global 1 #{ \key c \major #} / ;; Key signatures
> 20 #{ \key c \minor #} /
> 30 #{ \key c \major #})
> (x-rm 'global #{ \bar "||" #} 20 30 60)
>  ;; Bars
> (rm-with 'global 1 #{ \markLengthOn #})
>  ;; Miscellaneous
> (rm 'global 70 #{ \bar "|." #})
>  ;; ...the final touch
> )
>  %% End \global
> %% The list of instruments can now be initialized.
> #(init '(test)) %% List not empty = fixed metric: any new timing event
> will be ignored
> \new Staff { << \global \test >> }
>

And the console messages:

> GNU LilyPond 2.22.0
> Processing `arrangertest.ly'
> Parsing...
> arrangertest.ly:9:2: error: GUILE signaled an error for the expression
> beginning here
> #
>  (begin
> Interpreting
> music...[8][16][24][32][40][48][56][64][72][80][88][96][104][112][120][128][136][144][152][160][168][176][184][192][200][208][216][224][232][240][248][256][264][272][280][288][296][304][312][320][328][336][344][352][360][368][376][384][392][400][408][416][424][432][440][448][456][464][472][480][488][496][504][512][520][528][536][544][552][560][568][576][584][592][600][608][616][624][632][640][648][656][664][672][680][688][696][704][712][720][728][736][744][752][760][768][776][784][792][800][808][816][824][832][840][848][856][864][872][880][888][896][904][912][920][928][936][944][952][960][968][976][984][992][1000]
> Preprocessing graphical objects...
> Finding the ideal number of pages...
> Fitting music on 5 or 6 pages...
> Drawing systems...
> Converting to `arrangertest.pdf'...
> Unbound variable: expand-notes-and-chords-copy-of
> Success: compilation successfully completed
>

Am Sa., 10. Apr. 2021 um 12:32 Uhr schrieb Jonas Hahnfeld :

> Hi Stefan,
>
> it's of course possible that arranger.ly is not yet prepared for
> LilyPond 2.22.0. In any case, it might help to post the exact error
> message (if there is one other than "GUILE signaled an error") so
> others can try to help.
>
> Jonas
>
> Am Samstag, dem 10.04.2021 um 12:28 +0200 schrieb Stefan Thomas:
> > Dear community,
> > I've remove lyp and I've also uninstalled and reinstalled lilypond
> > but the problem still persists.
> > Does someone of You know, what I could do now?
> > Thanks,
> > Stefan
> >
> > Am Fr., 9. Apr. 2021 um 17:20 Uhr schrieb Stefan Thomas
> > :
> > > Dear Jonas,
> > > I've download my lilypond from the lilypond-website, not from my
> > > linux distro.
> > > Stefan
> > >
> > > Am Do., 8. Apr. 2021 um 15:40 Uhr schrieb Jonas Hahnfeld
> > > :
> > > > Hi,
> > > >
> > > > Am Donnerstag, dem 08.04.2021 um 11:12 +0200 schrieb Stefan
> > > > Thomas:
> > > > > Dear gilles,
> > > > > thanks very much for Your reply and Your kind help.
> > > > > I'm using version 2.22.0 now. Unfortunately, with this version,
> > > > > I
> > > > > can't see neither metronome-marks nor time signature nor
> > > > > anything
> > > > > else.
> > > > > I've got this error message:
> > > > > >  error: GUILE signaled an error for the expression beginning
> > > > > > here
> > > > > > #
> > > > > >  (begin
> > > > > >
> > > > >
> > > >
> > > > where did you get 2.22.0 from, do you use the official binaries
> > > > from
> > > > lilypond.org? If you installed LilyPond from your distribution,
> > > > and
> > > > they happen to build with Guile 2.2 already, please file a bug
> > > > with
> > > > them and ask them to move back to Guile 1.8.
> > > >
> > > > Regards
> > > > Jonas
>
>


Re: first trial with arranger.ly

2021-04-10 Thread Stefan Thomas
Dear community,
I've remove lyp and I've also uninstalled and reinstalled lilypond  but the
problem still persists.
Does someone of You know, what I could do now?
Thanks,
Stefan

Am Fr., 9. Apr. 2021 um 17:20 Uhr schrieb Stefan Thomas <
kontrapunktste...@gmail.com>:

> Dear Jonas,
> I've download my lilypond from the lilypond-website, not from my linux
> distro.
> Stefan
>
> Am Do., 8. Apr. 2021 um 15:40 Uhr schrieb Jonas Hahnfeld  >:
>
>> Hi,
>>
>> Am Donnerstag, dem 08.04.2021 um 11:12 +0200 schrieb Stefan Thomas:
>> > Dear gilles,
>> > thanks very much for Your reply and Your kind help.
>> > I'm using version 2.22.0 now. Unfortunately, with this version, I
>> > can't see neither metronome-marks nor time signature nor anything
>> > else.
>> > I've got this error message:
>> > >  error: GUILE signaled an error for the expression beginning here
>> > > #
>> > >  (begin
>> > >
>> >
>>
>> where did you get 2.22.0 from, do you use the official binaries from
>> lilypond.org? If you installed LilyPond from your distribution, and
>> they happen to build with Guile 2.2 already, please file a bug with
>> them and ask them to move back to Guile 1.8.
>>
>> Regards
>> Jonas
>>
>


Re: first trial with arranger.ly

2021-04-09 Thread Stefan Thomas
Dear Jonas,
I've download my lilypond from the lilypond-website, not from my linux
distro.
Stefan

Am Do., 8. Apr. 2021 um 15:40 Uhr schrieb Jonas Hahnfeld :

> Hi,
>
> Am Donnerstag, dem 08.04.2021 um 11:12 +0200 schrieb Stefan Thomas:
> > Dear gilles,
> > thanks very much for Your reply and Your kind help.
> > I'm using version 2.22.0 now. Unfortunately, with this version, I
> > can't see neither metronome-marks nor time signature nor anything
> > else.
> > I've got this error message:
> > >  error: GUILE signaled an error for the expression beginning here
> > > #
> > >  (begin
> > >
> >
>
> where did you get 2.22.0 from, do you use the official binaries from
> lilypond.org? If you installed LilyPond from your distribution, and
> they happen to build with Guile 2.2 already, please file a bug with
> them and ask them to move back to Guile 1.8.
>
> Regards
> Jonas
>


Re: first trial with arranger.ly

2021-04-08 Thread Stefan Thomas
Dear gilles,
thanks very much for Your reply and Your kind help.
I'm using version 2.22.0 now. Unfortunately, with this version, I can't see
neither metronome-marks nor time signature nor anything else.
I've got this error message:

>  error: GUILE signaled an error for the expression beginning here
> #
>  (begin
>
I think, I should wait for an update.
All the best,
Stefan

Am Mi., 7. Apr. 2021 um 02:13 Uhr schrieb Gilles Thibault :

>
> > Before i make a new push
> Push done :
>
> Github
> https://github.com/gilles-th/arranger.ly
>
> Direct access :
> http://gillesth.free.fr/Lilypond/arranger-GIT-copy/arranger.ly.zip
>
> > It seems that in my last push, I've changed the signature of the
> > tempos function ! I don't understand why or how i did that because it
> > is really stupid!
> Well, i understand now. A tempos-ext function has been added instead (it
> takes one more argument). The tempos function works as doc says.
>
> Thank you for reporting the error
>
> --
> Gilles
>


first trial with arranger.ly

2021-04-06 Thread Stefan Thomas
Dear community,
I' ve tried, for the 1st time, arranger.ly.
I copied some code from the Docs. Unfortunately it didn't work as expected.
I could compile the file but I can't see the metronome markings.
Could it be possible that lyp and and arranger.ly exclude each other?
Here' s my file:

> \version "2.20.0"
> \include"arranger.ly"
> global = { s1*1000 }
>  %% a long length is provided
> #(init '())
>
>  %% Instruments list initially empty =>
> %% the positions take into account previous timing insertions.
> %% ( \global is re-analysed each time. )
> #(begin
>  ;; Builds \global
> (rm-with 'global 1 #{ \time 3/4 #} / ;; First, time signatures
> 10 #{ \time 5/8 #} /
> 20 #{ \time 4/4 #})
> (cut-end 'global 70)
>  ;; Cuts what's beyond
> (x-rm 'global #{ \mark\default #}
>  ;; Marks
> 10 20 30 40 50 60)
> (tempos
>  ;; Tempo indications
> 1 (metronome "Allegro" "4" 120) /
> 10 (metronome "" "8" "8") /
> 20 (metronome "Allargando" "4" "4.")
> 30 "Piu mosso"
> 60 (markup #:column ("FINAL"
> (metronome "Allegro vivo" "4" 200
> (rm-with 'global 1 #{ \key c \major #} / ;; Key signatures
> 20 #{ \key c \minor #} /
> 30 #{ \key c \major #})
> (x-rm 'global #{ \bar "||" #} 20 30 60)
>  ;; Bars
> (rm-with 'global 1 #{ \markLengthOn #})
>  ;; Miscellaneous
> (rm 'global 70 #{ \bar "|." #})
>  ;; ...the final touch
> )
>  %% End \global
> %% The list of instruments can now be initialized.
> #(init '(test)) %% List not empty = fixed metric: any new timing event
> will be ignored
> \new Staff { << \global \test >> }
>
While compiling I've got these error messages:

> GNU LilyPond 2.20.0
> Processing `/tmp/lyp/wrappers/arangertest.ly'
> Parsing...
> /home/stefan/partituren/lilytricks/arangertest.ly:10:2: error: GUILE
> signaled an error for the expression beginnin
> g here
> #
> (begin
> Interpreting music...[8][16][24][32][40][48][56][64]
> Preprocessing graphical objects...
> Finding the ideal number of pages...
> Fitting music on 1 page...
> Drawing systems...
> Layout output to `/tmp/lilypond-JkJ8B6'...
> Converting to `arangertest.pdf'...
> Deleting `/tmp/lilypond-JkJ8B6'...
> Wrong type (expecting pair): ()
> fatal error: failed files: "/tmp/lyp/wrappers/arangertest.ly"
>

Thanks for any hint!
Stefan


Re: how to move a clef horizontally

2020-12-25 Thread Stefan Thomas
Dear Thomas and Kieran,
thanks for Your replies.
It seems, that the solution of Thomas works better for me.
I would like to know what

> \once \override PianoStaff.NoteColumn.force-hshift = 1.5
>
does.
Thanks,
Stefan

Am Do., 24. Dez. 2020 um 23:51 Uhr schrieb Thomas Morley <
thomasmorle...@gmail.com>:

> Am Mi., 23. Dez. 2020 um 15:25 Uhr schrieb Stefan Thomas
> :
> >
> > Dear community,
> > I would like to know, how I can avoid the collision between the treble
> clef and the note b in the below quoted example:
> > % SNIP
> > \version "2.20.0"
> > global = { \key e \major \time 4/4 }
> > Up = { \change Staff="upper" \stemDown }
> > Down = { \change Staff="lower" \stemUp }
> > upper = {
> > \clef "bass" \global
> > dis'4   e'4
> >
> >   \clef "treble" gis'4\!
> >   fis'8.   e'16 |
> > }
> > middle = {
> >  a,16
> > dis16  \Up a16b16
> >  \Down   a,16
> >   e16  \Up  a16   b16
> >   \Down  b,16fis16
> >   \Upa16   b16  \Down   b,16
> >dis16\Up a16
> >   b16
> > }
> > lower = {
> > fis,,4   e,4
> >   dis,4b,,4
> > }
> >
> > lower = {
> > \global \clef "bass"
> > << { \middle } \\ { \lower } >>
> > }
> >
> > \score {
> > \new PianoStaff  = "Klavier"  \with { \override
> StaffGrouper.staff-staff-spacing.stretchability = #1 }
> > <<
> > \new Staff= "upper" { \upper }
> >   \new Staff = "lower" { \lower} >>
> > }
> > %%% END SNIPPET
> >
> > Thank You all,
> > Stefan
>
> How about:
>
> \version "2.20.0"
>
> global = { \key e \major \time 4/4 }
>
> Up = { \change Staff = "upper" \stemDown }
> Down = { \change Staff = "lower" \stemUp }
>
> upperVoice = {
>   \clef "bass"
>   \global
>   dis'4 e'4
>   \clef "treble"
>   gis'4
>   fis'8. e'16
> }
>
> middleVoice = {
>   a,16 dis16 \Up a16 b16
>   \Down a,16 e16 \Up a16 b16
>   %% get rid of the warning
>   \once \override Beam.positions = #'(4 . 3)
>   \Down b,16 fis16 \Up a16 b16
>   \Down b,16 dis16 \Up a16 b16
> }
>
> bottomVoice = {
>   fis,,4 e,4
>   %% Move NoteColumns to get some free space
>   %% TODO not sure why we need two overrides with different values
>   \once \override PianoStaff.NoteColumn.X-offset = 2.5
>   \once \override PianoStaff.NoteColumn.force-hshift = 1.5
>   %% Let the Clef glide into the opened free space
>   \once \override PianoStaff.Clef.X-extent = #'(0 . 0)
>   dis,4 b,,4
> }
>
> lowerStaff = {
>   \global
>   \clef "bass"
>   <<  \middleVoice \\ \bottomVoice >>
> }
>
> \score {
>   \new PianoStaff = "Klavier"
> \with { \override StaffGrouper.staff-staff-spacing.stretchability = #1
> }
> <<
> \new Staff = "upper" \upperVoice
> \new Staff = "lower" \lowerStaff
> >>
> }
>
>
> Cheers,
>   Harm
>


how to move a clef horizontally

2020-12-23 Thread Stefan Thomas
Dear community,
I would like to know, how I can avoid the collision between the treble clef
and the note b in the below quoted example:
% SNIP
\version "2.20.0"
global = { \key e \major \time 4/4 }
Up = { \change Staff="upper" \stemDown }
Down = { \change Staff="lower" \stemUp }
upper = {
\clef "bass" \global
dis'4   e'4

  \clef "treble" gis'4\!
  fis'8.   e'16 |
}
middle = {
 a,16
dis16  \Up a16b16
 \Down   a,16
  e16  \Up  a16   b16
  \Down  b,16fis16
  \Upa16   b16  \Down   b,16
   dis16\Up a16
  b16
}
lower = {
fis,,4   e,4
  dis,4b,,4
}

lower = {
\global \clef "bass"
<< { \middle } \\ { \lower } >>
}

\score {
\new PianoStaff  = "Klavier"  \with { \override
StaffGrouper.staff-staff-spacing.stretchability = #1 }
<<
\new Staff= "upper" { \upper }
  \new Staff = "lower" { \lower} >>
}
%%% END SNIPPET

Thank You all,
Stefan


Re: bend before, increase disctance to accidental

2020-12-04 Thread Stefan Thomas
Dear Aaron,
thanks for Your reply.
This works fine for me!

On 2020-12-04 7:10 am, Stefan Thomas wrote:

Dear Thomas,
thanks for Your reply!
Unfortunately the code doesn't work for me, I get the error message:


Processing `/tmp/lyp/wrappers/bendbefore.ly'

Parsing...

Interpreting music...

Preprocessing graphical objects...

Finding the ideal number of pages...

Fitting music on 1 page...

Drawing systems...


Layout output to `/tmp/lilypond-TlFzo5'...: In expression

(rmoveto 12.500042 -2.5 ...):

: Unbound variable: rmoveto


Is Your code written for 2.20.0?

Newer than that, as it fails with 2.20.0. There was a change to
stencil expressions
> that removed an extra level of quoting. For 2.20.0 and earlier, you'll
> need to add that back in:
>
> 
>   (exp (list 'path thickness
>  `(quote
>(rmoveto
>  ,(- left-x self-x) ,(- delta-y)
>  rcurveto
>  ,(/ dx 3) 0
>  ,dx ,(* 0.66 delta-y)
>  ,dx ,delta-y)
> 
>
>
> -- Aaron Hill
>
>
>
>


Re: bend before, increase disctance to accidental

2020-12-04 Thread Stefan Thomas
Dear Thomas,
thanks for Your reply!
Unfortunately the code doesn't work for me, I get the error message:

> Processing `/tmp/lyp/wrappers/bendbefore.ly'
>
> Parsing...
>
> Interpreting music...
>
> Preprocessing graphical objects...
>
> Finding the ideal number of pages...
>
> Fitting music on 1 page...
>
> Drawing systems...
>
> Layout output to `/tmp/lilypond-TlFzo5'...: In expression
> (rmoveto 12.500042 -2.5 ...):
>
> : Unbound variable: rmoveto
>
Is Your code written for 2.20.0?
Thanks,
Stefan

Am Do., 3. Dez. 2020 um 23:13 Uhr schrieb Thomas Morley <
thomasmorle...@gmail.com>:

> Am Mi., 2. Dez. 2020 um 17:10 Uhr schrieb Stefan Thomas
> :
> >
> > Dear community,
> > I found a  working code for a bend-before command. I would like to know,
> how I could increase the distance between the bending-sign and the
> accidental.
> > Thanks for your help.
> > Stefan
> > %% SNIPPPET %
> >   #(define (scp-stencil grob)
> > (ly:stencil-combine-at-edge
> >  (ly:note-head::print grob) 0 -1
> >  (grob-interpret-markup grob
> >   #{
> >  \markup
> >  \with-dimensions-from \null
> >  \path #0.2 #'((moveto -2 -1.8)(curveto -1.2 -1.8 -.5 -1.28 -.3
> -.3))
> >#} ) 0 ))
> >
> >   scp = \once \override NoteHead.stencil = #scp-stencil
> >
> >   {
> > \clef F
> > \key g\major
> > bes4 \scp a g fis
> > \repeat unfold 4 { r8 \scp gis' }
> > \repeat unfold 3 { \scp g'!4 }
> > \scp  g' fis'!
> >   }
> >   %%% END %%
> > (copied from
> https://lists.gnu.org/archive/html/lilypond-user/2020-06/msg0.html )
>
> How about below?
> It uses the logic of BendAfter.stencil in a modified way.
> The argument of \bendBefore is the vertical start relative to the NoteHead.
> The width is determined by left and right bound.
> Both like for \bendAfter.
> Here the _left_ bound is the previous (NonMusical)PaperColumn, _right_
> bound the NoteHead.
> This causes 'minimum-length to be useless, to lengthen the bend-curve
> move the NoteColumn of the target NoteHead.
>
> %% DISCLAIMER
> %% This is a very fast first sketch, don't use it for serious work before
> %% having tested it thoroughly
>
> %% c/p from output-lib.scm and modified
> #(define-public (bend::print-harm spanner)
>   (define (close  a b)
> (< (abs (- a b)) 0.01))
>
>   (let* ((lb (ly:spanner-bound spanner LEFT))
>  (left-col (ly:item-get-column lb))
>  (left-neighbor (ly:grob-object left-col 'left-neighbor)))
> (ly:spanner-set-bound! spanner LEFT left-neighbor)
> (ly:spanner-set-bound! spanner RIGHT lb)
>
> (let* ((delta-y (* 0.5 (ly:grob-property spanner 'delta-position)))
>(left-span left-neighbor)
>(right-span lb)
>(thickness (* (ly:grob-property spanner 'thickness)
>  (ly:output-def-lookup (ly:grob-layout spanner)
>'line-thickness)))
>(padding (ly:grob-property spanner 'padding 0.5))
>(common
>  (ly:grob-common-refpoint
>right-span
>(ly:grob-common-refpoint spanner left-span X)
>X))
>(common-y (ly:grob-common-refpoint spanner left-span Y))
>(minimum-length (ly:grob-property spanner 'minimum-length 0.5))
>(left-x
>  (+ padding
> (interval-end
>   (ly:generic-bound-extent left-span common
>(acc (ly:grob-object right-span 'accidental-grob))
>(right-x
>  (max (- (interval-start
>(if (ly:grob? acc)
>(ly:generic-bound-extent acc common)
>(ly:generic-bound-extent right-span common)))
>  padding)
>   (+ left-x minimum-length)))
>(self-x (ly:grob-relative-coordinate spanner common X))
>(dx (- right-x left-x))
>(exp (list 'path thickness
>   `(rmoveto
> ,(- left-x self-x) ,(- delta-y)
> rcurveto
> ,(/ dx 3) 0
> ,dx ,(* 0.66 delta-y)
> ,dx ,delta-y
>
>   (ly:make-stencil
>exp
>(cons (- left-x self-x) (- right-x self-x))
>(ordered-cons 0 (- delta-y))
>
> bendBefore =
>   -\tweak stencil #bend::print-harm
>   -\bendAfter \etc
>
> %%%

bend before, increase disctance to accidental

2020-12-02 Thread Stefan Thomas
Dear community,
I found a  working code for a bend-before command. I would like to know,
how I could increase the distance between the bending-sign and the
accidental.
Thanks for your help.
Stefan
%% SNIPPPET %
  #(define (scp-stencil grob)
(ly:stencil-combine-at-edge
 (ly:note-head::print grob) 0 -1
 (grob-interpret-markup grob
  #{
 \markup
 \with-dimensions-from \null
 \path #0.2 #'((moveto -2 -1.8)(curveto -1.2 -1.8 -.5 -1.28 -.3
-.3))
   #} ) 0 ))

  scp = \once \override NoteHead.stencil = #scp-stencil

  {
\clef F
\key g\major
bes4 \scp a g fis
\repeat unfold 4 { r8 \scp gis' }
\repeat unfold 3 { \scp g'!4 }
\scp  g' fis'!
  }
  %%% END %%
(copied from
https://lists.gnu.org/archive/html/lilypond-user/2020-06/msg0.html )


Re: how to automatically add ovtaves to some pitches

2020-11-28 Thread Stefan Thomas
Dear Mark,
thanks for Your tip. I have now a working solution.
But I would like to do it in another way, with
whenPitchAbove =
#(define-scheme-function
   (pitch proc)
   (ly:pitch? procedure?)
   (lambda (m)
 (let ((p (ly:music-property m 'pitch)))
   (if (and (ly:pitch? p) (ly:pitch? p1 p2)
(ly:pitch? ly:pitch>  #})))
  #{ \customOutOfRange $low-pitch $high-pitch #octaveBelow $music #}))


%% it works!

music = \relative c' {
  c4 d e f
  g a b c
  d e f g a b c2
}



music =  { \makeOctavesOutOfRange c' c'' \music  }
\new Staff \music
% END OF SNIPPET

Am Sa., 28. Nov. 2020 um 16:02 Uhr schrieb Mark Knoop :

> At 14:53 on 28 Nov 2020, Stefan Thomas wrote:
> > Dear community,
> > I wanted to add an octavation only to specific pitches. I hope that
> > the following snippet shows better what I want. Unfortunately it
> > doesn't work.
> >  SNIPPET
> > \version "2.20.0"
> >
> > % a pitch filter
> > whenPitchAbove =
> > #(define-scheme-function
> > (pitch proc)
> > (ly:pitch? procedure?)
> > (lambda (m)
> > (let ((p (ly:music-property m 'pitch)))
> > (if (and (ly:pitch? p) (ly:pitch > (proc m)
> > m
> > % add octave below
> > okT = #(define-music-function (x) (ly:music?)
> > #{
> > \context Voice <<$x \transpose c' c { $x } >>
> > #})
> >
> > global = {
> > \time 6/8  \clef "treble_8"  }
> > Music =  {
> > \global dis'' fis' a' d'' fis' a' dis'' fis' e'' f'
> > dis'' fis' a' d'' fis' a' dis'' fis' e'' f' }
> >
> > MusicWithOnlySomeOctaves = {
> > \musicMap \whenPitchAbove c''  \okT \Music
> > }
> >  END OF THE SNIPPET %%
>
> Have a look at the \customOutOfRange function in this snippet
>
> http://lsr.di.unimi.it/LSR/Item?id=773
>
> >> At 10:51 on 28 Nov 2020, Stefan Thomas wrote:
> >>>* Dear community,*
> >>>* I would like to add automatically an octabe to certain pitches, e.g.*
> >>>* higher than d''.*
> >>>* I have in mind something like this:*
> >>>* %% SNIPPET*
> >>>* \version "2.18.2"*
> >>>* global = {*
> >>>* \time 6/8  \clef "treble_8"  }*
> >>>* okT = #(define-music-function (x) (ly:music?)*
> >>>*#{*
> >>>*  \context Voice <<$x \transpose c' c { $x } >>*
> >>>*#})*
> >>>* Music =  {*
> >>>* \global dis'' fis' a' d'' fis' a' dis'' fis' e'' f'*
> >>>* dis'' fis' a' d'' fis' a' dis'' fis' e'' f' }*
> >>>* MusicWithOctaves = {*
> >>>* \global \okT dis'' fis' a' d'' fis' a'  \okT dis'' fis' \okT e'' f'*
> >>>* \okT dis'' fis' a' \okT d'' fis' a' \okT dis'' fis' \okT e'' f'*
> >>>* }*
> >>>* %% END SNIPPET*
> >>>* I thought it could be done with musicMap but I can't get it to work.*
> >>>* Has someone a hint for me?*
> >> http://lsr.di.unimi.it/LSR/Item?id=445
> --
> Mark Knoop
>


Re: how to automatically add ovtaves to some pitches

2020-11-28 Thread Stefan Thomas
Dear community,
I wanted to add an octavation only to specific pitches. I hope that the
following snippet shows better what I want. Unfortunately it doesn't work.
 SNIPPET
\version "2.20.0"

% a pitch filter
whenPitchAbove =
#(define-scheme-function
   (pitch proc)
   (ly:pitch? procedure?)
   (lambda (m)
 (let ((p (ly:music-property m 'pitch)))
   (if (and (ly:pitch? p) (ly:pitch>
   #})

global = {
\time 6/8  \clef "treble_8"  }
Music =  {
\global dis'' fis' a' d'' fis' a' dis'' fis' e'' f'
dis'' fis' a' d'' fis' a' dis'' fis' e'' f' }

MusicWithOnlySomeOctaves = {
 \musicMap \whenPitchAbove c''  \okT \Music
}
 END OF THE SNIPPET %%

> At 10:51 on 28 Nov 2020, Stefan Thomas wrote:
> >* Dear community,*
> >* I would like to add automatically an octabe to certain pitches, e.g.*
> >* higher than d''.*
> >* I have in mind something like this:*
> >* %% SNIPPET*
> >* \version "2.18.2"*
> >* global = {*
> >* \time 6/8  \clef "treble_8"  }*
> >* okT = #(define-music-function (x) (ly:music?)*
> >*#{*
> >*  \context Voice <<$x \transpose c' c { $x } >>*
> >*#})*
> >* Music =  {*
> >* \global dis'' fis' a' d'' fis' a' dis'' fis' e'' f'*
> >* dis'' fis' a' d'' fis' a' dis'' fis' e'' f' }*
> >* MusicWithOctaves = {*
> >* \global \okT dis'' fis' a' d'' fis' a'  \okT dis'' fis' \okT e'' f'*
> >* \okT dis'' fis' a' \okT d'' fis' a' \okT dis'' fis' \okT e'' f'*
> >* }*
> >* %% END SNIPPET*
> >* I thought it could be done with musicMap but I can't get it to work.*
> >* Has someone a hint for me?*
> http://lsr.di.unimi.it/LSR/Item?id=445
>
>
> --
> Mark Knoop
>
>


how to automatically add ovtaves to some pitches

2020-11-28 Thread Stefan Thomas
Dear community,
I would like to add automatically an octabe to certain pitches, e.g. higher
than d''.
I have in mind something like this:
%% SNIPPET
\version "2.18.2"
global = {
\time 6/8  \clef "treble_8"  }
okT = #(define-music-function (x) (ly:music?)
   #{
 \context Voice <<$x \transpose c' c { $x } >>
   #})
Music =  {
\global dis'' fis' a' d'' fis' a' dis'' fis' e'' f'
dis'' fis' a' d'' fis' a' dis'' fis' e'' f' }
MusicWithOctaves = {
\global \okT dis'' fis' a' d'' fis' a'  \okT dis'' fis' \okT e'' f'
\okT dis'' fis' a' \okT d'' fis' a' \okT dis'' fis' \okT e'' f'
}
%% END SNIPPET
I thought it could be done with musicMap but I can't get it to work.
Has someone a hint for me?
Thanks,
Stefan


how to avoid collision between ledger lines and beams

2020-11-24 Thread Stefan Thomas
Dear community,
is there a way to avoid the collision between ledger lines and beams in the
following example:
\version "2.20.0"
Music = {
 \time 6/8 \clef "treble_8"
 r8  g''-> gis fis' r ais
}
\new Staff \Music
Could this be done automatically if there are more cases like this?
Thanks for Your help!
Stefan


problem with hacklily

2020-11-01 Thread Stefan Thomas
Dear community,
I wanted to save a file in hacklily (https://www.hacklily.org/).
Unfortunately I can't do this, I always get

> TypeError: e.sent map is not a function.
>
I should mention that I use the firefox browser.
Has someone an idea what could be wrong?
Thanks,
Stefan


Re: Lilypond and Python

2020-11-01 Thread Stefan Thomas
Dear Frederico,
it worked!
I've installed abjad successfully.
Thanks,
Stefan

Am So., 1. Nov. 2020 um 22:55 Uhr schrieb Federico Bruni :

> Il giorno dom 1 nov 2020 alle 17:07, Stefan Thomas
>  ha scritto:
> > many thanks to Your fast reply. But unfortunately it didn't work. It
> > seems to be a python problem:
> > pip install setuptools
> > Collecting setuptools
> >
> > Using cached
> >
> https://files.pythonhosted.org/packages/e1/b7/182161210a13158cd3ccc41ee19aadef54496b74f2817cc147006
> > ec932b4/setuptools-44.1.1-py2.py3-none-any.whl
> > Installing collected packages: setuptools
> > Exception:
> > Traceback (most recent call last):
> >  File
> > "/home/stefan/.local/lib/python2.7/site-packages/pip/basecommand.py",
> > line 215, in main
> >status = self.run(options, args)
> >  File
> >
> "/home/stefan/.local/lib/python2.7/site-packages/pip/commands/install.py",
> > line 342, in run
> >prefix=options.prefix_path,
> >  File
> > "/home/stefan/.local/lib/python2.7/site-packages/pip/req/req_set.py",
> > line 784, in install
> >**kwargs
> >  File
> >
> "/home/stefan/.local/lib/python2.7/site-packages/pip/req/req_install.py",
> > line 851, in install
> >self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
> >  File
> >
> "/home/stefan/.local/lib/python2.7/site-packages/pip/req/req_install.py",
> > line 1064, in move_wheel_files
> >isolated=self.isolated,
> >  File "/home/stefan/.local/lib/python2.7/site-packages/pip/wheel.py",
> > line 345, in move_wheel_files
> >clobber(source, lib_dir, True)
> >  File "/home/stefan/.local/lib/python2.7/site-packages/pip/wheel.py",
> > line 323, in clobber
> >shutil.copyfile(srcfile, destfile)
> >  File "/usr/lib/python2.7/shutil.py", line 97, in copyfile
> >with open(dst, 'wb') as fdst:
> > IOError: [Errno 13] Permission denied:
> > '/usr/local/lib/python2.7/dist-packages/easy_install.py'
> >
>
> You are using pip2 (python2) installed in ~/.local, but you're trying
> to install a py3 wheel.
> pip2 install seems to try to install under /usr/local by default¹, but
> it won't work unless you use sudo.
>
>
> I would try:
>
> pip3 install --user setuptools
>
>
> ¹ pip3 is smarter and doesn't need the --user switch if called as
> regular user, see below:
>
> $ pip -V
> pip 20.2.2 from /usr/lib/python3.9/site-packages/pip (python 3.9)
> $ pip install setuptools
> Defaulting to user installation because normal site-packages is not
> writeable
> Requirement already satisfied: setuptools in
> /usr/lib/python3.9/site-packages (49.1.3)
>
>
>
>
>


Re: Lilypond and Python

2020-11-01 Thread Stefan Thomas
Dear Dave,
many thanks to Your fast reply. But unfortunately it didn't work. It seems
to be a python problem:
pip install setuptools
Collecting setuptools

Using cached
https://files.pythonhosted.org/packages/e1/b7/182161210a13158cd3ccc41ee19aadef54496b74f2817cc147006
ec932b4/setuptools-44.1.1-py2.py3-none-any.whl
Installing collected packages: setuptools
Exception:
Traceback (most recent call last):


 File "/home/stefan/.local/lib/python2.7/site-packages/pip/basecommand.py",
line 215, in main
   status = self.run(options, args)


 File
"/home/stefan/.local/lib/python2.7/site-packages/pip/commands/install.py",
line 342, in run
   prefix=options.prefix_path,


 File "/home/stefan/.local/lib/python2.7/site-packages/pip/req/req_set.py",
line 784, in install
   **kwargs


 File
"/home/stefan/.local/lib/python2.7/site-packages/pip/req/req_install.py",
line 851, in install
   self.move_wheel_files(self.source_dir, root=root, prefix=prefix)

 File
"/home/stefan/.local/lib/python2.7/site-packages/pip/req/req_install.py",
line 1064, in move_wheel_files
   isolated=self.isolated,


 File "/home/stefan/.local/lib/python2.7/site-packages/pip/wheel.py", line
345, in move_wheel_files
   clobber(source, lib_dir, True)


 File "/home/stefan/.local/lib/python2.7/site-packages/pip/wheel.py", line
323, in clobber
   shutil.copyfile(srcfile, destfile)

 File "/usr/lib/python2.7/shutil.py", line 97, in copyfile

   with open(dst, 'wb') as fdst:


IOError: [Errno 13] Permission denied:
'/usr/local/lib/python2.7/dist-packages/easy_install.py'
You are using pip version 9.0.3, however version 20.2.4 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

Am So., 1. Nov. 2020 um 16:51 Uhr schrieb Dave Seidel :

> Hi Stefan,
>
> Ah, sorry, I missed that! Going back and looking at your original post, it
> looks like pip failed to install abjab because it needs the setuptools
> package. Try
>
> pip install setuptools
>
> and if that succeeds then once again try
>
> pip install abjab
>
> More than that I can't really say, as I am not an Abjab user (at least not
> yet) and have not installed it myself.
>
> Best,
> Dave
>
> On Sun, Nov 1, 2020 at 10:22 AM Stefan Thomas 
> wrote:
>
>> Dear Dave,
>> unfortunately I have no idea how I can install abjad. I wasn't able to do
>> it with pip, can I do it in another way?
>>
>> Am So., 1. Nov. 2020 um 15:50 Uhr schrieb Dave Seidel <
>> dave.sei...@gmail.com>:
>>
>>> Hi Stefan,
>>>
>>> I suppose that the root user does not have pip in its path. I advise not
>>> worrying about it -- the older version of pip is fully functional and
>>> should not affect your ability to install and run what you need.
>>>
>>> - Dave
>>>
>>> On Sun, Nov 1, 2020 at 9:38 AM Stefan Thomas <
>>> kontrapunktste...@gmail.com> wrote:
>>>
>>>> Dear Dave,
>>>> thanks for Your soon reply.
>>>> When I type
>>>>
>>>>> sudo pip install --upgrade pip
>>>>>
>>>> I get
>>>>
>>>>> sudo: pip: command not found
>>>>>
>>>> I don't know how to update pip.
>>>> Do You have a hint?
>>>> All the best,
>>>> Stefan
>>>>
>>>>
>>>>
>>>> Am So., 1. Nov. 2020 um 14:15 Uhr schrieb Dave Seidel <
>>>> dave.sei...@gmail.com>:
>>>>
>>>>> Try upgrading pip with sudo (i.e., "sudo pip install --upgrade pip"),
>>>>> though it is not really necessary to run abjab or anything else, which
>>>>> seems to have installed properly.
>>>>>
>>>>> - Dave
>>>>>
>>>>> On Sun, Nov 1, 2020 at 8:01 AM Stefan Thomas <
>>>>> kontrapunktste...@gmail.com> wrote:
>>>>>
>>>>>> Dear community,
>>>>>> I tried to install abjad with
>>>>>> pip install abjad
>>>>>> And I got:
>>>>>>
>>>>>>> Collecting abjad
>>>>>>>  Using cached
>>>>>>> https://files.pythonhosted.org/packages/f7/2f/23b14c7ff2ca1a5728e81fc1b5960374ec444efad43b197dca009
>>>>>>> 53d90cc/Abjad-3.1.tar.gz
>>>>>>> Could not import setuptools which is required to install from a
>>>>>>> source distribution.
>>>>>>> Please install setuptools.
>>>>>>>
>>>>>>>
>>>>>>> You are using pip version 

Re: Lilypond and Python

2020-11-01 Thread Stefan Thomas
Dear Dave,
unfortunately I have no idea how I can install abjad. I wasn't able to do
it with pip, can I do it in another way?

Am So., 1. Nov. 2020 um 15:50 Uhr schrieb Dave Seidel :

> Hi Stefan,
>
> I suppose that the root user does not have pip in its path. I advise not
> worrying about it -- the older version of pip is fully functional and
> should not affect your ability to install and run what you need.
>
> - Dave
>
> On Sun, Nov 1, 2020 at 9:38 AM Stefan Thomas 
> wrote:
>
>> Dear Dave,
>> thanks for Your soon reply.
>> When I type
>>
>>> sudo pip install --upgrade pip
>>>
>> I get
>>
>>> sudo: pip: command not found
>>>
>> I don't know how to update pip.
>> Do You have a hint?
>> All the best,
>> Stefan
>>
>>
>>
>> Am So., 1. Nov. 2020 um 14:15 Uhr schrieb Dave Seidel <
>> dave.sei...@gmail.com>:
>>
>>> Try upgrading pip with sudo (i.e., "sudo pip install --upgrade pip"),
>>> though it is not really necessary to run abjab or anything else, which
>>> seems to have installed properly.
>>>
>>> - Dave
>>>
>>> On Sun, Nov 1, 2020 at 8:01 AM Stefan Thomas <
>>> kontrapunktste...@gmail.com> wrote:
>>>
>>>> Dear community,
>>>> I tried to install abjad with
>>>> pip install abjad
>>>> And I got:
>>>>
>>>>> Collecting abjad
>>>>>  Using cached
>>>>> https://files.pythonhosted.org/packages/f7/2f/23b14c7ff2ca1a5728e81fc1b5960374ec444efad43b197dca009
>>>>> 53d90cc/Abjad-3.1.tar.gz
>>>>> Could not import setuptools which is required to install from a source
>>>>> distribution.
>>>>> Please install setuptools.
>>>>>
>>>>>
>>>>> You are using pip version 9.0.3, however version 20.2.4 is available.
>>>>> You should consider upgrading via the 'pip install --upgrade pip'
>>>>> command.
>>>>>
>>>> And after
>>>>
>>>>> pip install --upgrade pip
>>>>>
>>>> I've got
>>>>
>>>>> Collecting pip
>>>>>  Using cached
>>>>> https://files.pythonhosted.org/packages/cb/28/91f26bd088ce8e22169032100d4260614fc3da435025ff389ef1d
>>>>> 396a433/pip-20.2.4-py2.py3-none-any.whl
>>>>> Installing collected packages: pip
>>>>>  Found existing installation: pip 9.0.3
>>>>>Uninstalling pip-9.0.3:
>>>>>  Successfully uninstalled pip-9.0.3
>>>>>  Rolling back uninstall of pip
>>>>> Exception:
>>>>> Traceback (most recent call last):
>>>>>
>>>>>
>>>>>  File
>>>>> "/home/stefan/.local/lib/python2.7/site-packages/pip/basecommand.py", line
>>>>> 215, in main
>>>>>status = self.run(options, args)
>>>>>
>>>>>
>>>>>  File
>>>>> "/home/stefan/.local/lib/python2.7/site-packages/pip/commands/install.py",
>>>>> line 342, in run
>>>>>prefix=options.prefix_path,
>>>>>
>>>>>
>>>>>  File
>>>>> "/home/stefan/.local/lib/python2.7/site-packages/pip/req/req_set.py", line
>>>>> 784, in install
>>>>>**kwargs
>>>>>
>>>>>
>>>>>  File
>>>>> "/home/stefan/.local/lib/python2.7/site-packages/pip/req/req_install.py",
>>>>> line 851, in install
>>>>>self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
>>>>>
>>>>>  File
>>>>> "/home/stefan/.local/lib/python2.7/site-packages/pip/req/req_install.py",
>>>>> line 1064, in move_wheel_files
>>>>>isolated=self.isolated,
>>>>>
>>>>>
>>>>>  File "/home/stefan/.local/lib/python2.7/site-packages/pip/wheel.py",
>>>>> line 345, in move_wheel_files
>>>>>clobber(source, lib_dir, True)
>>>>>
>>>>>
>>>>>  File "/home/stefan/.local/lib/python2.7/site-packages/pip/wheel.py",
>>>>> line 316, in clobber
>>>>>ensure_dir(destdir)
>>>>>
>>>>>
>>>>>  File
>>>>> "/home/stefan/.local/lib/python2.7/site-packages/pip/utils/__init__.py",
>>>>> line 83, in ensure_dir
>>>>>os.makedirs(path)
>>>>>
>>>>>
>>>>>  File "/usr/lib/python2.7/os.py", line 157, in makedirs
>>>>>
>>>>>mkdir(name, mode)
>>>>>
>>>>>
>>>>> OSError: [Errno 13] Permission denied:
>>>>> '/usr/local/lib/python2.7/dist-packages/pip-20.2.4.dist-info'
>>>>>
>>>>> You are using pip version 9.0.3, however version 20.2.4 is available.
>>>>> You should consider upgrading via the 'pip install --upgrade pip'
>>>>> command.
>>>>>
>>>> What can I do know?
>>>> Thanks for Your help,
>>>> Stefan
>>>>
>>>> Hey Megan,
>>>>>
>>>>> I use a different approach, but have you checked Abjad already?
>>>>> https://abjad.github.io/index.html
>>>>>
>>>>> Cheers
>>>>> Martín.
>>>>>
>>>>> www.martinrinconbotero.com
>>>>> On 31. Oct 2020, 18:51 +0100, Megan Aldrich ,
>>>>> wrote:
>>>>> > Hello,
>>>>> >
>>>>> > Is there a package that would allow me to output in a lilypond
>>>>> format from python? I found something through google searches and it’s
>>>>> poorly documented and hard to use. Is there something that you recommend
>>>>> using?
>>>>> >
>>>>> > Meg
>>>>> > --
>>>>> > Megan Aldrich
>>>>> >
>>>>> > Connecticut College
>>>>>
>>>>
>>>>


Re: Lilypond and Python

2020-11-01 Thread Stefan Thomas
Dear Dave,
thanks for Your soon reply.
When I type

> sudo pip install --upgrade pip
>
I get

> sudo: pip: command not found
>
I don't know how to update pip.
Do You have a hint?
All the best,
Stefan



Am So., 1. Nov. 2020 um 14:15 Uhr schrieb Dave Seidel :

> Try upgrading pip with sudo (i.e., "sudo pip install --upgrade pip"),
> though it is not really necessary to run abjab or anything else, which
> seems to have installed properly.
>
> - Dave
>
> On Sun, Nov 1, 2020 at 8:01 AM Stefan Thomas 
> wrote:
>
>> Dear community,
>> I tried to install abjad with
>> pip install abjad
>> And I got:
>>
>>> Collecting abjad
>>>  Using cached
>>> https://files.pythonhosted.org/packages/f7/2f/23b14c7ff2ca1a5728e81fc1b5960374ec444efad43b197dca009
>>> 53d90cc/Abjad-3.1.tar.gz
>>> Could not import setuptools which is required to install from a source
>>> distribution.
>>> Please install setuptools.
>>>
>>>
>>> You are using pip version 9.0.3, however version 20.2.4 is available.
>>> You should consider upgrading via the 'pip install --upgrade pip'
>>> command.
>>>
>> And after
>>
>>> pip install --upgrade pip
>>>
>> I've got
>>
>>> Collecting pip
>>>  Using cached
>>> https://files.pythonhosted.org/packages/cb/28/91f26bd088ce8e22169032100d4260614fc3da435025ff389ef1d
>>> 396a433/pip-20.2.4-py2.py3-none-any.whl
>>> Installing collected packages: pip
>>>  Found existing installation: pip 9.0.3
>>>Uninstalling pip-9.0.3:
>>>  Successfully uninstalled pip-9.0.3
>>>  Rolling back uninstall of pip
>>> Exception:
>>> Traceback (most recent call last):
>>>
>>>
>>>  File
>>> "/home/stefan/.local/lib/python2.7/site-packages/pip/basecommand.py", line
>>> 215, in main
>>>status = self.run(options, args)
>>>
>>>
>>>  File
>>> "/home/stefan/.local/lib/python2.7/site-packages/pip/commands/install.py",
>>> line 342, in run
>>>prefix=options.prefix_path,
>>>
>>>
>>>  File
>>> "/home/stefan/.local/lib/python2.7/site-packages/pip/req/req_set.py", line
>>> 784, in install
>>>**kwargs
>>>
>>>
>>>  File
>>> "/home/stefan/.local/lib/python2.7/site-packages/pip/req/req_install.py",
>>> line 851, in install
>>>self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
>>>
>>>  File
>>> "/home/stefan/.local/lib/python2.7/site-packages/pip/req/req_install.py",
>>> line 1064, in move_wheel_files
>>>isolated=self.isolated,
>>>
>>>
>>>  File "/home/stefan/.local/lib/python2.7/site-packages/pip/wheel.py",
>>> line 345, in move_wheel_files
>>>clobber(source, lib_dir, True)
>>>
>>>
>>>  File "/home/stefan/.local/lib/python2.7/site-packages/pip/wheel.py",
>>> line 316, in clobber
>>>ensure_dir(destdir)
>>>
>>>
>>>  File
>>> "/home/stefan/.local/lib/python2.7/site-packages/pip/utils/__init__.py",
>>> line 83, in ensure_dir
>>>os.makedirs(path)
>>>
>>>
>>>  File "/usr/lib/python2.7/os.py", line 157, in makedirs
>>>
>>>mkdir(name, mode)
>>>
>>>
>>> OSError: [Errno 13] Permission denied:
>>> '/usr/local/lib/python2.7/dist-packages/pip-20.2.4.dist-info'
>>>
>>> You are using pip version 9.0.3, however version 20.2.4 is available.
>>> You should consider upgrading via the 'pip install --upgrade pip'
>>> command.
>>>
>> What can I do know?
>> Thanks for Your help,
>> Stefan
>>
>> Hey Megan,
>>>
>>> I use a different approach, but have you checked Abjad already?
>>> https://abjad.github.io/index.html
>>>
>>> Cheers
>>> Martín.
>>>
>>> www.martinrinconbotero.com
>>> On 31. Oct 2020, 18:51 +0100, Megan Aldrich ,
>>> wrote:
>>> > Hello,
>>> >
>>> > Is there a package that would allow me to output in a lilypond format
>>> from python? I found something through google searches and it’s poorly
>>> documented and hard to use. Is there something that you recommend using?
>>> >
>>> > Meg
>>> > --
>>> > Megan Aldrich
>>> >
>>> > Connecticut College
>>>
>>
>>


Re: Lilypond and Python

2020-11-01 Thread Stefan Thomas
Dear community,
I tried to install abjad with
pip install abjad
And I got:

> Collecting abjad
>  Using cached
> https://files.pythonhosted.org/packages/f7/2f/23b14c7ff2ca1a5728e81fc1b5960374ec444efad43b197dca009
> 53d90cc/Abjad-3.1.tar.gz
> Could not import setuptools which is required to install from a source
> distribution.
> Please install setuptools.
>
>
> You are using pip version 9.0.3, however version 20.2.4 is available.
> You should consider upgrading via the 'pip install --upgrade pip'
> command.
>
And after

> pip install --upgrade pip
>
I've got

> Collecting pip
>  Using cached
> https://files.pythonhosted.org/packages/cb/28/91f26bd088ce8e22169032100d4260614fc3da435025ff389ef1d
> 396a433/pip-20.2.4-py2.py3-none-any.whl
> Installing collected packages: pip
>  Found existing installation: pip 9.0.3
>Uninstalling pip-9.0.3:
>  Successfully uninstalled pip-9.0.3
>  Rolling back uninstall of pip
> Exception:
> Traceback (most recent call last):
>
>
>  File
> "/home/stefan/.local/lib/python2.7/site-packages/pip/basecommand.py", line
> 215, in main
>status = self.run(options, args)
>
>
>  File
> "/home/stefan/.local/lib/python2.7/site-packages/pip/commands/install.py",
> line 342, in run
>prefix=options.prefix_path,
>
>
>  File
> "/home/stefan/.local/lib/python2.7/site-packages/pip/req/req_set.py", line
> 784, in install
>**kwargs
>
>
>  File
> "/home/stefan/.local/lib/python2.7/site-packages/pip/req/req_install.py",
> line 851, in install
>self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
>
>  File
> "/home/stefan/.local/lib/python2.7/site-packages/pip/req/req_install.py",
> line 1064, in move_wheel_files
>isolated=self.isolated,
>
>
>  File "/home/stefan/.local/lib/python2.7/site-packages/pip/wheel.py", line
> 345, in move_wheel_files
>clobber(source, lib_dir, True)
>
>
>  File "/home/stefan/.local/lib/python2.7/site-packages/pip/wheel.py", line
> 316, in clobber
>ensure_dir(destdir)
>
>
>  File
> "/home/stefan/.local/lib/python2.7/site-packages/pip/utils/__init__.py",
> line 83, in ensure_dir
>os.makedirs(path)
>
>
>  File "/usr/lib/python2.7/os.py", line 157, in makedirs
>
>mkdir(name, mode)
>
>
> OSError: [Errno 13] Permission denied:
> '/usr/local/lib/python2.7/dist-packages/pip-20.2.4.dist-info'
>
> You are using pip version 9.0.3, however version 20.2.4 is available.
> You should consider upgrading via the 'pip install --upgrade pip' command.
>
What can I do know?
Thanks for Your help,
Stefan

Hey Megan,
>
> I use a different approach, but have you checked Abjad already?
> https://abjad.github.io/index.html
>
> Cheers
> Martín.
>
> www.martinrinconbotero.com
> On 31. Oct 2020, 18:51 +0100, Megan Aldrich ,
> wrote:
> > Hello,
> >
> > Is there a package that would allow me to output in a lilypond format
> from python? I found something through google searches and it’s poorly
> documented and hard to use. Is there something that you recommend using?
> >
> > Meg
> > --
> > Megan Aldrich
> >
> > Connecticut College
>


Re: trying to define microtonal note names and accidentals

2020-10-21 Thread Stefan Thomas
Dear Jean,
thanks for Your reply. Your code seems to work for me.
I have to do define some more pitch and and accidental names, off course.
The overrides of the x- and y-extent seem to be necessary to have more
space for the accidentals.


Am Mi., 21. Okt. 2020 um 13:28 Uhr schrieb Jean Abou Samra <
j...@abou-samra.fr>:

> Hello,
> Le 21/10/2020 à 12:43, Stefan Thomas a écrit :
>
> Dear community,
>
> I'm trying to define microtonal note names and accidentals with the
> HE-font.
>
> Unfortunately, I get the following error message when I compile the below
> quoted file:
>
>> error: wrong type for argument 2.  Expecting
>> music, found "c"
>> Music = \relative
>>  c' {ch2 cl }
>> /home/stefan/partituren/vorlagen/snippet_stefansMikrotoene.ly:65:20:
>> error: syntax error, unexpected '''
>> Music = \relative c
>>   ' {ch2 cl }
>> /home/stefan/partituren/vorlagen/snippet_stefansMikrotoene.ly:65:23:
>> error: not a note name: ch
>> Music = \relative c' {
>>  ch2 cl }
>> /home/stefan/partituren/vorlagen/snippet_stefansMikrotoene.ly:65:27:
>> error: not a note name: cl
>> Music = \relative c' {ch2
>>  cl }
>>
> Does someone know how I can get it  working?
> Here is my file:
>
> % SNIPPET
> \version "2.20.0"
> % Define tunings:
> \paper{
> #(define fonts (make-pango-font-tree "Century Schoolbook L"
>   "HE"
>   "Bitstream Vera Sans Mono"
>  1))
> }
>
> #(define-public SyntoHigherNatural 1/12)
> #(define-public SyntoLowerNatural -1/12)
>
> StefansPitchnames = #'(
>
>
> You should have a quasiquote here.
>
>  (ch . ,(ly:make-pitch -1 0 SyntoHigherNatural))
>   (cl . ,(ly:make-pitch -1 0 SyntoLowerNatural))
> )
>
> pitchnames = \StefansPitchnames
> #(ly:parser-set-note-names pitchnames)
>
>
> Here is the main problem. You are redefining the whole note names alist,
> so LilyPond doesn't know about the c pitch anymore, which causes the error
> at \relative.
>
> Thus, this should read:
>
>
> StefansPitchnames = #`(
>  (ch . ,(ly:make-pitch -1 0 SyntoHigherNatural))
>   (cl . ,(ly:make-pitch -1 0 SyntoLowerNatural))
> )
>
> pitchnames = #(append StefansPitchnames (assoc-get 'nederlands
> language-pitch-names))
> #(ly:parser-set-note-names pitchnames)
>
>
> I can't comment on the font problem. At least this gives a start (the file
> compiles and shows special accidentals). By the way, just out of curiosity,
> why do you have overrides to X-extent, Y-extent and the skylines?
>
> Best,
> Jean
>
> Full code:
>
> %
> \version "2.20.0"
> % Define tunings:
> \paper {
> #(define fonts (make-pango-font-tree "Century Schoolbook L"
>  "HE"
>   "Bitstream Vera Sans Mono"
>  1))
> }
>
> #(define SyntoHigherNatural 1/12)
> #(define SyntoLowerNatural -1/12)
>
> StefansPitchnames = #`(
>  (ch . ,(ly:make-pitch -1 0 SyntoHigherNatural))
>   (cl . ,(ly:make-pitch -1 0 SyntoLowerNatural))
> )
>
> pitchnames = #(append StefansPitchnames (assoc-get 'nederlands
> language-pitch-names))
> #(ly:parser-set-note-names pitchnames)
>
> FONTNAME = "HE"
> SyntoHigherNatural = "o"
> SyntoLowerNatural = "m"
>
> StefansStrings = #`(
> (1/12 . ,SyntoHigherNatural)
> (-1/12 . ,SyntoLowerNatural)
> )
>
>
> #(define (my-Y-extent grob)
>   (ly:stencil-extent (ly:text-interface::print grob) Y))
>
> \layout {
>   \context {
> \Score
>
> \override Accidental.stencil = #ly:text-interface::print
> \override Accidental.font-name = #FONTNAME
> \override Accidental.text = #(lambda (grob)
>(cdr (assoc (ly:grob-property grob
> 'alteration)
>   StefansStrings)))
> \override Accidental.font-size = #-1
> \override Accidental.X-extent = #(lambda (grob)
>(ly:stencil-extent
>  (ly:text-interface::print grob)
> X))
> \override Accidental.Y-extent = #(ly:make-unpure-pure-container
>my-Y-extent
>(lambda (grob start end)
> (my-Y-extent grob)))
>
> \override Accidental.horizontal-skylines = #'()
> \override Accidental.vertical-skylines = #'()
>   }
> }
>
> Music = \relative c' { ch2 cl }
> \new Staff \Music
>


trying to define microtonal note names and accidentals

2020-10-21 Thread Stefan Thomas
Dear community,
I'm trying to define microtonal note names and accidentals with the HE-font.
Unfortunately, I get the following error message when I compile the below
quoted file:

> error: wrong type for argument 2.  Expecting
> music, found "c"
> Music = \relative
>  c' {ch2 cl }
> /home/stefan/partituren/vorlagen/snippet_stefansMikrotoene.ly:65:20:
> error: syntax error, unexpected '''
> Music = \relative c
>   ' {ch2 cl }
> /home/stefan/partituren/vorlagen/snippet_stefansMikrotoene.ly:65:23:
> error: not a note name: ch
> Music = \relative c' {
>  ch2 cl }
> /home/stefan/partituren/vorlagen/snippet_stefansMikrotoene.ly:65:27:
> error: not a note name: cl
> Music = \relative c' {ch2
>  cl }
>
Does someone know how I can get it  working?
Here is my file:
% SNIPPET
\version "2.20.0"
% Define tunings:
\paper{
#(define fonts (make-pango-font-tree "Century Schoolbook L"
  "HE"
  "Bitstream Vera Sans Mono"
 1))
}

#(define-public SyntoHigherNatural 1/12)
#(define-public SyntoLowerNatural -1/12)

StefansPitchnames = #'(
 (ch . ,(ly:make-pitch -1 0 SyntoHigherNatural))
  (cl . ,(ly:make-pitch -1 0 SyntoLowerNatural))
)

pitchnames = \StefansPitchnames
#(ly:parser-set-note-names pitchnames)
FONTNAME = "HE"
SyntoHigherNatural = "o"
SyntoLowerNatural = "m"

StefansStrings = #`(
(1/12 . ,SyntoHigherNatural)
(-1/12 . ,SyntoLowerNatural)
)


#(define (my-Y-extent grob)
  (ly:stencil-extent (ly:text-interface::print grob) Y))

\layout {
  \context {
\Score

\override Accidental.stencil = #ly:text-interface::print
\override Accidental.font-name = #FONTNAME
\override Accidental.text = #(lambda (grob)
   (cdr (assoc (ly:grob-property grob
'alteration)
  StefansStrings)))
\override Accidental.font-size = #-1
\override Accidental.X-extent = #(lambda (grob)
   (ly:stencil-extent
 (ly:text-interface::print grob) X))
\override Accidental.Y-extent = #(ly:make-unpure-pure-container
   my-Y-extent
   (lambda (grob start end)
(my-Y-extent grob)))

\override Accidental.horizontal-skylines = #'()
\override Accidental.vertical-skylines = #'()
  }
}

Music = \relative c' {ch2 cl }
\new Staff \Music
 SNIPPET END


trying to install microlily

2020-10-20 Thread Stefan Thomas
Dear community,
I've recently tried to install microlily with the command

>  lyp install microlily
>
Unfortunately I've got the message:

> Cloning https://github.com/lyp-packages/microlily.git...
> Installing microlily@0.1.0
> Could not find include file reference join-path specified in
> /home/stefan/.lyp/packages/microlily@0.1.0/package.ly:3:
>
>   "athenian"= \pincludeOnce #(lyp:join-path microlily-dir "athenian.ly
> ")
>
Can someone give me a hint, what I could do?
Thanks,
Stefan


how to include a path in lyp

2020-09-28 Thread Stefan Thomas
Dear community,
I've recently and successfully installed lyp, which seems to be a great
thing.
When I use the lilypond command, I normally use a bash alias, that allows
my to automatically include a folder, in which I have some templates.
I would like to integrate this path in lyp, but I've no idea how to do that.

here a short snippet:
\version "2.20.0"
melodie = \relative c' { c4 d e2 }
text = \lyricmode {do re mi }
\include"lied.ly"
And the file "lied.ly" looks like this:
\version "2.20.0"

 \score {
<<
   \new Voice = "eins" { \autoBeamOff \melodie }
   \new Lyrics \lyricsto "eins" \text
>>
 }

My bash-alias is:
alias engrave='export LANG=en_US; lilypond -I
/home/stefan/partituren/vorlagen/ '

Thanks for Your help!
Stefan


Re: filter out pitches higher/ or lower than a certain pitch

2020-09-24 Thread Stefan Thomas
Dear Aaron,
this is really great!
I defenitely have to learn scheme!


\version "2.20.0"

addArticulation =
#(define-scheme-function
  (direction articulation)
  ((number? #f) string?)
  (lambda (m)
(if (music-is-of-type? m 'note-event)
  (ly:music-set-property! m 'articulations
(cons
  (let ((a (make-music 'ArticulationEvent
   'articulation-type articulation)))
(if (number? direction)
  (ly:music-set-property! a 'direction direction))
a)
  (ly:music-property m 'articulations
m))

whenPitchAbove =
#(define-scheme-function
  (pitch proc)
  (ly:pitch? procedure?)
  (lambda (m)
(let ((p (ly:music-property m 'pitch)))
  (if (and (ly:pitch? p) (ly:pitch4. }



On 2020-09-24 5:23 am, Stefan Thomas wrote:

Dear community,

I would like to achieve , in a certain example, that all pitches will get

automatically an accent sign.
Like this:
Music = { \time 6/8 g 8  r a g c'-> r g d'-> r g e'-> r  }
MusikwithAccents  = { \time 6/8 g 8  r a g c->' r g d'-> r d e'-> r }
Can this be done with  lilypond?
Has someone an idea, how this can be implemented?

Here is one approach of conditionally attaching articulations to notes based
on their pitch:


filter out pitches higher/ or lower than a certain pitch

2020-09-24 Thread Stefan Thomas
Dear community,
I would like to achieve , in a certain example, that all pitches will get
automatically an accent sign.
Like this:
Music = { \time 6/8 g 8  r a g c'-> r g d'-> r g e'-> r  }
MusikwithAccents  = { \time 6/8 g 8  r a g c->' r g d'-> r d e'-> r }
Can this be done with  lilypond?
Has someone an idea, how this can be implemented?
Thanks,
Stefan


Re:

2020-09-17 Thread Stefan Thomas
Dear Lukas,
thanks for Your reply.
The file You've sent to me works exactly as I want it!
Many thanks!
The original code by Rune Zedeler, can be found here:
https://lists.gnu.org/archive/html/lilypond-user/2007-12/msg00136.html

Am Do., 17. Sept. 2020 um 11:30 Uhr schrieb Lukas-Fabian Moser :

> Hi Stefan,
> Am 17.09.20 um 10:02 schrieb Stefan Thomas:
>
> Dear community,
> the following code is very old, written by Rune Zedeler, but it is very
> useful.
> It allows You define a motive like:
> \motiv #'Stefan {c'8 d' c' d' e2}
> and later it can be used like this:
> \Stefan {e f g }
> and You will get
> {e8 f e f g2 }
> it can save a lot of typing.
> Unfortunately it doesn't seem to work with lilypond 2.20.0
> Has someone an idea, how I can get it working with lilypond 2.20.0?
> Thanks in advance for any hint!
> Here is the definition, that works with 2.18.2.:
>
> [...]
>
> Please make sure that you give complete and correct descriptions of the
> problem:
>
> - First, it's easier to help you (and most people are, with good reasons,
> only willing to do so) if you provide _complete_ files. It's a good idea to
> test compiling them immediately before sending your mail :-).
>
> - Second, please make sure your claims are correct: Combining your "motiv"
> definition with your usage examples \motiv #'Stefan ... and \Stefan { e f g
> } gives a file that works neither with 2.18.2 nor with a current version of
> LilyPond. (One reason it can't work with 2.18.2 is that somebody already
> removed half of the then mandatory "parser" and "location" arguments, so I
> suspect you already tried convert-ly.)
>
> Now for the actual problem: The \motiv function turns _pitches_ (in the
> given rhythmical motif) into "indices" into a list of pitches you provide.
> In doing so, c' is taken to mean "first pitch", "d'" means "second pitch",
> and so on. So the problem lies in your definition of
>
> \motiv #'Stefan {c'8 d' c' d' e2}
>
> where "e" means "-5th pitch" (count downwards from c'!) Nobody knows what
> the -5th pitch in a list might be :-).
>
> Find attached a version working in current LilyPond. The only things I
> changed in the definition of \motiv are the omission of parser/location
> (not needed anymore) and reformatting.
>
> Lukas
>


[no subject]

2020-09-17 Thread Stefan Thomas
Dear community,
the following code is very old, written by Rune Zedeler, but it is very
useful.
It allows You define a motive like:
\motiv #'Stefan {c'8 d' c' d' e2}
and later it can be used like this:
\Stefan {e f g }
and You will get
{e8 f e f g2 }
it can save a lot of typing.
Unfortunately it doesn't seem to work with lilypond 2.20.0
Has someone an idea, how I can get it working with lilypond 2.20.0?
Thanks in advance for any hint!
Here is the definition, that works with 2.18.2.:
motiv =
#(define-music-function (name pattern)
  (symbol? ly:music?)
  (letrec ((trans-rec
   (lambda (pitches)
(lambda (music)
 (let* ((es (ly:music-property music 'elements))
(e (ly:music-property music 'element))
(p (ly:music-property music 'pitch)))

  (if (pair? es)
(ly:music-set-property!
music 'elements
(map (trans-rec pitches) es)))

  (if (ly:music? e)
(ly:music-set-property!
music 'element
((trans-rec pitches) e)))

  (if (ly:pitch? p)
(let* ((o (ly:pitch-octave p))
  (n (ly:pitch-notename p))
  (i (+ (* 7 o) n))
  (pes (ly:music-property (list-ref pitches i) 'elements))
  (pnew (ly:music-property (car pes) 'pitch))
)
(ly:music-set-property! music 'pitch pnew)
  ))
  music)
   (primitive-eval
`(define ,name
  (define-music-function (parserb locationb pitchseq)
   (ly:music?)
   (let* ((pitches (ly:music-property pitchseq 'elements))
 (n   (ly:music-property pitchseq 'name)))
(if (not (equal? n 'SequentialMusic))
(ly:warning "2nd arg of transform must be SequentialMusic, got ~a" n)
((,trans-rec (map event-chord-wrap! pitches))
  (ly:music-deep-copy ,pattern)))
   (make-music 'SequentialMusic 'void #t)))


Re: how to encircle a note

2020-05-19 Thread Stefan Thomas
Dear Aaron,
thanks for your help. It's exactly what I was looking for!

>
> On 2020-05-16 10:49 am, Stefan Thomas wrote:

Dear community,
is it possible to encircle a note in lilypond?
And could someone give a short example of code for this?

http://lsr.di.unimi.it/LSR/Item?id=722

Including the stem, accidentals, or any articulations would require more work
as you have to consider the bounds and positions of multiple grobs.

-- Aaron Hill



--


how to encircle a note

2020-05-16 Thread Stefan Thomas
Dear community,
is it possible to encircle a note in lilypond?
And could someone give a short example of code for this?
Thank You,
Stefan


Re: lilybin

2020-05-03 Thread Stefan Thomas
Dear Kevin, Yes, it worked.
Can I share documents online with lilypond?

Am So., 3. Mai 2020 um 18:35 Uhr schrieb Kevin Barry :

> Hi Stefan,
>
> I was able to find the broken link in our unstable documentation
> version. It looks like it's a bug arising from a switch to https (this
> link was probably changed unintentionally). If you use http then it
> should work.
>
> Kevin
>
>
> On Sun, May 03, 2020 at 06:23:00PM +0200, Stefan Thomas wrote:
> > I found the link https://lilybin.com/ which does not work.
> >
> >
> > Am So., 3. Mai 2020 um 18:16 Uhr schrieb Kevin Barry  >:
> >
> > > Hi Stefan,
> > >
> > > Where did you find a broken link? On the page
> > > http://lilypond.org/doc/v2.20/Documentation/web/easier-editing.en.html
> > > the link is http://lilybin.com/ and that works for me.
> > >
> > > Kevin
> > >
> > > On Sun, May 03, 2020 at 06:12:22PM +0200, Stefan Thomas wrote:
> > > > Dear community,
> > > > at your website You mention lilybin, but the link is broken.
> > > > By the way: are there other website, which allow to work with
> lilypond
> > > and
> > > > maybee also to share scores?
> > > > Thanks for Your help,
> > > > Stefan
> > >
>


Re: lilybin

2020-05-03 Thread Stefan Thomas
I found the link https://lilybin.com/ which does not work.


Am So., 3. Mai 2020 um 18:16 Uhr schrieb Kevin Barry :

> Hi Stefan,
>
> Where did you find a broken link? On the page
> http://lilypond.org/doc/v2.20/Documentation/web/easier-editing.en.html
> the link is http://lilybin.com/ and that works for me.
>
> Kevin
>
> On Sun, May 03, 2020 at 06:12:22PM +0200, Stefan Thomas wrote:
> > Dear community,
> > at your website You mention lilybin, but the link is broken.
> > By the way: are there other website, which allow to work with lilypond
> and
> > maybee also to share scores?
> > Thanks for Your help,
> > Stefan
>


lilybin

2020-05-03 Thread Stefan Thomas
Dear community,
at your website You mention lilybin, but the link is broken.
By the way: are there other website, which allow to work with lilypond and
maybee also to share scores?
Thanks for Your help,
Stefan


Re: eartraining with lilypond?

2020-04-19 Thread Stefan Thomas
Dear Roland,
thanks for Your link, You did really good work and I guess it would be
worth to develop it. But off course it's lot of work, I think I could't do
it.

Am Fr., 17. Apr. 2020 um 03:01 Uhr schrieb Roland Goretzki <
rol...@roland-goretzki.de>:

> Hello Stefan & all,
>
> You wrote:
> > has someone experiences and/or ideas for using lilypond for
> > eartraining-purposes?
> > [ ... ]
> > Are there other projects/ideas around?
>
> well, while NOT being a programmer, nevertheless I created a little
> web-based cgi-program especially for training note-reading, and it
> contains also a part for training absolute hearing.
>
> It's all related to a piano-graphic, on which You can click the
> random-created note You've read btw. heared, and it will give a
> feedback, if it was wrong or write.
>
> One can chose different difficulties.
>
> The note-reading part contains also some interval-training parts.
>
> What does it have to do with lilypond?
> Well, the note symbols I've used are created by lilypond. :-)
>
> I made it in 2010 (3 month) and 2012 (2 month), and it's missing a
> chord-training part, but I won't continue this program, and due to not
> being a programmer, the code is nearly unreadable (perhaps meanwhile
> also for me).
>
> So You can only use it as is.
>
> The good thing is:
> There is no costs, no "Werbung", no cookies and so on, the only thing
> you have to create is an own two-part user name and an own passwort at
> the first session, for getting a later feedback about your progress in
> following sessions.
>
> To get the site, you cannot only type
>
> http://www.roland-goretzki.de
>
> because this website I've closed several years ago. But you can get it
> by typing the direct URL:
>
> http://www.roland-goretzki.de/cgi-bin/lernspiel.cgi
>
> There You will be asked a user name, it is:
> roland
> And You will be asked a password, it is:
> benjamin
>
> After this you get directly into the program, where You have to create
> your own user name and password as mentioned above. The rest ist mostly
> self-declaring, I think.
>
> For potential further questions in detail I would prefer the German
> language, because I'm no English native speaker, and I assume, You are a
> german, don't You?
>
> For all English speakers:
> The program is only in German language, I'm sorry.
>
> Best Regards   Roland
>
> PS:
> Don't know why I didn't share it in the past - perhaps simply forgotten
> OR due to the language and the necessary declaration? ;-)
>


eartraining with lilypond?

2020-04-16 Thread Stefan Thomas
Dear community,
has someone experiences and/or ideas for using lilypond for
eartraining-purposes?
I know, there is gnu-solfege, but it has the disadvantage, that it doesn't
exist as an app or can be used browser based.
Are there other projects/ideas around?
Thanks,
Stefan


how to get y-extent for tuplet number

2018-08-22 Thread Stefan Thomas
Dear community,
I have a problem with the spacing between the piano staff for the left hand
and the violin staff.
I would like to increase the distance.
Off course, I could do it generally, but I would like to do it for just a
few measures.
I tried it by changing the minimun-Y-extent for tupletnumber and tuplet
bracket, but this didn't work.
Is there another way to get the desired output?
Thanks for Your help!
Stefan
 % SNUPPET
\version "2.18.2"
% \include"bibliotheken.ly"
% definitions
\include"deutsch.ly"
re = { \change Staff = rechts }
li = { \change Staff = links }

rokt = #(define-music-function (parser location x) (ly:music?)
 #{ \re
\context Voice <<$x \transpose c c' { $x } >>
 #})
lokt = #(define-music-function (parser location x) (ly:music?)
 #{ \li
\context Voice <<$x \transpose c c, { $x } >>
 #})

rechts = { \ottava #2
 \tupletSpan 4 \tuplet 5/4 { \rokt h'''16 \lokt  as'''8 g'''  fis'''16
\rokt b''' \li a'''  \rokt as'''8
 \lokt  f'''16
   \rokt b'''4 \rokt h'''16 \li fis''' g''' \rokt b''' \li a''' }
}

links = {  \ottava #1 s1 }
Violin = { \ottava #1 h'''8( as'''8  g''' b''' a''' as''' f''' h''' )}
\score {
<<
\new PianoStaff  = "Klavier"
<<
\new Staff= "rechts" { \rechts }
   \new Staff = "links" { \links} >>

\new Staff \Violin
>>
}
% ENDE SNIPPET
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: how to whiteout an ottava bracket

2018-08-21 Thread Stefan Thomas
Dear Pierre,
thanks for Your answer. Can I also achieve  the opposite? Can the stem
whiteout the ottava-bracket?

Am Di., 21. Aug. 2018 um 18:31 Uhr schrieb Pierre Perol-Schneider <
pierre.schneider.pa...@gmail.com>:

> Hi Stefan,
>
> How about:
>
> \version "2.18.2"
> rD = { \change Staff = right \stemDown }
> lU = { \change Staff = left \stemUp }
> right = \relative b {
>   \ottava 2 b8 \lU a, \rD b' \lU g, \rD b' \lU f, \rD b' \lU e,,
> }
> left = {
>   \override Staff.OttavaBracket.layer = #2
>   \ottava #1
>   \set Staff.ottavation = \markup{ \whiteout \pad-markup #0.2 "8va" }
>   $(skip-of-length right)
> }
> \score {
> \new PianoStaff
> <<
> \new Staff= "right" { \right }
>    \new Staff = "left" { \left} >>
> }
>
> Cheers,
> Pierre
>
> Le mar. 21 août 2018 à 18:03, Stefan Thomas 
> a écrit :
>
>> Dear community,
>> I tried to whiteout an ottava bracket, but without success. Does someone
>> know, how to do this?
>>
>>> Thanks for Your help!
>>>
>> \version "2.18.2"
>> rD = { \change Staff = right \stemDown }
>> lU = { \change Staff = left \stemUp }
>> right = \relative b {
>>   \override Stem.whiteout = ##t
>>   \override Stem.layer = #-1
>>   \ottava 2 b8 \lU a, \rD b' \lU g, \rD b' \lU f, \rD b' \lU e,,
>> }
>> left = {
>>   \override Staff.OttavaBracket.layer = #-2
>>   \ottava #1 $(skip-of-length right)  }
>> \score {
>> \new PianoStaff
>> <<
>> \new Staff= "right" { \right }
>>\new Staff = "left" { \left} >>
>> }
>>
>>
>>
>> ___
>> 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


how to whiteout an ottava bracket

2018-08-21 Thread Stefan Thomas
Dear community,
I tried to whiteout an ottava bracket, but without success. Does someone
know, how to do this?

> Thanks for Your help!
>
\version "2.18.2"
rD = { \change Staff = right \stemDown }
lU = { \change Staff = left \stemUp }
right = \relative b {
  \override Stem.whiteout = ##t
  \override Stem.layer = #-1
  \ottava 2 b8 \lU a, \rD b' \lU g, \rD b' \lU f, \rD b' \lU e,,
}
left = {
  \override Staff.OttavaBracket.layer = #-2
  \ottava #1 $(skip-of-length right)  }
\score {
\new PianoStaff
<<
\new Staff= "right" { \right }
   \new Staff = "left" { \left} >>
}
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: problem with articulation, when using ekmelily

2018-08-21 Thread Stefan Thomas
Dear Thomas,
many thanks for Your reply.
The command \override Staff.AccidentalPlacement.right-padding = 0.25 does
the right thing for me now!

Am Di., 21. Aug. 2018 um 13:42 Uhr schrieb Thomas Morley <
thomasmorle...@gmail.com>:

> 2018-08-21 10:17 GMT+02:00 Stefan Thomas :
> > Dear community,
> > I have a problem with the placement of accents in the following example.
>
> The accent is pushed upwards?
>
> > I know it has to do with the layout-block of ekmel.ily, but I don't know,
> > how to restore the normal behavior.
> > Here is my example:
> >>
> >> \version "2.18.2"
> >> \include"ekmel.ily"
> >> Music = {\tuplet 5/4 { as''16 ->  \mf f''8 as'' ->  }  \tuplet 5/4 {
> >> f''16 g''8 r }  r2 }
> >> \score { \new Staff { \Music } }
> >
> > The file ekel.ily can be found at
> > http://www.ekmelic-music.org/software/ekmelily-1.10.zip
> > Thanks for Your help!
> > Stefan
>
> It's probably because the Ekmelos-accidentals are wider than the default.
> In your example stencil-extent in X-axis is (0.0 . 1.05844251968504)
> Wile default would be (-0.12001 . 0.84)
> Though, I'm not a font expert, can't say more...
>
> Additionally the ekmel-accidentals extents are boxes, whereas with the
> default accidentals skylines are more tight, see attached png
> Not sure how to get this right.
>
> Nevertheless your example can be fixed with
> \override Staff.AccidentalPlacement.right-padding = 0.25
> default is 0.15
>
> Some other remarks:
>
> (1)
> You likely know it does not compile with recent 2.19.xx versions,
> because the `parser`-argument is unnecessary in 2.19. for
> `ly:parser-set-note-names` and `ly:parser-include-string`
>
> (2)
> Since guile-2.2.3 the construct
> (if (not (defined? ...)
> (define ... ...))
> returns an error:
> "definition in expression context, where definitions are not allowed,"
>
> Instead one could do:
> (module-define! (current-module) ... ...)
> or
> (ly:parser-define! ... ...)
>
> Not sure what we should recommend.
>
> Ofcourse (2) can be ignored as long as you don't try to compile
> lilypond yourself with this guile-version.
>
>
> Cheers,
>   Harm
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


problem with articulation, when using ekmelily

2018-08-21 Thread Stefan Thomas
Dear community,
I have a problem with the placement of accents in the following example.
I know it has to do with the layout-block of ekmel.ily, but I don't know,
how to restore the normal behavior.
Here is my example:

> \version "2.18.2"
> \include"ekmel.ily"
> Music = {\tuplet 5/4 { as''16 ->  \mf f''8 as'' ->  }  \tuplet 5/4 {
> f''16 g''8 r }  r2 }
> \score { \new Staff { \Music } }
>
The file ekel.ily can be found at
http://www.ekmelic-music.org/software/ekmelily-1.10.zip
Thanks for Your help!
Stefan
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


trying to create a function with different pitches and different rhythms

2018-06-23 Thread Stefan Thomas
Dear community,
I want to create a function, which adds automatically a crescendo from ppp
to pp to two tied pitches with different durations.
What  I dont understand:
I can create a function with the same pitch and different durations, I can
also create a function with diferent pitches and same durations, but if
both are choosen freely, I can't do it. Can someon give me a hint, whats
wrong with the code?

\version "2.18.2"

\layout {  \context { \Voice \override Hairpin.minimum-length = #10 }  }

%different durations, different  pitches, this doesn't work, why?
fadeIn = #(define-music-function (parser location PITCH durA durB)
(ly:pitch?  ly:duration? ly:duration?)
 #{
 $PITCH  $durA  \<\ppp ~  $PITCH $durB \pp
   #})
\new Staff { \fadeIn c' 4 2. }

%different durations, same pitch, works fine
 playC = #(define-music-function (parser location durA durB) (ly:duration?
ly:duration?)
   #{
 c'  $durA  \<\ppp ~ c' $durB \pp
   #})
   \new Staff  { \playC  2 2  \playC 4 2. }

%different pitches, same durations, works also fine

 playsameRhDiffPitch = #(define-music-function (parser location PITCH )
(ly:pitch?)
   #{
 $PITCH 4 \<\ppp ~  $PITCH 2. \pp  #} )
\new Staff { \playsameRhDiffPitch c'  \playsameRhDiffPitch g' }
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: how to created related tempo marks

2018-06-19 Thread Stefan Thomas
Dear Simon,
thanks for Your answer. Your solution is what I hat in mind!

2018-06-09 20:32 GMT+02:00 Simon Albrecht :

> On 09.06.2018 12:44, Stefan Thomas wrote:
>
>> I would like to create related tempo marks. For example, in bar 1 I would
>> like to have a tempo 4=60, some bars later tempo 4=90.
>> The tempi are in the proportion 3/2. I would like to write something like
>>
>> TempoA = {\tempo 4 =60}
>> TempoB = \TempoA*1.5
>>
>> I want to create a midi-file with metronome clicks of a piece with many
>> time signature and tempo changes and I want to practise with this file. I
>> want to be able to practise in different tempi and I don't want to retype
>> all the tempo changes again and again.
>> Is it possible to define tempo-relations in scheme?
>>
>
> Hi Stefan,
> how about this?
>
> %%
> bpmA = 60
>
> {
>   \tempo 4 = \bpmA
>   c'1
>   \tempo 4 = #(* 3/2 bpmA)
>   c'
> }
> %%
>
> Best, Simon
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


how to created related tempo marks

2018-06-09 Thread Stefan Thomas
Dear community,
I would like to create related tempo marks. For example, in bar 1 I would
like to have a tempo 4=60, some bars later tempo 4=90.
The tempi are in the proportion 3/2. I would like to write something like

> TempoA = {\tempo 4 =60}
> TempoB = \TempoA*1.5
>
I want to create a midi-file with metronome clicks of a piece with many
time signature and tempo changes and I want to practise with this file. I
want to be able to practise in different tempi and I don't want to retype
all the tempo changes again and again.
Is it possible to define tempo-relations in scheme?
Thanks,
Stefan
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


  1   2   3   4   5   6   7   8   9   >