From f3fcdc1aa37120a4926fafde975003ccb3695d9b Mon Sep 17 00:00:00 2001 From: dotmg Date: Tue, 22 Jul 2025 13:52:37 +0200 Subject: [PATCH] Bugfix XML Parsing + MusicXML to solfa --- .../composeResources/files/ews-1.txt | 2 +- .../composeResources/files/ews-11.txt | 9 +++ .../composeResources/files/ews-12.txt | 20 +++++ .../composeResources/files/ews-13.txt | 16 ++++ .../composeResources/files/ews-2.txt | 2 +- .../composeResources/files/ews-3.txt | 2 +- .../composeResources/files/ews-4.txt | 2 +- .../composeResources/files/ews-5.txt | 2 +- .../composeResources/files/ews-6.txt | 2 +- .../composeResources/files/ews-7.txt | 2 +- .../composeResources/files/ews-8.txt | 2 +- .../composeResources/files/ews-9.txt | 10 +++ .../composeResources/files/ffpm-166-new.txt | 9 +++ .../composeResources/files/ffpm-166.txt | 9 +++ .../composeResources/files/ffpm-194.txt | 3 + .../composeResources/files/ffpm-56-new.txt | 14 ++++ .../composeResources/files/ffpm-56.txt | 14 ++++ .../composeResources/files/ffpm-57-new.txt | 11 +++ .../composeResources/files/ffpm-57.txt | 11 +++ .../mg/dot/feufaro/musicXML/MXAccent.kt | 54 ++++++++++++++ .../dot/feufaro/musicXML/MXArticulations.kt | 67 +++++++++++++++++ .../mg/dot/feufaro/musicXML/MXBarLine.kt | 42 +++++++++++ .../mg/dot/feufaro/musicXML/MXEnding.kt | 58 +++++++++++++++ .../mg/dot/feufaro/musicXML/MXFootNote.kt | 73 +++++++++++++++++++ .../kotlin/mg/dot/feufaro/musicXML/MXLevel.kt | 25 +++++++ .../mg/dot/feufaro/musicXML/MXMeasure.kt | 3 + .../mg/dot/feufaro/musicXML/MXNotations.kt | 5 +- .../kotlin/mg/dot/feufaro/musicXML/MXNote.kt | 2 +- .../feufaro/musicXML/MXOtherArticulation.kt | 45 ++++++++++++ .../mg/dot/feufaro/musicXML/MXRepeat.kt | 18 +++++ .../kotlin/mg/dot/feufaro/musicXML/MXRest.kt | 2 + .../mg/dot/feufaro/musicXML/MXWavyLine.kt | 44 +++++++++++ .../mg/dot/feufaro/musicXML/MusicXML.kt | 4 +- .../mg/dot/feufaro/musicXML/SolfaXML.kt | 59 +++++++++++++-- .../mg/dot/feufaro/musicXML/SolfaXMLTuo.kt | 40 ++++++++++ .../kotlin/mg/dot/feufaro/solfa/Solfa.kt | 9 ++- .../kotlin/mg/dot/feufaro/solfa/Transpose.kt | 26 ++++++- 37 files changed, 693 insertions(+), 25 deletions(-) create mode 100644 composeApp/src/commonMain/composeResources/files/ews-11.txt create mode 100644 composeApp/src/commonMain/composeResources/files/ews-12.txt create mode 100644 composeApp/src/commonMain/composeResources/files/ews-13.txt create mode 100644 composeApp/src/commonMain/composeResources/files/ews-9.txt create mode 100644 composeApp/src/commonMain/composeResources/files/ffpm-166-new.txt create mode 100644 composeApp/src/commonMain/composeResources/files/ffpm-166.txt create mode 100644 composeApp/src/commonMain/composeResources/files/ffpm-56-new.txt create mode 100644 composeApp/src/commonMain/composeResources/files/ffpm-56.txt create mode 100644 composeApp/src/commonMain/composeResources/files/ffpm-57-new.txt create mode 100644 composeApp/src/commonMain/composeResources/files/ffpm-57.txt create mode 100644 composeApp/src/commonMain/kotlin/mg/dot/feufaro/musicXML/MXAccent.kt create mode 100644 composeApp/src/commonMain/kotlin/mg/dot/feufaro/musicXML/MXArticulations.kt create mode 100644 composeApp/src/commonMain/kotlin/mg/dot/feufaro/musicXML/MXBarLine.kt create mode 100644 composeApp/src/commonMain/kotlin/mg/dot/feufaro/musicXML/MXEnding.kt create mode 100644 composeApp/src/commonMain/kotlin/mg/dot/feufaro/musicXML/MXFootNote.kt create mode 100644 composeApp/src/commonMain/kotlin/mg/dot/feufaro/musicXML/MXLevel.kt create mode 100644 composeApp/src/commonMain/kotlin/mg/dot/feufaro/musicXML/MXOtherArticulation.kt create mode 100644 composeApp/src/commonMain/kotlin/mg/dot/feufaro/musicXML/MXRepeat.kt create mode 100644 composeApp/src/commonMain/kotlin/mg/dot/feufaro/musicXML/MXWavyLine.kt diff --git a/composeApp/src/commonMain/composeResources/files/ews-1.txt b/composeApp/src/commonMain/composeResources/files/ews-1.txt index f0f8c39..ba2f6f7 100644 --- a/composeApp/src/commonMain/composeResources/files/ews-1.txt +++ b/composeApp/src/commonMain/composeResources/files/ews-1.txt @@ -1,4 +1,4 @@ -M0:|c:D|m:4/4|r:8.8 L.M.|t:1 - From all that dwell below the sky|n:15|l:10|a:John Warrington Hatton (1793: 1710-1793)|h:Isaac Watts (1719)|x:https://hymnary.org/tune/duke_street_hatton +M0:|c:D|m:4/4|r:8.8 L.M.|t:EWS 1 - From all that dwell below the sky|n:15|l:10|a:John Warrington Hatton (1793: 1710-1793)|h:Isaac Watts (1719)|x:https://hymnary.org/tune/duke_street_hatton T0:{|D:-!M:F|S:-!(L:T)|D:-!(T:L)|S:-!-:-/S:-!S:S|L:-!(S:S)|(F:T)!M:-|R:-!-:-/M:-!M:R|(D:M)!(S:D)|(L:R)!(F:M)|R:-!-:-/S:-!L:T|(D:-.F!S):D|D:-!T:-|D:-!-:-} N1:dmfsltd'tls/sssls-f-mr/mmrdmsd'lsfmr/sltd'--fmrd N2:ddt,ddfmrdt,/d5s,l,t,dt,/ddt,s,dd-d-t,dt,/ddrmrdrdt,d diff --git a/composeApp/src/commonMain/composeResources/files/ews-11.txt b/composeApp/src/commonMain/composeResources/files/ews-11.txt new file mode 100644 index 0000000..cc38c60 --- /dev/null +++ b/composeApp/src/commonMain/composeResources/files/ews-11.txt @@ -0,0 +1,9 @@ +M0:|t:All Glory, Laud, and Honor|c:Bb|m:4/4|a:Theodulph of Orleans, 760-821. tr. John Mason Neale (1818-1866)|h:Melchoir Teschner (1584-1635)|r:7.6.7.6.D +U0:zC:44444(422)4/4(22)444C/44444(422)4/4(22)444C/4(22)(22)44(44)4/4444(22)C/44444(44)4/4444(22)C +N1:d,s,s,l,t,d--dmr-ddt,dd,s,s,l,t,d--dmr-ddt,ddm-m-rdt,l,s,t,dt,l,l,-s,s,m,s,l,s,s,f,m,s,f,m,r,r,-d, +N2:d,r,d,d,f,f,m,r,m,s,s,f,m,r,r,m,d,r,d,d,f,f,m,r,m,s,s,f,m,r,r,m,m,s,-l,-l,fi,s,fi,r,s,m,s,s,fi,-s,r,d,d,d,d,r,t,,d,d,d,d,d,t,,-d, +N3:m,s,m,f,s,s,--s,dt,-dl,s,s,m,s,m,f,s,s,--s,dt,-dl,s,s,s,d-d-rrrdt,mdrmrdt,s,s,s,f,m,s,-s,s,l,s,s,-f,m, +N4:d,t,,d,f,r,d,--d,ds,-l,f,s,d,d,t,,d,f,r,d,--d,ds,-l,f,s,d,d,dt,l,s,fi,r,s,r,s,m,l,,t,,d,r,-s,,t,,d,m,f,d,t,,s,,d,m,f,d,s,,s,,-d, +E1:All glo_ry, laud, and ho_nor/to you, Re_dee_mer, King,/to whom the lips of chil_dren/made sweet ho_san_nas ring./You are the King of Is_rael/and Da_vid's roy_al Son,/now in the Lord's name co_ming,/the King and Bles_sed One. +E2:The com_pa_ny of an_gels/is prai_sing you on high;/and we with all cre_a_tion/in cho_rus make re_ply./The peo_ple of the He_brews/with palms be_fore you went;/our praise and prayer and an_thems/be_fore you we pre_sent. +E3:To you be_fore your pas_sion/they sang their hymns of praise;/to you, now high ex_al_ted,/our me_lo_dy we raise./As you re_ceived their prai_ses,/ac_cept the prayers we bring,/for you de_light in good_ness,/O good and gra_cious King!/ diff --git a/composeApp/src/commonMain/composeResources/files/ews-12.txt b/composeApp/src/commonMain/composeResources/files/ews-12.txt new file mode 100644 index 0000000..ab48641 --- /dev/null +++ b/composeApp/src/commonMain/composeResources/files/ews-12.txt @@ -0,0 +1,20 @@ +M0:|t:EWS 12 All Hail the Power of Jesus’ Name|c:Bb|m:4/4|a:Theodulph of Orleans. 760-821; tr: John Mason Neale (1818-1866)|h:Melchoir Teschner (1584-1635)|r:8.6.8.6.6 +U0:zC:444444(22)4/44(22)4(22)C/444444(22)4/48888(422)/8888(44)C +N1:s,dddrmrdrs,l,s,f,m,r,-d,s,dddrmrdrs,ddmms--smfmr-d +N2:m,m,f,s,s,s,s,fi,s,s,f,d,-d,t,,-d,m,m,f,s,s,s,s,fi,s,s,s,m,s,ddt,l,t,s,l,s,s,f,m, +N3:ds,l,s,t,drl,t,dds,l,s,s,f,m,s,s,l,s,t,drl,t,s,ds,ddmrdrdddt,-d +N4:d,d,f,m,s,dt,l,s,m,f,m,f,s,s,,-d,d,d,f,m,s,dt,l,s,s,m,d,dl,s,--s,df,s,s,,-d, +E1:All lands to God, in joy_ful sounds,/a_loft your voi_ces raise./Sing forth the ho_nour of his name,/and glo_rious make his praise./and glo_rious make his praise. +E2:Say un_to God, How ter_ri_ble/in all thy works art thou!/Through thy great power thy foes to thee/shall be cons_trained to bow./shall be cons_trained to bow. +E3:All on the earth shall wor_ship thee,/they shall thy praise pro_claim/in songs: they shall sing cheer_ful_ly/un_to thy ho_ly name./un_to thy ho_ly name. +E4:Come, and the works that God hath wrought/with ad_mi_ra_tion see:/in dea_ling with the sons of men/most ter_ri_ble is he./most ter_ri_ble is he. +E5:In_to dry land the sea he turned,/and they a pas_sage had;/even mar_ching through the flood on foot,/there we in him were glad./there we in him were glad. +E6:He ruleth e_ver by his pow_er;/his eyes the na_tions see:/O let not the re_bel_lious ones/in pride e_xal_ted be./in pride e_xal_ted be. +E7:Ye peo_ple, bless our God; a_loud/the voice speak of his praise:/our soul in life who safe pre_serves,/our foot from sli_ding stays./our foot from sli_ding stays. +E8:For thou didst prove and try us, Lord,/as men do sil_ver try;/brought’st us in_to the net, and mad’st/bands on our loins to lie./bands on our loins to lie. +E9:Thou hast made men ride o’er our heads;/through fire and flood we passed;/but yet into a_bun_dance great/thou hast us brought at last./thou hast us brought at last. +E10:I’ll bring burnt-_of_ferings to thy house;/to thee my vows I’ll pay,/which my lips ut_tered, my mouth spake,/when trou_ble on me lay./when trou_ble on me lay. +E11:Burnt-_sa_cri_fi_ces of fat sheep,/in_cense of rams I'll bring;/of bul_locks and of goats I will/pre_sent an of_fer_ing./pre_sent an of_fer_ing. +E12:All that fear God, come, hear, I’ll tell/what he did for my soul./I with my mouth unto him cried,/my tongue did him ex_tol./my tongue did him ex_tol. +E13:If in my heart I sin re_gard,/the Lord me will not hear:/but sure_ly God me heard, and to/my pra_yer’s voice gave ear./my pra_yer’s voice gave ear. +E14:O let the Lord, our gra_cious God,/for e_ver bles_sed be,/who turned not my pra_yer from him,/nor yet his grace from me/nor yet his grace from me diff --git a/composeApp/src/commonMain/composeResources/files/ews-13.txt b/composeApp/src/commonMain/composeResources/files/ews-13.txt new file mode 100644 index 0000000..8a4d52d --- /dev/null +++ b/composeApp/src/commonMain/composeResources/files/ews-13.txt @@ -0,0 +1,16 @@ +M0:|t:EWS 13 O for a thousand tongues to sing|a:Charles Wesley (1739: 1707-1788)|h:Thomas Jarman (1776-1861)|c:G|m:4/4 +U0:z0:862(31224)4(44)(44)C/44444C/4(3121113)1388G84462444444C444444444444444222244444444844G +N1:dmfslsfmfmdrt,dmfmrdrrmrmf-s-l-sfissssmrdmfmrdrs,d-ddffffm--mrrrmfrs--slsfmr-rd +N2:s,s,s,s,----l,s,-s,-s,dt,drl,t,t,d------d-t,l,t,dddd--dt,drl,t,zz-zdl,l,l,l,s,--s,s,t,t,drt,dt,ddd-t,ddt,-d +N3:mdrmfmrdddmfrmssssfisss--f-m-m-rrrmmmsfmss--fissdrmdd--ddsmdt,rs-f-mrmmfssss-fm +N4:dddd----f,s,-s,-ddrdt,l,s,s,d------l,-rr,s,dddd--drdt,l,s,s,drddf,--f,dddds,---s,-drddfmrds,-s,d, +E1:O for a thou_sand tongues to sing/my great Re_dee_mer's praise,/the glo_ries of my God and King,/the tri_umphs of his grace! +E2:My gra_cious Mas_ter and my God,/as_sist me to pro_claim,/to spread thro' all the earth a_broad/the ho_nors of your name. +E3:Je_sus! the name that charms our fears,/that bids our sor_rows cease,/'tis mu_sic in the sin_ner's ears,/'tis life and health and peace. +E4:He speaks; and, listen_ing to his voice,/New life the dead re_ceive,/The mourn_ful bro_ken hearts re_joice,/The humble poor re_lieve. +E5:Hear him, ye deaf; his praise, ye dumb,/Your loo_sened tongues em_ploy;/Ye blind, be_hold the Sa_viour come;/And leap, ye lame, for joy! +E6:He breaks the power of can_celled sin,/he sets the pri_soner free;/his blood can make the foul_est clean;/his blood a_vailed for me. +E7:To God all glo_ry, praise, and love/be now and e_ver given/by saints be_low and saints a_bove,/the Church in earth and heaven. +E8:I felt my Lord’s a_ton_ing blood/Close to my soul ap_plied;/Me, me He loved, the Son of God,/For me, for me He died! +E9:Look un_to Him, ye na_tions, Own/Your God, ye fal_len race;/Look, and be saved through faith a_lone,/Be jus_ti_fied by grace. +E10:See all your sins on Je_sus laid:/The Lamb of God was slain,/His soul was once an of_fer_ing/For e_ver soul of man./ diff --git a/composeApp/src/commonMain/composeResources/files/ews-2.txt b/composeApp/src/commonMain/composeResources/files/ews-2.txt index d68fd48..83ddd80 100644 --- a/composeApp/src/commonMain/composeResources/files/ews-2.txt +++ b/composeApp/src/commonMain/composeResources/files/ews-2.txt @@ -1,4 +1,4 @@ -M0:|c:Eb|m:4/4|r:8.6.8.6 C.M.|t:2 - My God how wonderful Thy are|n:12|l:8|a:Thomas Ravenscroft (1621)|h:Frederick William Faber (1848: 1814-1863)|x:https://hymnary.org/tune/dundee_ravenscroft|b:DUNDEE +M0:|c:Eb|m:4/4|r:8.6.8.6 C.M.|t:EWS 2 - My God how wonderful Thy are|n:12|l:8|a:Thomas Ravenscroft (1621)|h:Frederick William Faber (1848: 1814-1863)|x:https://hymnary.org/tune/dundee_ravenscroft|b:DUNDEE T0:{!D:-|M:F!S:D|R:M!F:-|-:-/M:-|R:D!D:T|D:-/S:-|D:T!L:S|S:F!S:-|-:-/M:-|R:(D.T)!D:T|D:-!} N1:dmfsdrmf/mrddt,d/sd'tlssFs/mrd-dt,d N2:s,dddl,t,dddt,l,l,s,s,/dmrdt,l,l,t,/s,l,m,f,s,s,s, diff --git a/composeApp/src/commonMain/composeResources/files/ews-3.txt b/composeApp/src/commonMain/composeResources/files/ews-3.txt index 05274bd..d7eb992 100644 --- a/composeApp/src/commonMain/composeResources/files/ews-3.txt +++ b/composeApp/src/commonMain/composeResources/files/ews-3.txt @@ -1,4 +1,4 @@ -M0:|c:G|m:4/4|r:8.8|t:3 - Thee, God, we praise|n:15|l:11.5|a:Niceta of Remesiana (1867-1937)|h:Genevan Psalter, 1551 Edition, attr. Louis Bourgeois (1510-1561)|x:https://hymnary.org/hymn/ELH1996/page/258|b:OLD 100TH +M0:|c:G|m:4/4|r:8.8|t:EWS 3 - Thee, God, we praise|n:15|l:11.5|a:Niceta of Remesiana (1867-1937)|h:Genevan Psalter, 1551 Edition, attr. Louis Bourgeois (1510-1561)|x:https://hymnary.org/hymn/ELH1996/page/258|b:OLD 100TH T0:{:D|M:F!S:D|R:F!M/M|R:M!(D.D):T|D:M!R/L|R:F!(S.D):D|L:T!D/D|M:D!R:(F.R)|(M.R):(R.R)!D:} N1:ddt,l,s,drm/mmmr-dfmr/drmr-dl,t,d/smdrf-m-r-d N2:s,l,s,f,m,m,s,s,/s,s,s,s,f,m,l,s,s,/m,s,s,s,-s,s,f,m,/s,s,F,s,l,-s,-s,f,m, diff --git a/composeApp/src/commonMain/composeResources/files/ews-4.txt b/composeApp/src/commonMain/composeResources/files/ews-4.txt index 91181ae..f191b66 100644 --- a/composeApp/src/commonMain/composeResources/files/ews-4.txt +++ b/composeApp/src/commonMain/composeResources/files/ews-4.txt @@ -1,4 +1,4 @@ -M0:|c:C|m:4/4|r:13.13.8.8.11|t:4 - Join the song of saints in glory|n:15|l:11.5|a:Josie Wallace (1914)|h:Isaac Hickman Meredith (1872-1962)|x:https://hymnary.org/page/fetch/SSM1914/49|b:OLD 100TH +M0:|c:C|m:4/4|r:13.13.8.8.11|t:EWS 4 - Join the song of saints in glory|n:15|l:11.5|a:Josie Wallace (1914)|h:Isaac Hickman Meredith (1872-1962)|x:https://hymnary.org/page/fetch/SSM1914/49|b:OLD 100TH T0:{|D:-.L!S:M|D:R!M:S/D:-.D!D:D|D:-!-:Z/M:-.R!D:R|M:R!D:M/R:-.R!R:R|R:-!-:Z/(S.S):(S.S)!(S.L):(S.T)|(S.S):(S.S)!(S.S)!(S.S)/(S.S):(S.S)!(S.S):(S.S)|(S.S):(S.S)!(S.S):(S.S)/D:-.D!R:R|M:D!D:L/(S:M)!(R:F)|D:-!-:Z/D:-.D!D:D|D/D.M!S.D:M.S|D:-.D!D:D|D:-!-:Z/R:-.R!R:R|R/R.S!T.R:S.T|R:-.R!R:R|R:-!-:Z/R:-!R:-|R:-!T:-|L:-!S:-|F:-/M:R|S:-!M:D|T:-!S:-|S:-!-:Z/} N1:d'lsmdrms|d'd'd'd'd'|m'r'd'r'm'r'd'm'|r'r'r'r'r'|z16|t--td'-d'-m'-r'-t-s-|d'd'r'r'm'd'd'ls-r'-d'|d'd'd'd'd'|dmsd'm's'd''d''d''d''d''|r'r'r'r'r'|rstr's't'r''r''r''r''r''|m'r'd'tlsf|mr(s---)ss- N2:d'lsmdrms|mmffm |ssssssss |ssFFf |z16|r--rm-m-s-f-r-f- |msssssffmmffm |mmffm |z6 d'd'd'd'd' |ssFFs |-6 r'r'r'r'r' |sfmrdmr |---ddt,rd- diff --git a/composeApp/src/commonMain/composeResources/files/ews-5.txt b/composeApp/src/commonMain/composeResources/files/ews-5.txt index f424c35..57fec9d 100644 --- a/composeApp/src/commonMain/composeResources/files/ews-5.txt +++ b/composeApp/src/commonMain/composeResources/files/ews-5.txt @@ -1,4 +1,4 @@ -M0:|c:D|m:3/4|r:8.7.8.7.4.7|t:5 - Praise, My Soul, The King Of Heaven|n:15|l:11.5|a:Thomas Hastings (1830: 1784-1872)|h:Henry Francis Lyte (1834: 1793-1847)|x:https://hymnary.org/page/fetch/OLOF2018/345/high|b:ZION +M0:|c:D|m:3/4|r:8.7.8.7.4.7|t:EWS 5 - Praise, My Soul, The King Of Heaven|n:15|l:11.5|a:Thomas Hastings (1830: 1784-1872)|h:Henry Francis Lyte (1834: 1793-1847)|x:https://hymnary.org/page/fetch/OLOF2018/345/high|b:ZION T0:{:S.,S|S:M:D.,S|L:S/D.,D|R.,R:D:T|D:-/S.,S|S:M:D.,S|L:S/D.,D|R.,R:D:T|D:-/M.,M|M:D/M.,M|R.,R:D:T|D:-/S.,S|S:M/S.,S|F.,F:M:R|M:-/} N1:sssmd'sls/d'd'r'r'd'td'/sssmd'sls/d'd'r'r'd'td'/mmmd/mmrrdt,d/sssm/ssffmrm N2:mmmdmmfm/ssffmrm/mmmdmmfm/ssffmrm/dddd/ddl,l,s,s,s,/mmmd/ddrrdt,d diff --git a/composeApp/src/commonMain/composeResources/files/ews-6.txt b/composeApp/src/commonMain/composeResources/files/ews-6.txt index 489a619..3bafcea 100644 --- a/composeApp/src/commonMain/composeResources/files/ews-6.txt +++ b/composeApp/src/commonMain/composeResources/files/ews-6.txt @@ -1,4 +1,4 @@ -M0:|c:E|m:4/4|r:12.13.11.11.|t:6 - Holy, Holy, Holy|n:15|l:12.5|a:John B. Dykes, 1823-1876|h:Reginald Heber, 1783-1826 +M0:|c:E|m:4/4|r:12.13.11.11.|t:EWS 6 - Holy, Holy, Holy|n:15|l:12.5|a:John B. Dykes, 1823-1876|h:Reginald Heber, 1783-1826 T0:{|D:R!M:F|(D:R)!(M:F)/[D:S.L]!M:F|(D:R)!M:-/D:(S.L)!M:F|D:R!M:F|D:R!M:-.F|(D:-!F):-/D:R!M:F|(D:R)!(M:F)/D:(S.L)!M:F|(D:R)!M:-/(D:R)!M:F|D:-!(M:F)/D:R!M:-.F|D:-!-:} N1:ddmms-s-/l-llls-m/s-sssd'd'tsrslss-/ddmms-s-/l-llls-s/d'-sslm-/frrdd N2:s,s,ddt,rdt,/l,t,-drm-d/rr-mrdrrmrt,dt,t,-/s,s,ddt,rdt,/l,t,-drm-d/d-ddddT,l,l,t,dd diff --git a/composeApp/src/commonMain/composeResources/files/ews-7.txt b/composeApp/src/commonMain/composeResources/files/ews-7.txt index 1b1fd9b..7ff806d 100644 --- a/composeApp/src/commonMain/composeResources/files/ews-7.txt +++ b/composeApp/src/commonMain/composeResources/files/ews-7.txt @@ -1,4 +1,4 @@ -M0:|c:G|m:6/4|r:7.8.7.8.7.6.7.6.7.6.7.6|t:7 - My Soul Now Praise Your Maker|n:15|l:11.5|a:Johann Poliander (1540); tr: Catherine Winkworth (1863: 1827-1878)|h:Johann Hans Kugelmann (1495-1542)|x:https://hymnary.org/page/fetch/LBoW1978/862/high|b:NUN LOB MEIN SEEL +M0:|c:G|m:6/4|r:7.8.7.8.7.6.7.6.7.6.7.6|t:EWS 7 - My Soul Now Praise Your Maker|n:15|l:11.5|a:Johann Poliander (1540); tr: Catherine Winkworth (1863: 1827-1878)|h:Johann Hans Kugelmann (1495-1542)|x:https://hymnary.org/page/fetch/LBoW1978/862/high|b:NUN LOB MEIN SEEL T0:{:D|D:-:T!L:-:S|(D:-:R)!M:-/M|M:-:M!M:-:R|(D:R):T!D:-/D|D:-:T!L:-:S|(D:-:R)!M:-/M|M:-:M!M:-:R|(D:R):T!D:-/D|D:-:M!R:-:M|(D:-:T)!L:-/L|R:-:T!D:(L:T)|(S:-:D!D):Z/S|D:-:D!(R:T):R|(M:-.L:T)!D:-/D|F:-:F!M:-:M|(R:-:M!F):Z/R|M:-:M!F:-:F|(S:-:S)!D:-/M|R:-:T!D:(L:T)|(S:-:R!R):Z/S|D:-:T!L:-:S|(R:-:D)!R:-/M|F:-:R!(D:M):R|D:-:-!-:Z} N1:ddt,l,s,drm/mmmmrd-t,d/ddt,l,s,drm/mmmmrd-t,d/ddmrmdt,l,/l,rt,dl,-s,--/s,ddr-rm--d/dffmmr--/rmmffs-d/mrt,dl,-s,--/sdt,l,s,r-r/mfmdmrd N2:s,l,s,f,r,s,l,d/s,dt,l,rs,-t,s,/s,l,s,f,r,s,l,d/s,dt,l,rs,-t,s,/l,s,dt,ml,s,m,/l,l,s,s,s,F,r,--/m,m,s,l,-s,s,--l,/s,f,l,t,l,l,--/t,ddl,drt,d/s,l,s,s,-F,r,--/m,m,s,f,m,s,F,s,/s,f,s,l,d,t,s, diff --git a/composeApp/src/commonMain/composeResources/files/ews-8.txt b/composeApp/src/commonMain/composeResources/files/ews-8.txt index 8377470..86abb16 100644 --- a/composeApp/src/commonMain/composeResources/files/ews-8.txt +++ b/composeApp/src/commonMain/composeResources/files/ews-8.txt @@ -1,4 +1,4 @@ -M0:|c:F|m:4/4|r:6.7.6.7.6.6.6.6|t:8 - Now thank we all our God|n:15|l:11.5|b:NUN DANKET|a:Johann Crüger, 1598-1662; harm. Felix Mendelssohn, 1809-1847|h:Martin Rinkart, 1586-1649; tr. Catherine Winkworth, 1827-1878|x:https://hymnary.org/tune/nun_danket_cruger_555665 +M0:|c:F|m:4/4|r:6.7.6.7.6.6.6.6|t:EWS 8 - Now thank we all our God|n:15|l:11.5|b:NUN DANKET|a:Johann Crüger, 1598-1662; harm. Felix Mendelssohn, 1809-1847|h:Martin Rinkart, 1586-1649; tr. Catherine Winkworth, 1827-1878|x:https://hymnary.org/tune/nun_danket_cruger_555665 T0:{:S|S:S!S:(D.R)|S:-!Z/(D.M)|(D.F):(D.S)!R:M|(D:L)!$QD/S|S:S!(D.T):L|S:-!Z/(R.D)|(R.M):M!(R.F):(R.S)|(R.L:T.D)!$QD/R|R:(R.T)!(M.D):(M.R)|R:-!Z/R|(M.F):S!(M.S):(M.L)|S:-!Z/(M.T)|L:(F.D)!F:M|F:-!Z/(F.R)|R:(F.M)!R:(F.F)|D:-|} N1:sssll-s/s-f-m-rmr-d/sssl-ls/s-f-mr-m-r---d/rrr-m-m-r/rmFsl-f-s/s-ls-fmf/m-rd-dt,-d N2:drddl,t,d/dt,l,t,d-t,ddt,d/drdd-dd/r-rdrrdt,T,t,-l,s,f,/s,l,t,l,s,-d-t,/rd-rd-t,-t,/t,-l,l,-l,Dr/dt,l,m,f,s,s,f,m, diff --git a/composeApp/src/commonMain/composeResources/files/ews-9.txt b/composeApp/src/commonMain/composeResources/files/ews-9.txt new file mode 100644 index 0000000..57d3e1a --- /dev/null +++ b/composeApp/src/commonMain/composeResources/files/ews-9.txt @@ -0,0 +1,10 @@ +M0:|t:EWS 9 The Lord Jehovah reigns (His throne is built on high)|a:Isaac Watts (1674-1748)|c:G|m:4/4|r:6.6.6.6.8.8. +U0:zC:(22)444(22)C/44444C/(22)4444(444)44(22)44C/48(62)888(62)C/4(44)(44)8(44)8(44)C/ +N1:s,-dddt,l,s,s,l,dt,rddrmmmms--mrd-t,l,s,s,rmrds,fsfms,l,t,drmsfmr-d +N2:s,f,m,m,s,s,f,m,s,f,l,s,f,m,m,s,s,s,s,s,d--dt,l,-s,fi,s,s,f,s,f,m,s,s,s,-s,s,f,-m,s,s,s,l,s,s,f,m, +N3:t,-dddd-dmffrt,ddt,ddddm--ssmfist,t,t,t,-dmrt,-ddt,mrdd-dt,-d +N4:s,-d,d,m,f,-d,d,f,r,s,s,d,ds,d,d,d,d,d,m,s,drr--rs,s,s,s,-d,dt,s,-dm,f,s,l,t,dm,f,s,s,-d, +E1:The Lord Je_ho_vah reigns;/His throne is built on high./The gar_ments He as_sumes/Are light and ma_jes_ty./His glo_ries shine with beams so bright/No mor_tal eye can bear the sight. +E2:The thun_ders of His hand/Keep the wide world in awe;/His wrath and jus_tice stand/To guard His ho_ly law./And where His love re_solves to bless/His truth con_firms and seals the grace. +E3:Thro’ all His migh_ty works/A_ma_zing wis_dom shines;/Con_founds the pow’r of hell,/And all their dark de_signs;/Strong is His arm and shall ful_fill/His great dec_rees and sove_reign will. +E4:And will this sove_reign King/Of glo_ry con_des_cend;/And will He write His Name,/My Fa_ther and my Friend?/I love His Name, I love His Word;/Join, all my pow’rs, to praise the Lord./ diff --git a/composeApp/src/commonMain/composeResources/files/ffpm-166-new.txt b/composeApp/src/commonMain/composeResources/files/ffpm-166-new.txt new file mode 100644 index 0000000..5effa81 --- /dev/null +++ b/composeApp/src/commonMain/composeResources/files/ffpm-166-new.txt @@ -0,0 +1,9 @@ +M0:|c:Eb|m:4/4 Marisidrisika|r:8.8.4.8.8.8.4.|t:FFPM 166 Derao ny Tompo lehibe|a:François d'Assise 1182-1226 Nad. H. Randzavola 1873-1953|h:(Geistliche Kirchengesang Költ. 1623) +U0:z0:844 4(22)44 (844)/(44)44 4444(444)/22 (44)4/22 (44)8/ (44)44 4444(844)/ (44)44 4444 (4224)/22 (44)422(44)4/22 (44)4/22 (422)4/${rit...}22(422)4$Q4/88 +N1:ddrmd-mfs--/d-drmdmfs--/#r dtl-sdtl-s/d-dssfmfs--/d-dssfmfs---/#d fmr-dfmr-d/#r dtl-s/dtl--s/fmr--#d d-/dd +N2:#s, sdddd-dddt-/d-std5-t/s'3fmdrmrt/s'fmmmrdddt-/drmfmddddtmr/dddtddddtl/mrmrt/mmmr-l/lddt-s-/ls +N3:mmfsm-lls--/slsfsslls--/#r ddd-dmssFs/d-dddssfrs-/s-sssdtls---/lllsslslfm/mssFs/sssf-m/fslsfm-/fm +N4:#s, dddddtlrss'f/mfmrdtlrss'f/mmf-dltdrs/mrdtltdlss'f/mfmrd#t,lsfmrdt#r,lsf-mrmfsl/ltdr's/ltdr'tD/#d rmfss,d-/f,f +Y1:Derao ny Tompo lehibe/Nahary\ izao rehetra\ izao/Halelo_ia, Halelo_ia,/Ny lanitra sy tany koa/Samia midera avokoa/${R=}Asandrato i\zao ny dera:/Halelo_ia, Halelo_ia, Halelo_ia!_2/Ame\na +Y2:Ry fo voadion’ny ràny soa,/Ankalazao ny Tompo tia!/Halelo_ia, Halelo_ia,/Ry vo_avela heloka\ ô,/Tsarovy re ny indrafo, +Y3:Miraisa fo ka miderà/Fa izy niahy hatrizay,/Halelo_ia, Halelo_ia,/Derao ny Ray sy Zanaka/Sy ny Fanahy Masina diff --git a/composeApp/src/commonMain/composeResources/files/ffpm-166.txt b/composeApp/src/commonMain/composeResources/files/ffpm-166.txt new file mode 100644 index 0000000..2d79336 --- /dev/null +++ b/composeApp/src/commonMain/composeResources/files/ffpm-166.txt @@ -0,0 +1,9 @@ +M0:|c:Eb|m:4/4 Marisidrisika|r:8.8.4.8.8.8.4.|t:FFPM 166 Derao ny Tompo lehibe|a:François d'Assise 1182-1226 Nad. H. Randzavola 1873-1953|h:(Geistliche Kirchengesang Költ. 1623) +U0:z0:844 4(22)44 (844)/(44)44 4444(444)/22 (44)4/22 (44)8/ (44)44 4444(844)/ (44)44 4444 (4224)/22 (44)422(44)4/22 (44)4/22 (422)4/${rit...}22(422)4$Q4/88 +N1:ddrmd-mfs--/d-drmdmfs--/#r dtl-sdtl-s/d-dssfmfs--/d-dssfmfs---/#d fmr-dfmr-d/#r dtl-s/dtl--s/fmr--#d d-/dd +N2:#s, sdddd-dddt-/d-std5-t/s'3fmdrmrt/s'fmmmrdddt-/drmfmddddtmr/dddtddddtl/mrmrt/mmmr-l/lddt-s-/ls +N3:mmfsm-lls--/slsfsslls--/#r ddd-dmssFs/d-dddssfrs-/s-sssdtls---/lllsslslfm/mssFs/sssf-m/fslsfm-/fm +N4:#s, dddddtlrss'f/mfmrdtlrss'f/mmf-dltdrs/mrdtltdlss'f/mfmrd#t,lsfmrdt#r,lsf-mrmfsl/ltdr's/ltdr'tD/#d rmfss,d-/f,d +Y1:Derao ny Tompo lehibe/Nahary\ izao rehetra\ izao/Halelo_ia, Halelo_ia,/Ny lanitra sy tany koa/Samia midera avokoa/${R=}Asandrato i\zao ny dera:/Halelo_ia, Halelo_ia, Halelo_ia!_2/Ame\na +Y2:Ry fo voadion’ny ràny soa,/Ankalazao ny Tompo tia!/Halelo_ia, Halelo_ia,/Ry vo_avela heloka\ ô,/Tsarovy re ny indrafo, +Y3:Miraisa fo ka miderà/Fa izy niahy hatrizay,/Halelo_ia, Halelo_ia,/Derao ny Ray sy Zanaka/Sy ny Fanahy Masina diff --git a/composeApp/src/commonMain/composeResources/files/ffpm-194.txt b/composeApp/src/commonMain/composeResources/files/ffpm-194.txt index 1fa2769..c19809b 100644 --- a/composeApp/src/commonMain/composeResources/files/ffpm-194.txt +++ b/composeApp/src/commonMain/composeResources/files/ffpm-194.txt @@ -5,3 +5,6 @@ N2:s,s,s,s,s,s,s,s,s,l,l,l,l,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s, N3:mmmmmmmdmmmrrrrmmrmfmrmrdmrmfmrmrd N4:dddddddddl,l,f,r,s,s,dds,s,s,s,dddds,s,s,s,ddd Y1:Andri_ananahary ô, Endrey ny voninahitrao!${D:Ny tany sy ny lanitra Mamelatra ny lazanao}/Ny asanao rehetra, e!Ny famonjena lehibe, ${D:Mitari-dalana anay, Hidera ny Anaranao} +Y2:Ry Zanak’ondry Masina,/Jesosy\ izay isaoranay!/${D:He, I_anao ni_antra\ anay/Ka nentinao ny otanay;/}Ny menarana resinao,/Ny fasana vinakinao/${D:Ka I_anao nanokatra/Ny lanitra hidiranay!} +Y3:Ô, ry Fanahy Masina/Izay mitarika anay/${D:Hanetry tena sy hanaiky/Fa mpanota izahay;/}Mitaona sy mananatra anay/Handray ny avotra/${D:Ka manamasina anay,/Mba raiso ny fisaoranay!} +Y4:Ny vo_avonjy mbamin’ny/Anjely mankasitraka;/${D:Ny tany sy ny lanitra/Mikambana hanandratra/}Anao, ry Ray sy Zanaka,/Anao Fanahy Masina/${D:Izay maneho famonjena/Feno fiti_avana!} \ No newline at end of file diff --git a/composeApp/src/commonMain/composeResources/files/ffpm-56-new.txt b/composeApp/src/commonMain/composeResources/files/ffpm-56-new.txt new file mode 100644 index 0000000..05dd4f6 --- /dev/null +++ b/composeApp/src/commonMain/composeResources/files/ffpm-56-new.txt @@ -0,0 +1,14 @@ +M0:|c:F|m:4/4|t:FFPM 56 Manatona Anao izao|a:H.A. Brorson, 1694-1764 Nad. C. Borchgrevink 1841-1919|r:L.M.|h:J.A.P. Schulz, 1747-1800 +U0:zC:(22) 4444 624/(22) 4444 624/(22) 4444 44$Q4/4 4444 88 C +N1:drmmffmrd/ dmssllsfm/ mrddffrrs/ mfrmdl, t, d +N2:#m, d-sllssfm/ d-ttdrtrd/ t-l4s3/ llsmsfss +N3:#t,d-dddrds,d/ mdrmffrss/ s-mmrrttd/ drttddrm +N4:#r, d-dlffssd/ l-ssffstd/ m'-lsfrsfm/ lrsmmlsm' +Y1:Manatona Anao izao,/Ry Jeso, ny madinikao,/Ampandrosy ny di_anay/Fa ta hahita\ Anao i\zahay! +Y2:Hidera ny Anaranao/No zava-ti_anay hatao;/Miravoravo izahay/Fa teraka ny Tomponay. +Y3:Ny lanitra nilaozanao/Hanavotra ny olonao,/Ho zanak’Andriamanitra/Hifaly ao an-danitra. +Y4:Tsy takatray heverina/Ny fiti_avan-dalina,/Izay nitiavanao anay/Ka dia misaotra\ Anao i\zahay! +Y5:Tariho, Tompo, izahay,/Ambinonao ny di_anay;/Fa samy ta handray Anao/I\zahay mivory eto i\zao! +Y6:O, ry Sakaiza maminay,/Mba te ho olonao i\zahay/Hipetraka\ eo anilanao/Fa mamy ny fiti_anao! +Y7:Ra\ha manana Anao i\zahay/Tsy hisy hatahoranay,/Fa zaza vo_amarikao/Ho isan’ny arovanao. +Y8:Ra\ha ao an-danitra vaovao/I\zahay sy ny anjelinao,/Hisaotra sy hidera\ Anao/Manatrika ny tavanao! diff --git a/composeApp/src/commonMain/composeResources/files/ffpm-56.txt b/composeApp/src/commonMain/composeResources/files/ffpm-56.txt new file mode 100644 index 0000000..4e8495f --- /dev/null +++ b/composeApp/src/commonMain/composeResources/files/ffpm-56.txt @@ -0,0 +1,14 @@ +M0:|c:F|m:4/4|t:FFPM 56 Manatona Anao izao|a:H.A. Brorson, 1694-1764 Nad. C. Borchgrevink 1841-1919|r:L.M.|h:J.A.P. Schulz, 1747-1800 +U0:zC:(22)4(22)44 624/44444 624/(22) 4444 44$Q4/4 4444 88 C +N1:drmm-ffmrd/ dssllsfm/ mrddffrrs/ mfrmdl, t, d +N2:#m, d-ss-lssfm/ d4rm'rd/ t-l4ttd/ drtdslss +N3:#t,d-dd-drdtd/ dmsffmss/ s-mmffsss/ llssddfm +N4:#s, d-ddtltdsd/ ddmftdsd/ m-llrrs#d,fm/ lfsdmfsd +Y1:Manatona Anao izao,/Ry Jeso, ny madinikao,/Ampandrosy ny di_anay/Fa ta hahita\ Anao i\zahay! +Y2:Hidera ny Anaranao/No zava-ti_anay hatao;/Miravoravo izahay/Fa teraka ny Tomponay. +Y3:Ny lanitra nilaozanao/Hanavotra ny olonao,/Ho zanak’Andriamanitra/Hifaly ao an-danitra. +Y4:Tsy takatray heverina/Ny fiti_avan-dalina,/Izay nitiavanao anay/Ka dia misaotra\ Anao i\zahay! +Y5:Tariho, Tompo, izahay,/Ambinonao ny di_anay;/Fa samy ta handray Anao/I\zahay mivory eto i\zao! +Y6:O, ry Sakaiza maminay,/Mba te ho olonao i\zahay/Hipetraka\ eo anilanao/Fa mamy ny fiti_anao! +Y7:Ra\ha manana Anao i\zahay/Tsy hisy hatahoranay,/Fa zaza vo_amarikao/Ho isan’ny arovanao. +Y8:Ra\ha ao an-danitra vaovao/I\zahay sy ny anjelinao,/Hisaotra sy hidera\ Anao/Manatrika ny tavanao! diff --git a/composeApp/src/commonMain/composeResources/files/ffpm-57-new.txt b/composeApp/src/commonMain/composeResources/files/ffpm-57-new.txt new file mode 100644 index 0000000..7cf6977 --- /dev/null +++ b/composeApp/src/commonMain/composeResources/files/ffpm-57-new.txt @@ -0,0 +1,11 @@ +M0:|c:G|m:4/4|t:FFPM 57 Izao Noely mamy izao|h:P. Nilsen-Lund 1842-1914|a:H.A. Brorson 1694-1764 Nad. C. Borchgrevink 1841-1919|r:8.7.8.7.8.8.7.8.8.7 +U0:zC:4 4444 442z2/4 6244 8${DC}2z2/4 4444 622z2/4 4444 622z2/4 4444 82z2/4 4444 622z2/4 4444 622z2/4 4444 8$Q4 +N1:#s,slsdsrsm/ #l,smrddrm/ mdltdrmf/ smdrmfsl'/ rsdfmrm/ mdltdrmf/ smdrmfsl'/ rsdfmrd +N2:#m,sls6/ tttlmss/ SmlSl4/ tsdtd4/ tdltdtt/ SmlSl4/ tsdtd4/ tdltdts +N3:#s,slsdstsd/ rmmmdtd/ tdmrmrDr/ #t,rmsfsfmf/ ssffslS/ tdmrmrDr/ rmsfsfmf/ ssffsfm +N4:#d,slsmsrsd/ sSSllsd/ #m, mldtFflr/ sdmr#s,dldf/ fmfrdfm/ m, ldtlf, lr/ sdmrdldf/ fmfrdsd +Y1:Izao No_ely mamy\ izao/No ihobi_antsika/${D:Fa noresen’ny aim-baovao/Ny fa\hafatesantsika:/}Ny Zanak’Andriamanitra,/I\zay Tompom-boninahitra,/Nandao ny lapan-dRainy/Nateraka ho olona/Hamonjy sy hamelona/Antsika sombin’ny\ ainy. +Y2:Velomy ny fisaorana,/Na kely monja aza,/${D:Ka aoka\ izay navotana/Hi_ara-hankalaza/}Ny Zanak’Andriamanitra/Ni_ala tao an-danitra/Hanafaka\ alahelo;/Ry vo_avonjy ô! derao/Jesosy I\lay Mpanjakanao/He, gaina\ izao ny helo! +Y3:Izao Andri_amanitra/Dia faly, amintsika:/${D:Jesosy, Tompon-danitra./No tonga namantsika;/}Ho re hatrany lavitra/Fa fo_in’Andriamanitra/I\lay sitraky ny fony/Hitondra fahori_ana,/Hi_ari-pijali_ana/Ho solon’ny mpikomy +Y4:Na di_a tratry ny manjo,/I\zay mampiferin’aina,/${D:Izaho tsy hamo_y fo,/Fa manan-kantenaina;/}Jesosy di_a Zokiko,/Ka tsy hohadino_iko,/Fa Izy ti_a ahy;/Ny tenim-pi_adanany/No hery anohanany/Ny foko, i\zay manahy. +Y5:Halelo_ia, fa tapitra/Ny fahori_antsika!/${D:Derao Andri_amanitra,/I\zay efa tia antsika/}O, ry fanahiko, derao/Jesosy, I\zay Mpamonjinao,/Harena tsy ho lany./Halelo_ia, halelo_ia!/Fa azo ny Mpanavotra,/Anao ny fanjakany! diff --git a/composeApp/src/commonMain/composeResources/files/ffpm-57.txt b/composeApp/src/commonMain/composeResources/files/ffpm-57.txt new file mode 100644 index 0000000..d4eba97 --- /dev/null +++ b/composeApp/src/commonMain/composeResources/files/ffpm-57.txt @@ -0,0 +1,11 @@ +M0:|c:G|m:4/4|t:FFPM 57 Izao Noely mamy izao|h:P. Nilsen-Lund 1842-1914|a:H.A. Brorson 1694-1764 Nad. C. Borchgrevink 1841-1919|r:8.7.8.7.8.8.7.8.8.7 +U0:zC:4 4444 442z2/4 6244 8${DC}2z2/4 4444 622z2/4 4444 622z2/4 4444 82z2/4 4444 622z2/4 4444 622z2/4 4444 8$Q4 +N1:#s,slsdsrsm/ #l,smrddrm/ mdltdrmf/ smdrmfsl'/ rsdfmrm/ mdltdrmf/ smdrmfsl'/ rsdfmrd +N2:#m,sls6/ tttlmss/ SmlSl4/ tsdtd4/ tdltdtt/ SmlSl4/ tsdtd4/ tdltdts +N3:#s,slsdstsd/ rmmmdtd/ tdmrmrDr/ #t,rmsfsfmf/ ssffslS/ tdmrmrDr/ rmsfsfmf/ ssffsfm +N4:#d,slsmsrsd/ sSSllsd/ #m, mldtlflr/ sdmr#s,dldf/ fmmrdfm/ m, ldtlf, lr/ sdmrdldf/ fmmrdsd +Y1:Izao No_ely mamy\ izao/No ihobi_antsika/${D:Fa noresen’ny aim-baovao/Ny fa\hafatesantsika:/}Ny Zanak’Andriamanitra,/I\zay Tompom-boninahitra,/Nandao ny lapan-dRainy/Nateraka ho olona/Hamonjy sy hamelona/Antsika sombin’ny\ ainy. +Y2:Velomy ny fisaorana,/Na kely monja aza,/${D:Ka aoka\ izay navotana/Hi_ara-hankalaza/}Ny Zanak’Andriamanitra/Ni_ala tao an-danitra/Hanafaka\ alahelo;/Ry vo_avonjy ô! derao/Jesosy I\lay Mpanjakanao/He, gaina\ izao ny helo! +Y3:Izao Andri_amanitra/Dia faly, amintsika:/${D:Jesosy, Tompon-danitra./No tonga namantsika;/}Ho re hatrany lavitra/Fa fo_in’Andriamanitra/I\lay sitraky ny fony/Hitondra fahori_ana,/Hi_ari-pijali_ana/Ho solon’ny mpikomy +Y4:Na di_a tratry ny manjo,/I\zay mampiferin’aina,/${D:Izaho tsy hamo_y fo,/Fa manan-kantenaina;/}Jesosy di_a Zokiko,/Ka tsy hohadino_iko,/Fa Izy ti_a ahy;/Ny tenim-pi_adanany/No hery anohanany/Ny foko, i\zay manahy. +Y5:Halelo_ia, fa tapitra/Ny fahori_antsika!/${D:Derao Andri_amanitra,/I\zay efa tia antsika/}O, ry fanahiko, derao/Jesosy, I\zay Mpamonjinao,/Harena tsy ho lany./Halelo_ia, halelo_ia!/Fa azo ny Mpanavotra,/Anao ny fanjakany! diff --git a/composeApp/src/commonMain/kotlin/mg/dot/feufaro/musicXML/MXAccent.kt b/composeApp/src/commonMain/kotlin/mg/dot/feufaro/musicXML/MXAccent.kt new file mode 100644 index 0000000..1735d33 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/mg/dot/feufaro/musicXML/MXAccent.kt @@ -0,0 +1,54 @@ +package mg.dot.feufaro.musicXML + +import kotlinx.serialization.Serializable +import nl.adaptivity.xmlutil.serialization.XmlElement +import nl.adaptivity.xmlutil.serialization.XmlSerialName + +@Serializable +@XmlSerialName("accent", "", "") +data class MXAccent ( + @Serializable + var color: String? = null, + @Serializable + @XmlSerialName("default-x", "", "") + var defaultX: String? = null, + @Serializable + @XmlSerialName("default-y", "", "") + var defaultY: String? = null, + @Serializable + @XmlSerialName("font-family", "", "") + var fontFamily: String? = null, + @Serializable + @XmlSerialName("font-size", "", "") + var fontSize: String? = null, + @Serializable + @XmlSerialName("font-style", "", "") + var fontStyle: String? = null, + @Serializable + @XmlSerialName("font-weight", "", "") + var fontWeight: String? = null, + @Serializable + @XmlSerialName("placement", "", "") + var placement: String? = null, + @Serializable + @XmlSerialName("relative-x", "", "") + var relativeX: String? = null, + @Serializable + @XmlSerialName("relative-y", "", "") + var relativeY: String? = null, + @Serializable + @XmlSerialName("line-type", "", "") + var lineType: String? = null, + @Serializable + @XmlSerialName("line-length", "", "") + var lineLength: String? = null, + @Serializable + @XmlSerialName("line-shape", "", "") + var lineShape: String? = null, + @Serializable + @XmlSerialName("dash-length", "", "") + var dashLength: String? = null, + @Serializable + @XmlSerialName("space-length", "", "") + var spaceLength: String? = null, +) \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/mg/dot/feufaro/musicXML/MXArticulations.kt b/composeApp/src/commonMain/kotlin/mg/dot/feufaro/musicXML/MXArticulations.kt new file mode 100644 index 0000000..c85734b --- /dev/null +++ b/composeApp/src/commonMain/kotlin/mg/dot/feufaro/musicXML/MXArticulations.kt @@ -0,0 +1,67 @@ +package mg.dot.feufaro.musicXML + +import kotlinx.serialization.Serializable +import nl.adaptivity.xmlutil.serialization.XmlElement +import nl.adaptivity.xmlutil.serialization.XmlSerialName + +@Serializable +@XmlSerialName("articulations", "", "") +data class MXArticulations ( + @Serializable + @XmlElement + var accent: MXAccent? = null, + @Serializable + @XmlElement + @XmlSerialName("strong-accent", "", "") + var strongAccent: MXAccent? = null, + @Serializable + @XmlElement + var staccato: MXAccent? = null, + @Serializable + @XmlElement + var tenuto: MXAccent? = null, + @Serializable + @XmlElement + @XmlSerialName("detached-legato", "", "") + var detachedLegato: MXAccent? = null, + @Serializable + @XmlElement + var staccatissimo: MXAccent? = null, + @Serializable + @XmlElement + var spiccato: MXAccent? = null, + @Serializable + @XmlElement + var scoop: MXAccent? = null, + @Serializable + @XmlElement + var plop: MXAccent? = null, + @Serializable + @XmlElement + var doit: MXAccent? = null, + @Serializable + @XmlElement + var falloff: MXAccent? = null, + @Serializable + @XmlElement + @XmlSerialName("breath-mark", "", "") + var breathMark: MXAccent? = null, + @Serializable + @XmlElement + var caesura: MXAccent? = null, + @Serializable + @XmlElement + var stress: MXAccent? = null, + @Serializable + @XmlElement + var unstress: MXAccent? = null, + @Serializable + @XmlElement + @XmlSerialName("soft-accent", "", "") + var softAccent: MXAccent? = null, + @Serializable + @XmlElement + @XmlSerialName("other-articulation", "", "") + var otherArticulation: MXOtherArticulation? = null, + +) diff --git a/composeApp/src/commonMain/kotlin/mg/dot/feufaro/musicXML/MXBarLine.kt b/composeApp/src/commonMain/kotlin/mg/dot/feufaro/musicXML/MXBarLine.kt new file mode 100644 index 0000000..bd0edb8 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/mg/dot/feufaro/musicXML/MXBarLine.kt @@ -0,0 +1,42 @@ +package mg.dot.feufaro.musicXML + +import kotlinx.serialization.Serializable +import nl.adaptivity.xmlutil.serialization.XmlElement +import nl.adaptivity.xmlutil.serialization.XmlSerialName + +@Serializable +@XmlSerialName("barline ", "", "") +data class MXBarLine ( + @Serializable var coda: String? = null, + @Serializable var divisions: String? = null, + @Serializable var id: String? = null, + @Serializable var location: String? = null, + @Serializable var segno: String? = null, + @Serializable + @XmlElement + @XmlSerialName("bar-style", "", "") + var barStyle: String? = null, + @Serializable + @XmlElement + var footnote: MXFootNote? = null, + @Serializable + @XmlElement + var level: MXLevel? = null, + @Serializable + @XmlElement + @XmlSerialName("wavy-line", "", "") + var wavyLine: MXWavyLine? = null, + @Serializable + @XmlElement + @XmlSerialName("segno", "", "") + var segnoElement: String? = null, // @todo MXSegno + @Serializable + @XmlElement + var fermata: String? = null, // @todo MXFermata + @Serializable + @XmlElement + var ending: MXEnding? = null, + @Serializable + @XmlElement + var repeat: MXRepeat? = null, +) diff --git a/composeApp/src/commonMain/kotlin/mg/dot/feufaro/musicXML/MXEnding.kt b/composeApp/src/commonMain/kotlin/mg/dot/feufaro/musicXML/MXEnding.kt new file mode 100644 index 0000000..854bfea --- /dev/null +++ b/composeApp/src/commonMain/kotlin/mg/dot/feufaro/musicXML/MXEnding.kt @@ -0,0 +1,58 @@ +package mg.dot.feufaro.musicXML + +import kotlinx.serialization.Serializable +import nl.adaptivity.xmlutil.serialization.XmlElement +import nl.adaptivity.xmlutil.serialization.XmlSerialName +import nl.adaptivity.xmlutil.serialization.XmlValue + +@Serializable +@XmlSerialName("ending", "", "") +data class MXEnding ( + @Serializable var number: String = "", + @Serializable var type: String = "", + @Serializable + var color: String? = null, + @Serializable + @XmlSerialName("default-x", "", "") + var defaultX: String? = null, + @Serializable + @XmlSerialName("default-y", "", "") + var defaultY: String? = null, + @Serializable + @XmlSerialName("end-length", "", "") + var endLength: String? = null, + @Serializable + @XmlSerialName("font-family", "", "") + var fontFamily: String? = null, + @Serializable + @XmlSerialName("font-size", "", "") + var fontSize: String? = null, + @Serializable + @XmlSerialName("font-style", "", "") + var fontStyle: String? = null, + @Serializable + @XmlSerialName("font-weight", "", "") + var fontWeight: String? = null, + @Serializable + @XmlSerialName("print-object", "", "") + var printObject: String? = null, + @Serializable + @XmlSerialName("relative-x", "", "") + var relativeX: String? = null, + @Serializable + @XmlSerialName("relative-y", "", "") + var relativeY: String? = null, + @Serializable + @XmlSerialName("system-relation", "", "") + var systemRelation: String? = null, + @Serializable + @XmlSerialName("text-x", "", "") + var textX: String? = null, + @Serializable + @XmlSerialName("text-y", "", "") + var textY: String? = null, + @Serializable + @XmlValue + @XmlSerialName("content", "", "") + var content: String? = null, +) \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/mg/dot/feufaro/musicXML/MXFootNote.kt b/composeApp/src/commonMain/kotlin/mg/dot/feufaro/musicXML/MXFootNote.kt new file mode 100644 index 0000000..5046e03 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/mg/dot/feufaro/musicXML/MXFootNote.kt @@ -0,0 +1,73 @@ +package mg.dot.feufaro.musicXML + +import kotlinx.serialization.Serializable +import nl.adaptivity.xmlutil.serialization.XmlElement +import nl.adaptivity.xmlutil.serialization.XmlSerialName +import nl.adaptivity.xmlutil.serialization.XmlValue + +@Serializable +@XmlSerialName("footnote", "", "") +data class MXFootNote ( + @Serializable + var color: String? = null, + @Serializable + @XmlSerialName("default-x", "", "") + var defaultX: String? = null, + @Serializable + @XmlSerialName("default-y", "", "") + var defaultY: String? = null, + @Serializable var dir: String? = null, + @Serializable var enclosure: String? = null, + @Serializable + @XmlSerialName("font-family", "", "") + var fontFamily: String? = null, + @Serializable + @XmlSerialName("font-size", "", "") + var fontSize: String? = null, + @Serializable + @XmlSerialName("font-style", "", "") + var fontStyle: String? = null, + @Serializable + @XmlSerialName("font-weight", "", "") + var fontWeight: String? = null, + @Serializable + @XmlSerialName("halign", "", "") + var hAlign: String? = null, + @Serializable + var justify: String? = null, + @Serializable + @XmlSerialName("letter-spacing", "", "") + var letterSpacing: String? = null, + @Serializable + @XmlSerialName("line-height", "", "") + var lineHeight: String? = null, + @Serializable + @XmlSerialName("line-through", "", "") + var lineThrough: String? = null, + @Serializable + var overline: String? = null, + @Serializable + @XmlSerialName("relative-x", "", "") + var relativeX: String? = null, + @Serializable + @XmlSerialName("relative-y", "", "") + var relativeY: String? = null, + @Serializable + @XmlSerialName("rotation", "", "") + var rotation: String? = null, + @Serializable + @XmlSerialName("underline", "", "") + var underline: String? = null, + @Serializable + @XmlSerialName("valign", "", "") + var vAlign: String? = null, + @Serializable + @XmlSerialName("lang", "http://www.w3.org/XML/1998/namespace", "xml") + var xmlLang: String? = null, + @Serializable + @XmlSerialName("space", "http://www.w3.org/XML/1998/namespace","xml") + var xmlSpace: String? = null, + @Serializable + @XmlValue + @XmlSerialName("content", "", "") + var content: String? = null) \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/mg/dot/feufaro/musicXML/MXLevel.kt b/composeApp/src/commonMain/kotlin/mg/dot/feufaro/musicXML/MXLevel.kt new file mode 100644 index 0000000..5bfd31d --- /dev/null +++ b/composeApp/src/commonMain/kotlin/mg/dot/feufaro/musicXML/MXLevel.kt @@ -0,0 +1,25 @@ +package mg.dot.feufaro.musicXML + +import kotlinx.serialization.Serializable +import nl.adaptivity.xmlutil.serialization.XmlSerialName +import nl.adaptivity.xmlutil.serialization.XmlValue + +@Serializable +@XmlSerialName("level", "", "") +data class MXLevel ( + @Serializable + @XmlSerialName("bracket", "", "") + var bracket: String? = null, + @Serializable + var parentheses: String? = null, + @Serializable + var reference: String? = null, + @Serializable + var size: String? = null, + @Serializable + var type: String? = null, + @Serializable + @XmlValue + @XmlSerialName("content", "", "") + var content: String? = null +) diff --git a/composeApp/src/commonMain/kotlin/mg/dot/feufaro/musicXML/MXMeasure.kt b/composeApp/src/commonMain/kotlin/mg/dot/feufaro/musicXML/MXMeasure.kt index f4afd86..0d7a00f 100644 --- a/composeApp/src/commonMain/kotlin/mg/dot/feufaro/musicXML/MXMeasure.kt +++ b/composeApp/src/commonMain/kotlin/mg/dot/feufaro/musicXML/MXMeasure.kt @@ -41,4 +41,7 @@ data class MXMeasure ( @XmlElement @XmlSerialName("forward", "", "") var forward: MXForward? = null, +@XmlElement +@XmlSerialName("barline", "", "") +var barLine: MXBarLine? = null, ) diff --git a/composeApp/src/commonMain/kotlin/mg/dot/feufaro/musicXML/MXNotations.kt b/composeApp/src/commonMain/kotlin/mg/dot/feufaro/musicXML/MXNotations.kt index ffed50c..4db778e 100644 --- a/composeApp/src/commonMain/kotlin/mg/dot/feufaro/musicXML/MXNotations.kt +++ b/composeApp/src/commonMain/kotlin/mg/dot/feufaro/musicXML/MXNotations.kt @@ -10,5 +10,8 @@ data class MXNotations ( @Serializable @XmlElement @XmlSerialName("slur", "", "") - var slur: MXSlur? = null + var slur: List? = null, +@Serializable +@XmlElement + var articulation: List = listOf() ) diff --git a/composeApp/src/commonMain/kotlin/mg/dot/feufaro/musicXML/MXNote.kt b/composeApp/src/commonMain/kotlin/mg/dot/feufaro/musicXML/MXNote.kt index e7f6052..7683554 100644 --- a/composeApp/src/commonMain/kotlin/mg/dot/feufaro/musicXML/MXNote.kt +++ b/composeApp/src/commonMain/kotlin/mg/dot/feufaro/musicXML/MXNote.kt @@ -80,5 +80,5 @@ var timeModification: MXTimeModification? = null, var unpitched: String? = null, @Serializable @XmlElement -var rest: String? = null, +var rest: MXRest? = null, ) diff --git a/composeApp/src/commonMain/kotlin/mg/dot/feufaro/musicXML/MXOtherArticulation.kt b/composeApp/src/commonMain/kotlin/mg/dot/feufaro/musicXML/MXOtherArticulation.kt new file mode 100644 index 0000000..348dcba --- /dev/null +++ b/composeApp/src/commonMain/kotlin/mg/dot/feufaro/musicXML/MXOtherArticulation.kt @@ -0,0 +1,45 @@ +package mg.dot.feufaro.musicXML + +import kotlinx.serialization.Serializable +import nl.adaptivity.xmlutil.serialization.XmlSerialName +import nl.adaptivity.xmlutil.serialization.XmlValue + +@Serializable +@XmlSerialName("other-articulation", "", "") +data class MXOtherArticulation ( + @Serializable + var color: String? = null, + @Serializable + @XmlSerialName("default-x", "", "") + var defaultX: String? = null, + @Serializable + @XmlSerialName("default-y", "", "") + var defaultY: String? = null, + @Serializable + @XmlSerialName("font-family", "", "") + var fontFamily: String? = null, + @Serializable + @XmlSerialName("font-size", "", "") + var fontSize: String? = null, + @Serializable + @XmlSerialName("font-style", "", "") + var fontStyle: String? = null, + @Serializable + @XmlSerialName("font-weight", "", "") + var fontWeight: String? = null, + @Serializable + @XmlSerialName("placement", "", "") + var placement: String? = null, + @Serializable + @XmlSerialName("relative-x", "", "") + var relativeX: String? = null, + @Serializable + @XmlSerialName("relative-y", "", "") + var relativeY: String? = null, + @Serializable + var smufl: String? = null, + @Serializable + @XmlValue + @XmlSerialName("content", "", "") + var content: String? = null +) \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/mg/dot/feufaro/musicXML/MXRepeat.kt b/composeApp/src/commonMain/kotlin/mg/dot/feufaro/musicXML/MXRepeat.kt new file mode 100644 index 0000000..05b1ead --- /dev/null +++ b/composeApp/src/commonMain/kotlin/mg/dot/feufaro/musicXML/MXRepeat.kt @@ -0,0 +1,18 @@ +package mg.dot.feufaro.musicXML + +import kotlinx.serialization.Serializable +import nl.adaptivity.xmlutil.serialization.XML +import nl.adaptivity.xmlutil.serialization.XmlSerialName +import nl.adaptivity.xmlutil.serialization.XmlValue + +@Serializable +@XmlSerialName("repeat", "", "") +data class MXRepeat ( + @Serializable + var direction: String? = null, + @Serializable + @XmlSerialName("after-jump", "", "") + var afterJump: String? = null, + @Serializable var times: String? = null, + @Serializable var winged: String? = null +) diff --git a/composeApp/src/commonMain/kotlin/mg/dot/feufaro/musicXML/MXRest.kt b/composeApp/src/commonMain/kotlin/mg/dot/feufaro/musicXML/MXRest.kt index d12af3a..503a86b 100644 --- a/composeApp/src/commonMain/kotlin/mg/dot/feufaro/musicXML/MXRest.kt +++ b/composeApp/src/commonMain/kotlin/mg/dot/feufaro/musicXML/MXRest.kt @@ -8,9 +8,11 @@ import nl.adaptivity.xmlutil.serialization.XmlSerialName @XmlSerialName("rest ", "", "") data class MXRest ( @Serializable +@XmlElement @XmlSerialName("display-step", "", "") var displayStep: String? = null, @Serializable +@XmlElement @XmlSerialName("display-octave", "", "") var displayOctave: Int? = null, ) diff --git a/composeApp/src/commonMain/kotlin/mg/dot/feufaro/musicXML/MXWavyLine.kt b/composeApp/src/commonMain/kotlin/mg/dot/feufaro/musicXML/MXWavyLine.kt new file mode 100644 index 0000000..46aa7a1 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/mg/dot/feufaro/musicXML/MXWavyLine.kt @@ -0,0 +1,44 @@ +package mg.dot.feufaro.musicXML + +import kotlinx.serialization.Serializable +import nl.adaptivity.xmlutil.serialization.XmlElement +import nl.adaptivity.xmlutil.serialization.XmlSerialName + +@Serializable +@XmlSerialName("wavy-line", "", "") +data class MXWavyLine ( + @Serializable var type: String? = null, + @Serializable var accelerate: String? = null, + @Serializable var beats: String? = null, + @Serializable var color: String? = null, + @Serializable + @XmlSerialName("default-x", "", "") + var defaultX: String? = null, + @Serializable + @XmlSerialName("default-y", "", "") + var defaultY: String? = null, + @Serializable + @XmlSerialName("last-beat", "", "") + var lastBeat: String? = null, + @Serializable var number: String? = null, + @Serializable var placement: String? = null, + @Serializable + @XmlSerialName("relative-x", "", "") + var relativeX: String? = null, + @Serializable + @XmlSerialName("relative-y", "", "") + var relativeY: String? = null, + @Serializable + @XmlSerialName("second-beat", "", "") + var secondBeat: String? = null, + @Serializable var smufl: String? = null, + @Serializable + @XmlSerialName("start-note", "", "") + var startNote: String? = null, + @Serializable + @XmlSerialName("trill-step", "", "") + var trillStep: String? = null, + @Serializable + @XmlSerialName("two-note-turn", "", "") + var twoNoteTurn: String? = null, +) \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/mg/dot/feufaro/musicXML/MusicXML.kt b/composeApp/src/commonMain/kotlin/mg/dot/feufaro/musicXML/MusicXML.kt index 0fd4aca..49dcee3 100644 --- a/composeApp/src/commonMain/kotlin/mg/dot/feufaro/musicXML/MusicXML.kt +++ b/composeApp/src/commonMain/kotlin/mg/dot/feufaro/musicXML/MusicXML.kt @@ -7,6 +7,7 @@ import kotlinx.serialization.decodeFromString import kotlinx.serialization.modules.SerializersModule import mg.dot.feufaro.FileRepository import nl.adaptivity.xmlutil.serialization.XML +import nl.adaptivity.xmlutil.serialization.XmlParsingException import java.util.Locale import java.util.Locale.getDefault import kotlin.math.max @@ -81,7 +82,7 @@ class MusicXML(private val fileRepository: FileRepository) { } } suspend fun load() { - val xmlContent = fileRepository.readFileContent("assets://12.xml") + val xmlContent = fileRepository.readFileContent("assets://14.xml") val xslContent = fileRepository.readFileContent("assets://timepart.xsl") xmlString = performXsltTransformation(xmlContent, xslContent) val solfaXML = SolfaXML() @@ -208,7 +209,6 @@ class MusicXML(private val fileRepository: FileRepository) { } } solfaXML.toSolfa(measureLength, firstMeasureLength) - println(measureLength) } catch(e: Exception) { println("${e.message}") } diff --git a/composeApp/src/commonMain/kotlin/mg/dot/feufaro/musicXML/SolfaXML.kt b/composeApp/src/commonMain/kotlin/mg/dot/feufaro/musicXML/SolfaXML.kt index 889628e..3b78c98 100644 --- a/composeApp/src/commonMain/kotlin/mg/dot/feufaro/musicXML/SolfaXML.kt +++ b/composeApp/src/commonMain/kotlin/mg/dot/feufaro/musicXML/SolfaXML.kt @@ -8,6 +8,7 @@ class SolfaXML { var curBeam: Pair = Pair(-1,null) var curMarkers: MutableList = mutableListOf() var startTuplet = false + var N: MutableList = mutableListOf() fun setMeta(key: String, value: String?) { if (value != null && value != "") { meta[key] = value @@ -72,7 +73,7 @@ class SolfaXML { val voiceNumber = 2 * ((numPart ?: 1) - 1) + (2 - (voiceNumberIn % 2)) curBeam = Pair(voiceNumber, beam) if (curBeam.second != null) { - println("$timePointer $curBeam") + } curMarkers = dollarMarkers val tuoEdit: SolfaXMLTuo = tuo.find { foundTuo -> @@ -99,19 +100,19 @@ class SolfaXML { } if (duration1 > 0) { tuoEdit.oneNote.forEachIndexed { itVoice, itNote -> - editTuoNote(tuoEdit, itVoice, "+") + editTuoNote(tuoEdit, itVoice, "-") } } editTuoNote(tuoEdit, voiceNumber, note) } if (duration3 > 0) { - val newTuo = tuoEdit.clone(lapse3, duration3, newNote = "+") + val newTuo = tuoEdit.clone(lapse3, duration3, newNote = "-") newTuo.resetMarkers() addTuo(newTuo) } if (duration4 > 0) { - println("addNote recursion") - addNote(voiceNumber, lapse4, duration4, "+", numPart) + //println("addNote recursion") + addNote(voiceNumber, lapse4, duration4, "-", numPart) } } fun addLyrics(timePointer: Int, lyric: MXLyric) { @@ -121,6 +122,8 @@ class SolfaXML { tuoEdit?.addLyrics(lyric) } fun toSolfa(measureLength: Int, firstMeasureLength: Int) { + val nbVoice = (tuo.getOrNull(0)?.oneNote?.size ?: 1) - 1 + val voiceOrders: MutableList = MutableList(nbVoice / 2) { i -> VoiceOrder(2*i+1) } val metaString = "M0:|" + meta.map { (key, value) -> "$key:" + value.replace('|', '!') }.joinToString(separator = "|") @@ -154,13 +157,53 @@ class SolfaXML { curTimeLapse ++ break } + } else { + tuoSelect = currentTuo } - if (tuoSelect!!.duration in (0..32)) { - uString += letters[tuoSelect.duration] + if (tuoSelect!!.duration * multiplier in (0..32)) { + uString += tuoSelect.toUString()+letters[tuoSelect.duration * multiplier] + voiceOrders.forEachIndexed { index, voiceOrder -> + val newVoiceOrder = tuoSelect.getN(voiceOrder) + voiceOrders[index] = newVoiceOrder + while (N.size <= newVoiceOrder.voiceMin + 2) { + N.add("") + } + val marker1Before = if (newVoiceOrder.markerOne == ")") "" else newVoiceOrder.markerOne + val marker1After = if (newVoiceOrder.markerOne == ")") ")" else "" + val marker2Before = if (newVoiceOrder.markerTwo == ")") "" else newVoiceOrder.markerOne + val marker2After = if (newVoiceOrder.markerTwo == ")") ")" else "" + N[newVoiceOrder.voiceMin] += marker1Before + newVoiceOrder.noteOne + marker1After + N[newVoiceOrder.voiceMin+1] += marker2Before + newVoiceOrder.noteTwo + marker2After + } } curTimeLapse += tuoSelect.duration } } println(uString) + println(N + .mapIndexed { index, value -> + val newValue = value + .replace("₄", ",,,,") + .replace("₃", ",,,") + .replace("₂", ",,") + .replace("₁", ",") + .replace("¹", "'") + .replace("²", "''") + .replace("³", "'''") + .replace("⁴", "''''") + "N$index:$newValue" + } + .filter{it.last() != ':'} + .joinToString(separator = "\n")) + } -} \ No newline at end of file +} + +data class VoiceOrder( + val voiceMin: Int = 1, + val voiceFirst: Int = 0, + val noteOne: String = "", + val noteTwo: String = "", + val markerOne: String = "", + val markerTwo: String = "" +) \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/mg/dot/feufaro/musicXML/SolfaXMLTuo.kt b/composeApp/src/commonMain/kotlin/mg/dot/feufaro/musicXML/SolfaXMLTuo.kt index 5de22c5..c891d63 100644 --- a/composeApp/src/commonMain/kotlin/mg/dot/feufaro/musicXML/SolfaXMLTuo.kt +++ b/composeApp/src/commonMain/kotlin/mg/dot/feufaro/musicXML/SolfaXMLTuo.kt @@ -1,5 +1,7 @@ package mg.dot.feufaro.musicXML +import mg.dot.feufaro.solfa.Transpose + data class SolfaXMLTuo ( var timeLapse: Int = 0, var duration: Int = 0, @@ -57,4 +59,42 @@ data class SolfaXMLTuo ( } lyrics[number] = text } + fun toUString(): String { + return markers.joinToString(separator = "") { + it.joinToString(separator = "") { it -> + when (it) { + "(", ")" -> "" + else -> it + } + } + } + } + fun getN(voiceOrder: VoiceOrder): VoiceOrder { + val newVoiceOrder: VoiceOrder = voiceOrder + val newVoiceFirst = newVoiceOrder.voiceFirst + val index0 = voiceOrder.voiceMin + voiceOrder.voiceFirst + val index1 = voiceOrder.voiceMin + 1 - voiceOrder.voiceFirst + val note0 = oneNote.getOrElse(index0) { "" } + val note1 = oneNote.getOrElse(index1) { "" } + val marker0 = markers.getOrNull(index0) + val marker1 = markers.getOrNull(index1) + val markerOne = when { + marker0 == null -> "" + marker0.contains("(") -> "(" + marker0.contains(")") -> ")" + else -> "" + } + val markerTwo = when { + marker1 == null -> "" + marker1.contains("(") -> "(" + marker1.contains(")") -> ")" + else -> "" + } + if (note0 != note1 && note0 !in listOf("-", "z") && note1 !in listOf("-", "z")) { + if (Transpose.compareNotes(note0, note1) < 0) { + return VoiceOrder(voiceOrder.voiceMin, 1 - newVoiceFirst, note1, note0, markerOne, markerTwo ) + } + } + return VoiceOrder(voiceOrder.voiceMin, newVoiceFirst, note0, note1, markerOne, markerTwo) + } } \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/mg/dot/feufaro/solfa/Solfa.kt b/composeApp/src/commonMain/kotlin/mg/dot/feufaro/solfa/Solfa.kt index d784476..57c8056 100644 --- a/composeApp/src/commonMain/kotlin/mg/dot/feufaro/solfa/Solfa.kt +++ b/composeApp/src/commonMain/kotlin/mg/dot/feufaro/solfa/Solfa.kt @@ -23,7 +23,7 @@ class Solfa(val sharedScreenModel: SharedScreenModel, private val fileRepository val REGEX_TEMPLATE_COMMENT = Regex("(\\$[A-Z]|\\$\\{[^\\}]*\\})") val REGEX_REPETITION = Regex("([zdrmfslt-](?>[',]*))([1-9][0-9]*)", RegexOption.IGNORE_CASE) val REGEX_PARSE_META = Regex("\\|(?=[a-z]:)") - val REGEX_LYRICS_COMMENT = Regex("\\$\\{([^\\}]:[^\\}]*)\\}|\\$\\{R!\\}") + val REGEX_LYRICS_COMMENT = Regex("\\$\\{([^\\}]:([^\\}]*))\\}|\\$\\{R!\\}") val REGEX_LYRICS_REPETITION = Regex("_(\\d)") val REGEX_VOWELS_STAGE1 = Regex("[aeiouyòàéỳ](?![,;\\.\\-:!\\?\\}»_]*([ aeiouyòàéỳ/]|_[1-9]))", RegexOption.IGNORE_CASE) val REGEX_VOWELS_STAGE2 = Regex("(?<=[aeiouyòàéỳ])_([,;\\.\\-:!\\?\\}»_]+)", RegexOption.IGNORE_CASE) @@ -438,7 +438,10 @@ class Solfa(val sharedScreenModel: SharedScreenModel, private val fileRepository val item = lyricsIterator.next() // ${D:xxx} lyrics of DC and DSs if (item.substring(0, 4) == $$"${D:") { - item.replace(REGEX_LYRICS_COMMENT, "$1").addHyphens().split(Regex("[_/]")).drop(1).forEachIndexed { i, xval -> + item.replace(REGEX_LYRICS_COMMENT, "$2") + .addHyphens() + .split(Regex("[_/]")) + .forEachIndexed { i, xval -> appendLyricsItem(stanzaNumber, i, xval) } lyricsIterator.remove() @@ -455,7 +458,6 @@ class Solfa(val sharedScreenModel: SharedScreenModel, private val fileRepository } // loadY is a smart lyrics parser for Malagasy language private fun loadY(intKey: Int, lyrics: String) { - lyricsComment.clear() val loadedLyrics = lyrics .also { println(it)} .replace(REGEX_VOWELS_STAGE1, "$0_") @@ -472,7 +474,6 @@ class Solfa(val sharedScreenModel: SharedScreenModel, private val fileRepository .replace(REGEX_MALAGASY_MN, "$1$2_$3") .replace(REGEX_MALAGASY_MN_STAGE2, "$1-_") .replace("_n'", "n'_") - getLyricsComments(loadedLyrics) loadL(intKey, loadedLyrics) } // loadE is a smart Lyrics parser for English language diff --git a/composeApp/src/commonMain/kotlin/mg/dot/feufaro/solfa/Transpose.kt b/composeApp/src/commonMain/kotlin/mg/dot/feufaro/solfa/Transpose.kt index e021957..fd9a553 100644 --- a/composeApp/src/commonMain/kotlin/mg/dot/feufaro/solfa/Transpose.kt +++ b/composeApp/src/commonMain/kotlin/mg/dot/feufaro/solfa/Transpose.kt @@ -20,10 +20,34 @@ import androidx.compose.ui.unit.dp class Transpose { companion object { + val REGEX_ONE_NOTE = Regex("^([drmfslt][ia]?)([₄₃₂₁¹²³⁴]?)(.*)") + val octaveSigns = listOf("₄", "₃", "₂", "₁", "", "¹", "²", "³", "⁴") val noteToNumber = listOf("d", "di", "r", "ri", "m", "f", "fi", "s", "si", "l", "ta", "t") val keyToNumber = listOf("C", "Db", "D", "Eb", "E", "F", "Gb", "G", "Ab", "A", "Bb", "B" ) + fun compareNotes(note1: String, note2: String): Int { + val found1 = REGEX_ONE_NOTE.find(note1) + val found2 = REGEX_ONE_NOTE.find(note2) + if (found1 == null || found2 == null) { + return 0 + } + val octave1 = octaveSigns.indexOf(found1.groupValues[2]) + val octave2 = octaveSigns.indexOf(found2.groupValues[2]) + return when { + octave1 < octave2 -> -1 + octave1 > octave2 -> 1 + else -> { + val noteNum1 = noteToNumber.indexOf(found1.groupValues[1]) + val noteNum2 = noteToNumber.indexOf(found2.groupValues[1]) + when { + noteNum1 > noteNum2 -> 1 + noteNum1 < noteNum2 -> -1 + else -> 0 + } + } + } + } fun transpose(note: String, fromKey: String, toKey: String, alter: Int = 0): String { - val regexFound = Regex("^([drmfslt][ia]?)([¹²³₁₂₃]?)(.*)").find(note) + val regexFound = REGEX_ONE_NOTE.find(note) if (regexFound == null) { return note }