From 12f117a07e986f64db9d3a25dc54d5aacaafc9ee Mon Sep 17 00:00:00 2001 From: Andrew Hankinson Date: Thu, 20 Oct 2016 13:45:13 -0400 Subject: [PATCH 1/3] New: Add support for Glissando Lines --- src/ExportGenerators.mss | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/ExportGenerators.mss b/src/ExportGenerators.mss index 0e9ced3..6efa5a5 100644 --- a/src/ExportGenerators.mss +++ b/src/ExportGenerators.mss @@ -592,6 +592,10 @@ function GenerateLayers (staffnum, measurenum) { { mobj = GenerateLine(bobj); } + case('GlissandoLine') + { + mobj = GenerateLine(bobj); + } case('Trill') { mobj = GenerateLine(bobj); @@ -1332,6 +1336,10 @@ function GenerateLine (bobj) { libmei.AddAttribute(line, 'dis', octrend[0]); libmei.AddAttribute(line, 'dis.place', octrend[1]); } + case ('GlissandoLine') + { + line = libmei.Gliss(); + } case ('Trill') { line = GenerateTrill(bobj); From c141b55d22f17a0bdf5ba31feb73e052e7d85719 Mon Sep 17 00:00:00 2001 From: Andrew Hankinson Date: Thu, 20 Oct 2016 13:45:26 -0400 Subject: [PATCH 2/3] Refactor Line converter support --- src/Utilities.mss | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/src/Utilities.mss b/src/Utilities.mss index 4baba4b..a52e345 100644 --- a/src/Utilities.mss +++ b/src/Utilities.mss @@ -164,13 +164,35 @@ function AddBarObjectInfoToElement (bobj, element) { libmei.AddAttribute(element, 'tstamp', ConvertPositionToTimestamp(bobj.Position, bar)); - if (bobj.Type = 'Line' or bobj.Type = 'Slur' or bobj.Type = 'DiminuendoLine' or bobj.Type = 'CrescendoLine') + switch (bobj.Type) { - libmei.AddAttribute(element, 'tstamp2', ConvertPositionWithDurationToTimestamp(bobj)); + case('Line') + { + libmei.AddAttribute(element, 'tstamp2', ConvertPositionWithDurationToTimestamp(bobj)); + } + case('Slur') + { + libmei.AddAttribute(element, 'tstamp2', ConvertPositionWithDurationToTimestamp(bobj)); + } + case('DiminuendoLine') + { + libmei.AddAttribute(element, 'tstamp2', ConvertPositionWithDurationToTimestamp(bobj)); + } + case('CrescendoLine') + { + libmei.AddAttribute(element, 'tstamp2', ConvertPositionWithDurationToTimestamp(bobj)); + } + case('GlissandoLine') + { + libmei.AddAttribute(element, 'tstamp2', ConvertPositionWithDurationToTimestamp(bobj)); + } + case('Trill') + { + libmei.AddAttribute(element, 'tstamp2', ConvertPositionWithDurationToTimestamp(bobj)); + } } libmei.AddAttribute(element, 'staff', bar.ParentStaff.StaffNum); - libmei.AddAttribute(element, 'layer', voicenum); if (bobj.Dx > 0) From c1a93fdf12f2fc797676fd882851cbd4baffb5f7 Mon Sep 17 00:00:00 2001 From: Andrew Hankinson Date: Thu, 20 Oct 2016 13:45:39 -0400 Subject: [PATCH 3/3] Update Version number --- src/GLOBALS.mss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/GLOBALS.mss b/src/GLOBALS.mss index 2702347..0457db0 100644 --- a/src/GLOBALS.mss +++ b/src/GLOBALS.mss @@ -1,4 +1,4 @@ -Version "2.0.3" +Version "2.0.4" PluginName "Sibelius to MEI Exporter" Author "Andrew Hankinson"