Re: define-scheme-function

2022-08-22 Thread Лысов Дмитрий
Pavel, thank you! Everything worked out. I will add that it should not just be enclosed in curly brackets, but also with spaces { #lyric }.A byzantine font "ByzantineLily" ("ByzantineMusic" & "EZ"):https://disk.yandex.ru/d/3olUfp1eHpZFBwSymbol table:https://disk.yandex.ru/i/CM0oXkWfqUaNSAhttps://disk.yandex.ru/i/2B23RgInek5PDQhttps://disk.yandex.ru/i/lqeCM0C1QMMymQFont "Ponomar Unicode": https://sci.ponomar.net/fonts.htmlFont "Mezenets Unicode": https://sci.ponomar.net/music.htmlWorking code: \version "2.22.1"   \header {   title = "Сбо́рникъ мелѡди́ческихъ фо́рмꙋлъ зна́меннагѡ роспѣ́ва"   composer= "Ште́йнберг Б."  poet = "Москва̀, ҂вз҃і"  copyright = "Вѧ́тка, ҂вк҃в"} \paper {  #(set-paper-size "a4")  tagline=##f  ragged-right = ##t  myStaffSize = #21  #(define fonts (make-pango-font-tree                  "Ponomar Unicode"                  "Ponomar Unicode"                  "Ponomar Unicode"                  (/ myStaffSize 21)))} \layout {  indent = 0.0   \context {    \Lyrics     \override LyricText #'font-size = #4     \override LyricText #'font-name = #"Ponomar Unicode"     \override LyricSpace.minimum-distance = #0.8   }   \context {     \Score     \override SpacingSpanner.spacing-increment = 0.5  }  \context {     \KievanVoice     \stemDown     fontSize = 1.0  }}  \midi {   \context {     \Score     tempoWholesPerMinute = #(ly:make-moment 110 2)   }   \context {     \Staff     \remove Staff_performer   }   \context {     \Voice     \remove Staff_performer   }} makeScore =#(define-scheme-function (mark notes lyricdown lyricup) (markup? ly:music? ly:music? ly:music?)    #{      \score {        \header {}        <<          \new KievanStaff  = slavonic           <<          \new KievanVoice = "melody"             \relative c' {              \cadenzaOn              \mark #mark              #notes              \bar "k"            }          >>                  \new Lyrics         \lyricsto "melody"         {           \override LyricText.font-name = #"ByzantineLily"           \override LyricText.font-size = #5           \override LyricSpace.minimum-distance = #0.8          #lyricdown }                 \new Lyrics \with {alignAboveContext = slavonic}         \lyricsto "melody"         {           \override LyricText.font-name = #"Mezenets Unicode"          \override LyricText.font-size = #9          \override LyricSpace.minimum-distance = #2          #lyricup }                 >>         \layout { }        %\midi { }      }    #}) \markup { \fill-line \huge { "Гла́съ д҃" }}\markup { \fill-line \huge { "Начальные" }}\makeScore "Оу҆до́ль [а҃]" {\[(d4 c)\] \[(d e)\] \bar "|" f1 \[(e4 d)\] f2 e d1} \lyricmode {  Ă F 1àà ā  g" gá } \lyricmode { 콗 콞 쾒 콗 콐켱 콜 쾆 } \makeScore "Оу҆до́ль [в҃]" {d4 c d e \bar "|" d2 e4 d f2 e d1} \lyricmode {  큆 큑 큇 큇  큇 큑    } \lyricmode {  }\makeScore "Рютка" {d2 d d d4 c d e f2 e1} \lyricmode {     큆 큑 큇 큇   } \lyricmode {  }\makeScore "Возгласка" {g'2 f a1 g2 g g4 f g2 f4 e d2} \lyricmode {       큆 큑  큑 큑  } \lyricmode {  }\markup { \fill-line \huge { "Конечные" }}\makeScore "Вознос конечный" {e4 d e f g1 g2 f e d e f1 e} \lyricmode {  큆 큑 큇 큇         } \lyricmode {  } 22.08.2022, 11:57, "Павел" <budanov.pa...@gmail.com>:Нужно ещё заключить #lyricup и #lyricdown в фигурные скобки (в функции makeScore), как в моём примере. С этим исправлением ваш пример у меня заработал.21.08.2022 21:02, Лысов Дмитрий пишет:Я исправил, но все равно что-то не так. Этот вариант кода выдает ошибки:I fixed it, but there's still something wrong. This version of the code gives errors:\version "2.22.1"  makeScore =#(define-scheme-function (mark notes lyricup lyricdown) (markup? ly:music? ly:music? ly:music?)    #{      \score {        \header {piece = \markup { Название }}        <<          \new KievanStaff  = slavonic           <<          \new KievanVoice = "melody"             \relative c' {              \cadenzaOn              \mark #mark              #notes              \bar "|"            }          >>                  \new Lyrics         \lyricsto "melody"         #lyricup                 \new Lyrics \with {alignAboveContext = slavonic}         \lyricsto "melody"         #lyricdown                 >>         \layout { }        %\midi { }      }    #}) \markup { \fill-line \huge { "Глас 1" }}\markup { \fill-line \huge { "Начальные" }}\makeScore "Удра" {e4 c d f e d c d e d e1} \lyricmode {la la la la} \lyricmode {ta ta ta ta} C:/Users/Asus/AppData/Local/Temp/frescobaldi-m1s83y6n/tmpvpo3he0n/Сборник формул_defin

Re: define-scheme-function

2022-08-21 Thread Лысов Дмитрий
Я исправил, но все равно что-то не так. Этот вариант кода выдает ошибки:I fixed it, but there's still something wrong. This version of the code gives errors:\version "2.22.1"  makeScore =#(define-scheme-function (mark notes lyricup lyricdown) (markup? ly:music? ly:music? ly:music?)    #{      \score {        \header {piece = \markup { Название }}        <<          \new KievanStaff  = slavonic           <<          \new KievanVoice = "melody"             \relative c' {              \cadenzaOn              \mark #mark              #notes              \bar "|"            }          >>                  \new Lyrics         \lyricsto "melody"         #lyricup                 \new Lyrics \with {alignAboveContext = slavonic}         \lyricsto "melody"         #lyricdown                 >>         \layout { }        %\midi { }      }    #}) \markup { \fill-line \huge { "Глас 1" }}\markup { \fill-line \huge { "Начальные" }}\makeScore "Удра" {e4 c d f e d c d e d e1} \lyricmode {la la la la} \lyricmode {ta ta ta ta} C:/Users/Asus/AppData/Local/Temp/frescobaldi-m1s83y6n/tmpvpo3he0n/Сборник формул_define-scheme_byz.ly:24:9: error: syntax error, unexpected SCM_TOKEN, expecting \sequential or \simultaneous or << or '{'#lyricupC:/Users/Asus/AppData/Local/Temp/frescobaldi-m1s83y6n/tmpvpo3he0n/Сборник формул_define-scheme_byz.ly:28:9: error: syntax error, unexpected SCM_TOKEN, expecting \sequential or \simultaneous or << or '{'#lyricdownC:/Users/Asus/AppData/Local/Temp/frescobaldi-m1s83y6n/tmpvpo3he0n/Сборник формул_define-scheme_byz.ly:38:1: error: errors found, ignoring music _expression_\makeScore "Удра" {e4 c d f e d c d e d e1} \lyricmode {la la la la} \lyricmode {ta ta ta ta}C:/Users/Asus/AppData/Local/Temp/frescobaldi-m1s83y6n/tmpvpo3he0n/Сборник формул_define-scheme_byz.ly:38:1: error: error in #{ ... #}\makeScore "Удра" {e4 c d f e d c d e d e1} \lyricmode {la la la la} \lyricmode {ta ta ta ta}fatal error: failed files: "C:\\Users\\Asus\\AppData\\Local\\Temp\\frescobaldi-m1s83y6n\\tmpvpo3he0n\\Сбо�\x80ник �\x84о�\x80м�\x83л_define-scheme_byz.ly"Программа завершилась с кодом 1. 21.08.2022, 20:14, "Павел" :Используйте \lyricmode:\makeScore "Удра" {e4 c d f e d c d e d e1} \lyricmode {a b c d} \lyricmode {e f g hh}21.08.2022 15:52, Лысов Дмитрий пишет:\makeScore "Удра" {e4 c d f e d c d e d e1} {a b c d} {e f g hh}

Re: define-scheme-function

2022-08-21 Thread Лысов Дмитрий
Это не ноты, это текстовые строки (лирика).21.08.2022, 17:51, "David Kastrup" :Лысов Дмитрий <sii...@yandex.ru> writes: Спасибо, Павел. Структура мне понятна, помогите правильно определить передачу данных для функции. Если мы прямо записываем в функции define-scheme-function текстовую строку {e f g h}, то она выводится на странице: \new Lyrics  \lyricsto "melody"  {e f g h} А если заменяю {e f g h} на переменную функции #lyricdown, то получается ошибка. Функция вызывается  так \makeScore "Удра" {e4 c d f e d c d e d e1} {a b c d} {e f g hh} Определение функции такое: makeScore = #(define-scheme-function (mark notes lyricup lyricdown) (markup? ly:music? ly:music? ly:music?) Где ошибка?   Thank you, Pavel. The structure is clear to me, help me correctly determine the data transfer for the function. If we directly write the text string {e f g h} in the define-scheme-function, then it is output on the page:\new Lyrics  \lyricsto "melody"  {e f g h} And if I replace {e f g h} with a variable of the #lyricdown function, then an error is obtained. The function is called so \makeScore "Удра" {e4 c d f e d c d e d e1} {a b c d} {e f g hh} The function definition is: makeScore = #(define-scheme-function (mark notes lyricup lyricdown) (markup? ly:music? ly:music? ly:music?) Where is the error?What is hh supposed to be?-- David Kastrup

Re: define-scheme-function

2022-08-21 Thread Лысов Дмитрий
These are not notes, these are text strings (lyrics).21.08.2022, 17:51, "David Kastrup" :Лысов Дмитрий <sii...@yandex.ru> writes: Спасибо, Павел. Структура мне понятна, помогите правильно определить передачу данных для функции. Если мы прямо записываем в функции define-scheme-function текстовую строку {e f g h}, то она выводится на странице: \new Lyrics  \lyricsto "melody"  {e f g h} А если заменяю {e f g h} на переменную функции #lyricdown, то получается ошибка. Функция вызывается  так \makeScore "Удра" {e4 c d f e d c d e d e1} {a b c d} {e f g hh} Определение функции такое: makeScore = #(define-scheme-function (mark notes lyricup lyricdown) (markup? ly:music? ly:music? ly:music?) Где ошибка?   Thank you, Pavel. The structure is clear to me, help me correctly determine the data transfer for the function. If we directly write the text string {e f g h} in the define-scheme-function, then it is output on the page:\new Lyrics  \lyricsto "melody"  {e f g h} And if I replace {e f g h} with a variable of the #lyricdown function, then an error is obtained. The function is called so \makeScore "Удра" {e4 c d f e d c d e d e1} {a b c d} {e f g hh} The function definition is: makeScore = #(define-scheme-function (mark notes lyricup lyricdown) (markup? ly:music? ly:music? ly:music?) Where is the error?What is hh supposed to be?-- David Kastrup

define-scheme-function

2022-08-21 Thread Лысов Дмитрий
Спасибо, Павел. Структура мне понятна, помогите правильно определить передачу данных для функции. Если мы прямо записываем в функции define-scheme-function текстовую строку {e f g h}, то она выводится на странице:        \new Lyrics         \lyricsto "melody"         {e f g h}А если заменяю {e f g h} на переменную функции #lyricdown, то получается ошибка. Функция вызывается так \makeScore "Удра" {e4 c d f e d c d e d e1} {a b c d} {e f g hh}Определение функции такое:makeScore =#(define-scheme-function (mark notes lyricup lyricdown) (markup? ly:music? ly:music? ly:music?)Где ошибка? Thank you, Pavel. The structure is clear to me, help me correctly determine the data transfer for the function. If we directly write the text string {e f g h} in the define-scheme-function, then it is output on the page:       \new Lyrics         \lyricsto "melody"         {e f g h}And if I replace {e f g h} with a variable of the #lyricdown function, then an error is obtained. The function is calledso \makeScore "Удра" {e4 c d f e d c d e d e1} {a b c d} {e f g hh}The function definition is:makeScore =#(define-scheme-function (mark notes lyricup lyricdown) (markup? ly:music? ly:music? ly:music?)Where is the error?

define-scheme-function

2022-08-20 Thread Лысов Дмитрий
How to define the "lyricup" and "lyricdown" arguments in define-scheme-function so that their values are taken from the \makeScore data? At the same time, the upper and lower lines of the text should have different fonts set. \version "2.22.1"   \header {   title = "Сборник мелодических формул знаменного распева"   composer= "Штейнберг Б."  poet = "Москва, 2017"} \paper {  #(set-paper-size "a4")  tagline=##f  ragged-right = ##t  myStaffSize = #21  #(define fonts (make-pango-font-tree                  "Ponomar Unicode"                  "Ponomar Unicode"                  "Ponomar Unicode"                  (/ myStaffSize 21)))} \layout {  indent = 0.0   \context {    \Lyrics     \override LyricText #'font-size = #4     \override LyricText #'font-name = #"Ponomar Unicode"     \override LyricSpace.minimum-distance = #0.8   }   \context {     \Score     \override SpacingSpanner.spacing-increment = 0.5  }  \context {     \KievanVoice     \stemDown     fontSize = 1.0  }}  \midi {   \context {     \Score     tempoWholesPerMinute = #(ly:make-moment 110 2)   }   \context {     \Staff     \remove Staff_performer   }   \context {     \Voice     \remove Staff_performer   }} makeScore =#(define-scheme-function (mark notes lyricup lyricdown) (markup? ly:music? markup? markup?)    #{      \score {        \header {piece = \markup { Название }}        <<          \new KievanStaff  = slavonic           <<          \new KievanVoice = "melody"             \relative c' {              \cadenzaOn              \mark #mark              #notes              \bar "|"            }          >>                  \new Lyrics         \lyricsto "melody"         {а п р ц} %lyricup                 \new Lyrics \with {alignAboveContext = slavonic}         \lyricsto "melody"         {b b b b} %lyricdown                 >>         \layout { }        %\midi { }      }    #}) \markup { \fill-line \huge { "Глас 1" }}\markup { \fill-line \huge { "Начальные" }}\makeScore "Удра" {e4 c d f e d c d e d e1} "mi do re fa" "E C D F"\markup { \fill-line \huge { "Конечные" }} \makeScore "Удра" {e4 c d f e d c d e d e1} "mi do re fa" "E C D F"\markup { \fill-line \huge { "Срединные" }}\makeScore "Дербица или скорпица" {e4 f g a a g2.} "mi fa sol la" "E F G A"

[no subject]

2022-08-20 Thread Лысов Дмитрий
Как определить в define-scheme-function аргументы "lyricup" и "lyricdown", чтобы их значения брались из данных \makeScore? При этом у верхней и нижней строк текста должны быть заданы разные шрифты. \version "2.22.1"   \header {   title = "Сборник мелодических формул знаменного распева"   composer= "Штейнберг Б."  poet = "Москва, 2017"} \paper {  #(set-paper-size "a4")  tagline=##f  ragged-right = ##t  myStaffSize = #21  #(define fonts (make-pango-font-tree                  "Ponomar Unicode"                  "Ponomar Unicode"                  "Ponomar Unicode"                  (/ myStaffSize 21)))} \layout {  indent = 0.0   \context {    \Lyrics     \override LyricText #'font-size = #4     \override LyricText #'font-name = #"Ponomar Unicode"     \override LyricSpace.minimum-distance = #0.8   }   \context {     \Score     \override SpacingSpanner.spacing-increment = 0.5  }  \context {     \KievanVoice     \stemDown     fontSize = 1.0  }}  \midi {   \context {     \Score     tempoWholesPerMinute = #(ly:make-moment 110 2)   }   \context {     \Staff     \remove Staff_performer   }   \context {     \Voice     \remove Staff_performer   }} makeScore =#(define-scheme-function (mark notes lyricup lyricdown) (markup? ly:music? markup? markup?)    #{      \score {        \header {piece = \markup { Название }}        <<          \new KievanStaff  = slavonic           <<          \new KievanVoice = "melody"             \relative c' {              \cadenzaOn              \mark #mark              #notes              \bar "|"            }          >>                  \new Lyrics         \lyricsto "melody"         {а п р ц} %lyricup                 \new Lyrics \with {alignAboveContext = slavonic}         \lyricsto "melody"         {b b b b} %lyricdown                 >>         \layout { }        %\midi { }      }    #}) \markup { \fill-line \huge { "Глас 1" }}\markup { \fill-line \huge { "Начальные" }}\makeScore "Удра" {e4 c d f e d c d e d e1} "mi do re fa" "E C D F"\markup { \fill-line \huge { "Конечные" }} \makeScore "Удра" {e4 c d f e d c d e d e1} "mi do re fa" "E C D F"\markup { \fill-line \huge { "Срединные" }}\makeScore "Дербица или скорпица" {e4 f g a a g2.} "mi fa sol la" "E F G A"

Re: Byzantine singing

2022-08-17 Thread Лысов Дмитрий
Thanks for the reply. See the following.A new byzantine font containing two fonts ByzantineMusic & EZ:https://disk.yandex.ru/d/3olUfp1eHpZFBwSymbol table:https://disk.yandex.ru/i/CM0oXkWfqUaNSAhttps://disk.yandex.ru/i/2B23RgInek5PDQhttps://disk.yandex.ru/i/lqeCM0C1QMMymQ \version "2.22.1"  \header { copyright = "Вѧ́тка, ҂вк҃в" } \paper {  (set-paper-size "a4")   %page-count = # 1  tagline=##f   ragged-last = ##t  myStaffSize = #21  #(define fonts (make-pango-font-tree     "Ponomar Unicode"    "Ponomar Unicode"    "Ponomar Unicode"    (/ myStaffSize 21)))  system-system-spacing = #'((padding . 3.9))}\layout {  indent = 0.0   \context   {    \Lyrics     \remove Time_signature_engraver    \remove "Forbid_line_break_engraver"  }   \context   {    \Score    \override SpacingSpanner.spacing-increment = 0.5    \Staff  }  \context   {    \KievanVoice    \stemDown    fontSize = 1.0  }} \midi {  \context   {    \Score    tempoWholesPerMinute = #(ly:make-moment 110 2)  }  \context   {    \Staff    \remove Staff_performer  }  \context   {    \Voice    \consists Staff_performer  }}melody = {   \[(d4 c)\] \[(d e)\] f1 \[(e4 d)\] f2 e d1\bar "|" }text = \lyricmode {  \override LyricText.font-name = #"ByzantineLily"   \override LyricText.font-size = #5   \override LyricSpace.minimum-distance = #0.8   \override LyricText.self-alignment-X = #CENTER  Ă F 1àà ā  g" gá} znamen = \lyricmode {  \override LyricText.font-name = #"Mezenets Unicode"  \override LyricText.font-size = #9  \override LyricSpace.minimum-distance = #2  콗 콞 쾒 콗 콐켱 콜 쾆} \markup { \huge { "Гла́съ д҃: ᲂу҆до́ль" }}\score {   <<    \new KievanStaff  = slavonic     <<      \new KievanVoice = "one"       \relative c' {        \cadenzaOn         \melody        \bar "k"        \cadenzaOff      }    >>      \new Lyrics     \lyricsto "one"     \text    \new Lyrics \with {alignAboveContext = slavonic}     \lyricsto "one"     \znamen              >>  \layout{}  \midi{}} 17.08.2022, 18:03, "Werner LEMBERG" :  Based on a group of byzantine fonts, I made my own ByzLily.otf. Font "ByzLily.otf": https://disk.yandex.ru/d/jW8aScwbZvgzgANice! Is there a documentation that maps character codes to glyphdescriptions?  In LilyPond, there is no way to combine characters from different fonts qualitatively.This is normal. You can't do that with other typesetting systemseither. You could define LilyPond macros to combine glyphs fromdifferent fonts, though.  A single font allows you to use different elements of byzantine notation in one text. The music is entered as a text string under the note carrier.Yes. However, I can imagine that a macro solution would be moreflexible, for example, to select a style X that combines ChurchSlavonic font X with the Byzantine neumes.  Tell me, how can text syllables of byzantine notation be aligned inthe center of the notes?Normally, you can center-align lyrics with the command```\override LyricText.self-alignment-X = #CENTER```Maybe this works for you, too.   Program text [...]Please send an image that shows the output. :-)Werner

Re: simplify the program code

2022-08-17 Thread Лысов Дмитрий
Dear Jean. I have not been able to understand the define-music-function structure. Help please. How can I add a line with lyrics above and below the note bearer? Each note-bearer will have his own lyrics. Both lyrics are related to the melody. Fonts are different. Sample code for a single data item. %\version "2.22.1"  % necessary for upgrading to future LilyPond versions. \header {    copyright = "Вѧ́тка, ҂вк҃в"} %header \paper {  (set-paper-size "a4")   tagline=##f   ragged-last = ##t  myStaffSize = #21  #(define fonts (make-pango-font-tree     "Times New Roman"    "Times New Roman"    "Times New Roman"    (/ myStaffSize 21)))  system-system-spacing = #'((padding . 3.9)) } \layout {  indent = 0.0   \context   {    \Lyrics     \remove Time_signature_engraver    \remove "Forbid_line_break_engraver"  }   \context   {    \Score    \override SpacingSpanner.spacing-increment = 0.5    \Staff  }  \context   {    \KievanVoice    \stemDown    fontSize = 1.0  }}  \midi {  \context   {    \Score    tempoWholesPerMinute = #(ly:make-moment 110 2)  }  \context   {    \Staff    \remove Staff_performer  }  \context   {    \Voice    \consists Staff_performer  }} melody = {  \[(d4 c)\] \[(d e)\] f1 \[(e4 d)\] f2 e d1\bar "|" } text = \lyricmode{  \override LyricText.font-name = #"Arial"   \override LyricText.font-size = #4   \override LyricSpace.minimum-distance = #0.8 la la la la la la la}  znamen = \lyricmode{  \override LyricText.font-name = #"Courier"  \override LyricText.font-size = #4  \override LyricSpace.minimum-distance = #2    ta ta ta ta ta ta ta}  \markup { \huge { "Гла́съ д҃: ᲂу҆до́ль" }}\score{   <<    \new KievanStaff  = slavonic     <<      \new KievanVoice = "one"       \relative c'      {        \cadenzaOn         \melody        \bar "k"        \cadenzaOff      }    >>        \new Lyrics     \lyricsto "one"     \text        \new Lyrics \with {alignAboveContext = slavonic}     \lyricsto "one"     \znamen              >>  \layout{}  \midi{}} %score 27.06.2022, 09:48, "Jean Abou Samra" :Le 26/06/2022 à 20:25, Лысов Дмитрий a écrit : Thanks. That's not bad. Probably, the insertion of the \markup block in \score should not be done. Then you will get one midi file. Still, it is more convenient to listen to individual midi files.1. It is usually more convenient if you move global \layoutand \midi settings to a separate block on the top-level ratherthan duplicating them.2. To move the markups inside the score, you can use headers:\score {   \header { piece = \markup ...   }   ...}3. Define a substitution function to do the rest. (This is easierwith the previous bullet point since it only has to return one singlevalue.)\version "2.23.9"\header {   title = "Сборник мелодических формул знаменного распева" %\markup {\override #'(line-width . 60) \wordwrap-string  { "Конда́къ ..., гла́съє҃:"  } }   %subtitle = ""   %subsubtitle =  ""   composer= "Штейнберг Б."   poet = "Москва 2017"   %copyright = ""}\paper {   #(set-paper-size "a4")   %page-count = # 1   tagline=##f   %ragged-last = ##t   ragged-right = ##t   myStaffSize = #21   #(define fonts (make-pango-font-tree   "Times New Roman"   "Times New Roman"   "Times New Roman"   (/ myStaffSize 21)))}\layout {   indent = 0.0   \context { \Lyrics \override LyricText #'font-size = #4 \override LyricText #'font-name = #"Times New Roman" \override LyricSpace.minimum-distance = #0.8   }}#(define counter-alist '())#(define-markup-command (counter layout props name) (string?)    "Increases and prints out the value of the given counter named@var{name}.    If the counter does not yet exist, it is initialized with 1."    (let* ((oldval (assoc-ref counter-alist name))   (newval (if (number? oldval) (+ oldval 1) 1)))  (set! counter-alist (assoc-set! counter-alist name newval))  (interpret-markup layout props    (markup (number->string newval)#(define-markup-command (setcounter layout props name value) (string?number?)    "Set the given counter named @var{name} to the given @var{value} andprints    out the value. The counter does not yet have to exist."    (set! counter-alist (assoc-set! counter-alist name (- value 1)))    (interpret-markup layout props (make-counter-markup name)))\markup { \setcounter #"mycounter" #-1 }\markup { \fill-line \huge { "Глас 1" }}\markup { \fill-line \huge { "Начальные" }}\markup { Номер midi файла: \counter #"mycounter" }\layout {   \context { \Score \override SpacingSpanner.spacing-increment = 0.5   }   \context { \KievanVoice \ste

Re: Byzantine singing

2022-08-08 Thread Лысов Дмитрий
" "켔" "켕" "켖" "켗" "켘" "켙" "켚" "켛" "켜" "켝" "켞" "켟"   "켠" "켡" "켢" "켣" "켤" "켥" "켦" "켧" "켨" "켩" "켪" "켫" "켬" "켭" )) #(define (symbol-location str symb);; search text for the specified character and store its location in an alist;; --> '((start . end) (start . end) ...)  (let ((result '())    (counter 0))      (define (helper str)        (let ((pos (string-contains str symb)))          (if pos            (let ((dpos (+ pos (string-length symb              (set! result (append result (cons (cons (+ pos counter)                (+ pos counter (string-length symb)))                  '(              (set! counter (+ counter dpos))                (helper (string-drop str dpos))      (helper str)    result)) #(define (all-symbol-locations str)  (let ((result '()))    (for-each      (lambda (sym)        (let ((pos-length (symbol-location str sym)))          (if (pair? pos-length)            (set! result (append result pos-length)      characters-to-color)    result)) #(define (sort-alist alist);; sort alist by keys  (sort alist (lambda (p q) (< (car p) (car q) #(define red-and-black-markup  (lambda (grob)    (let* ((text (ly:grob-property grob 'text))      (positions (sort-alist (all-symbol-locations text)))      (range (cons 0 (string-length text)))      (result '())) ; build markup here       (define (helper positions range)      ;; positions values --> red markups; gaps --> black      (let* ((left (cons (car range) (car (first positions        (right (cons (cdr (first positions)) (cdr range)))          (segment (lambda (x) (substring text (car x) (cdr x)           (set! result            (append result              (if (> (interval-length left) 0)                (list (markup (segment left)))                '())              (list (markup #:with-color red (segment (first positions))             (if (null? (cdr positions))              (if (> (interval-length right) 0)                (set! result (append result (list (markup (segment right))              (helper (cdr positions) right       (if (null? positions)        (set! result (list (markup text)))        (helper positions range))       (set! result (make-concat-markup result))      (set! (ly:grob-property grob 'text) result colorSymbols =  #(define-music-function    (parser location) ()  #{ \override Lyrics . LyricText #'before-line-breaking = #red-and-black-markup #}) melody = {  %\break  %\bar "k"  %\set Staff.instrumentName = "Tenor"  %\leftBracket  %\rightBracket  %\recitative  %\final*1/64  %\longa  %\bar ""  %\bar "|"  %\[(  )\]          \[(d4 c)\] \[(d e)\] f1 \[(e4 d)\] f2 e d1\bar "|" %удоль (нач.)} text = \lyricmode{  \override LyricText.font-name = #"ByzLily"   \override LyricText.font-size = #5   \override LyricSpace.minimum-distance = #0.8 %расстояние между словами Ig F à gg  g" gá}  znamen = \lyricmode{  \override LyricText.font-name = #"Mezenets Unicode"  \override LyricText.font-size = #9  \override LyricSpace.minimum-distance = #2  %\colorSymbols %включить для раскрашивания помет    콗 콞 쾒 콗 콐켱 콜 쾆}  \markup { \huge { "Гла́съ д҃: ᲂу҆до́ль" }}\score{   <<    \new KievanStaff  = slavonic     <<      \new KievanVoice = "one"       \relative c'      {        \cadenzaOn         \melody        \bar "k"        \cadenzaOff      }    >>        \new Lyrics     \lyricsto "one"     \text        \new Lyrics \with {alignAboveContext = slavonic}     \lyricsto "one"     \znamen              >>  \layout{}  \midi{}} %score 03.08.2022, 16:28, "Eef Weenink" :One of them is https://www.ctan.org/pkg/byzantinemusic. In xelatex.  Eef  Verstuurd vanaf mijn iPad Op 31 jul. 2022 om 21:56 heeft Лысов Дмитрий <sii...@yandex.ru> het volgende geschreven: Hi! I am studying Byzantine singing, which uses neumes to record melodies. Have you ever met a player or a converter of this notation into a five-line one in the lilypond program? Are there any developments on this topic at all?Например посмотрите книгу по византийскому пению:Langue N. "A guide to the music of the eastern orthodox church", 1984.https://www.newbyz.org/guide_to_music_of_eoa.pdf

Re: Byzantine singing

2022-08-06 Thread Лысов Дмитрий
Thanks Eef.  03.08.2022, 16:28, "Eef Weenink" :One of them is https://www.ctan.org/pkg/byzantinemusic. In xelatex.  Eef  Verstuurd vanaf mijn iPad Op 31 jul. 2022 om 21:56 heeft Лысов Дмитрий <sii...@yandex.ru> het volgende geschreven: Hi! I am studying Byzantine singing, which uses neumes to record melodies. Have you ever met a player or a converter of this notation into a five-line one in the lilypond program? Are there any developments on this topic at all?Например посмотрите книгу по византийскому пению:Langue N. "A guide to the music of the eastern orthodox church", 1984.https://www.newbyz.org/guide_to_music_of_eoa.pdf

Re: Byzantine singing

2022-08-01 Thread Лысов Дмитрий
Thanks Karlin, it doesn't fit. 01.08.2022, 10:28, "Karlin High" :On 7/31/2022 2:54 PM, Лысов Дмитрий wrote: Are there any developments on this topic at all?Web search found this:Encoding Byzantine Music Notation (ca. 1600-1814)<http://scholar.uoa.gr/sites/default/files/georgaki/files/74_encodingbyzantinemusicnotation_2018_bourischaldeakesgeorgaki.pdf>Lilychant: front-end for LilyPond to create scores for Orthodox chants<http://www.orthodoxeastmidlands.uk/music/>(Dead links; web.archive.org Wayback Machine might help.)--Karlin HighMissouri, USA

Re: Byzantine singing

2022-08-01 Thread Лысов Дмитрий
Thanks Paul, it's interesting. I wrote a request to this site. 01.08.2022, 11:38, "Paul Hodges" :(Dead links; web.archive.org Wayback Machine might help.)   Sadly, no it doesn't.  And searching for Lilychant finds nothing but a different project on GitHub.  Paul

Byzantine singing

2022-07-31 Thread Лысов Дмитрий
Hi! I am studying Byzantine singing, which uses neumes to record melodies. Have you ever met a player or a converter of this notation into a five-line one in the lilypond program? Are there any developments on this topic at all?Например посмотрите книгу по византийскому пению:Langue N. "A guide to the music of the eastern orthodox church", 1984.https://www.newbyz.org/guide_to_music_of_eoa.pdf



Re: simplify the program code

2022-06-27 Thread Лысов Дмитрий
Oh, no. This is what is needed. I just haven't come across the proposed algorithm of the program. I need to try it out.27.06.2022, 14:35, "Jean Abou Samra" :Le 27/06/2022 à 12:22, Лысов Дмитрий a écrit : It is interesting. There is something to think about.Since you say this, I suppose you are not completely satisfied with this solution. What could be better about it?Jean



Re: simplify the program code

2022-06-27 Thread Лысов Дмитрий
It is interesting. There is something to think about.27.06.2022, 09:48, "Jean Abou Samra" :Le 26/06/2022 à 20:25, Лысов Дмитрий a écrit : Thanks. That's not bad. Probably, the insertion of the \markup block  in \score should not be done. Then you will get one midi file. Still,  it is more convenient to listen to individual midi files.1. It is usually more convenient if you move global \layoutand \midi settings to a separate block on the top-level ratherthan duplicating them.2. To move the markups inside the score, you can use headers:\score {   \header { piece = \markup ...   }   ...}3. Define a substitution function to do the rest. (This is easierwith the previous bullet point since it only has to return one singlevalue.)\version "2.23.9"\header {   title = "Сборник мелодических формул знаменного распева" %\markup { \override #'(line-width . 60) \wordwrap-string  { "Конда́къ ..., гла́съ є҃:"  } }   %subtitle = ""   %subsubtitle =  ""   composer= "Штейнберг Б."   poet = "Москва 2017"   %copyright = ""}\paper {   #(set-paper-size "a4")   %page-count = # 1   tagline=##f   %ragged-last = ##t   ragged-right = ##t   myStaffSize = #21   #(define fonts (make-pango-font-tree   "Times New Roman"   "Times New Roman"   "Times New Roman"   (/ myStaffSize 21)))}\layout {   indent = 0.0   \context { \Lyrics \override LyricText #'font-size = #4 \override LyricText #'font-name = #"Times New Roman" \override LyricSpace.minimum-distance = #0.8   }}#(define counter-alist '())#(define-markup-command (counter layout props name) (string?)    "Increases and prints out the value of the given counter named @var{name}.    If the counter does not yet exist, it is initialized with 1."    (let* ((oldval (assoc-ref counter-alist name))   (newval (if (number? oldval) (+ oldval 1) 1)))  (set! counter-alist (assoc-set! counter-alist name newval))  (interpret-markup layout props    (markup (number->string newval)#(define-markup-command (setcounter layout props name value) (string? number?)    "Set the given counter named @var{name} to the given @var{value} and prints    out the value. The counter does not yet have to exist."    (set! counter-alist (assoc-set! counter-alist name (- value 1)))    (interpret-markup layout props (make-counter-markup name)))\markup { \setcounter #"mycounter" #-1 }\markup { \fill-line \huge { "Глас 1" }}\markup { \fill-line \huge { "Начальные" }}\markup { Номер midi файла: \counter #"mycounter" }\layout {   \context { \Score \override SpacingSpanner.spacing-increment = 0.5   }   \context { \KievanVoice \stemDown fontSize = 1.0   }}\midi {   \context { \Score tempoWholesPerMinute = #(ly:make-moment 110 2)   }   \context { \Staff \remove Staff_performer   }   \context { \Voice \remove Staff_performer   }}makeScore =#(define-scheme-function (mark notes) (markup? ly:music?)    #{  \score {    \header {  piece = \markup { Номер midi файла: \counter #"mycounter" }    }    \new KievanVoice = "melody" \relative c' {  \cadenzaOn  \mark #mark  #notes  \bar "|"    }    \layout { }    \midi { }  }    #})\makeScore Удра { e4 c d f e d c d e d e1 }\makeScore Рымза { e4 c d e f e d c2 d e1 }\makeScore Рутва { e2 e4 c d f e d c d e d e1 }\makeScore Перегиб { e2 e4 c d f e d c2 d e1 }\makeScore "Вознос последний" { d2 d4 f e d c b a1 g }See these pages in the documentation:https://lilypond.org/doc/v2.23/Documentation/notation/creating-titles-headers-and-footers#default-layout-of-bookpart-and-score-titleshttps://lilypond.org/doc/v2.23/Documentation/extending/scheme-functions.html(You need define-scheme-function rather than the more usualdefine-music-function because this function returns a whole\score block, not some music that could be used within a largerpiece of music.)Best,Jean

Re: simplify the program code

2022-06-26 Thread Лысов Дмитрий
Thanks. That's not bad. Probably, the insertion of the \markup block in \score should not be done. Then you will get one midi file. Still, it is more convenient to listen to individual midi files.26.06.2022, 17:32, "Knute Snortum" :On Sun, Jun 26, 2022 at 3:31 AM Лысов Дмитрий <sii...@yandex.ru> wrote: Thanks. I will give a part of the code. The name and \score blocks often alternate here. The \score block is bulky and has repetitive content. How can this content be taken out separately?The first thing is to format your input file better.  I have donethat, and now the repetition is easier to see and understand.Unfortunately, all I could think of was to pull the layout sectionsinto one global layout.  Eliminating the rest of the repetition eludesme, but maybe some of the smarter people here will look at it.  I'veattached the file. Second question: is it possible to describe the name of the section \markup { \fill-line \huge { "Name" }} inside the \score block?I'm not sure why you would want to do that, but I'm sure it can be done.-- Knute Snortum

Re: simplify the program code

2022-06-26 Thread Лысов Дмитрий
own \set fontSize = #1.0 \override Score.SpacingSpanner.spacing-increment = #0.5 \relative c' { \mark "Вознос последний" d2 d4 f e d c b a1 g \bar "|" \break}}>>\layout {indent = 0.0 \context {\Lyrics \override LyricText #'font-size = #4 \override LyricText #'font-name = #"Times New Roman" \override LyricSpace.minimum-distance = #0.8 } \context {\Score}} \midi { \context {\Staff \remove "Staff_performer"} \context {\Voice \consists "Staff_performer"} \context {\Score tempoWholesPerMinute = #(ly:make-moment 110 2)}}} 25.06.2022, 16:30, "Knute Snortum" :On Fri, Jun 24, 2022 at 1:16 AM Лысов Дмитрий <sii...@yandex.ru> wrote: Hello. How to simplify the program code? Source text (.xlsx): https://disk.yandex.ru/i/QNJiHUoFMqGdWA Program code (.ly): https://disk.yandex.ru/d/SfNy-mchF9V34gI have a feeling you'll get more responses if you add your ly file asa text attachment, or just paste it in your post. Also, the morespecific your question, the more likely you can get help. What exactlyis it you want to simplify?

simplify the program code

2022-06-24 Thread Лысов Дмитрий
Hello. How to simplify the program code?Source text (.xlsx): https://disk.yandex.ru/i/QNJiHUoFMqGdWAProgram code (.ly): https://disk.yandex.ru/d/SfNy-mchF9V34g



Re: color individual characters

2022-06-06 Thread Лысов Дмитрий
Photo examples:Without coloring ---> https://disk.yandex.ru/i/_eI-_vnOA-8gUQAfter coloring ---> https://disk.yandex.ru/i/23EqbLRldy-Yxw 06.06.2022, 04:19, "David Nalesnik" :  On Sun, Jun 5, 2022 at 8:16 PM David Nalesnik <david.nales...@gmail.com> wrote:Hi Dmitry, On Sun, Jun 5, 2022 at 4:03 PM Лысов Дмитрий <sii...@yandex.ru> wrote:Hi. How to color individual characters in the UNICODE encoding text?Examples:콗콂켄 _ 콞 _ 쾒켆 콗콃켅 콐켱켆 콜콃켅 쾆콂켄콖콃켅 콖콃켢 쾖켆 쾋콃 쾆콂 Additional information is attached to the letter.Sincerely, Dmitry. A long time ago I wrote the code in the attached message: https://www.mail-archive.com/lilypond-user@gnu.org/msg68583.html Maybe it can give you some ideas... Best,David  The link in the thread for the font used in this case doesn't appear to be active.

Re: color individual characters

2022-06-06 Thread Лысов Дмитрий
Hi David. I managed to color individual UNICODE characters. However, they change their location. Here's a look.Is it possible to cancel their movement when coloring?Links to fonts:1. Ponomar Unicode ———>https://sci.ponomar.net/fonts.html2. Mezenets Unicode ———> https://sci.ponomar.net/music.htmlThe text of the program ———> https://disk.yandex.ru/d/HA5a--AUxz7tUgThanks. 06.06.2022, 04:19, "David Nalesnik" <david.nales...@gmail.com>:  On Sun, Jun 5, 2022 at 8:16 PM David Nalesnik <david.nales...@gmail.com> wrote:Hi Dmitry, On Sun, Jun 5, 2022 at 4:03 PM Лысов Дмитрий <sii...@yandex.ru> wrote:Hi. How to color individual characters in the UNICODE encoding text?Examples:콗콂켄 _ 콞 _ 쾒켆 콗콃켅 콐켱켆 콜콃켅 쾆콂켄콖콃켅 콖콃켢 쾖켆 쾋콃 쾆콂 Additional information is attached to the letter.Sincerely, Dmitry. A long time ago I wrote the code in the attached message: https://www.mail-archive.com/lilypond-user@gnu.org/msg68583.html Maybe it can give you some ideas... Best,David  The link in the thread for the font used in this case doesn't appear to be active.