Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pae2xml
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Kainhofer
pae2xml
Commits
bd658412
Commit
bd658412
authored
14 years ago
by
Reinhold Kainhofer
Browse files
Options
Downloads
Patches
Plain Diff
Support for real multi-measure rests (with correct length explicitly specified in XML)
parent
247fe6f1
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
pae2xml.pl
+12
-4
12 additions, 4 deletions
pae2xml.pl
sample_files/Rests-multimeasure.pae
+7
-0
7 additions, 0 deletions
sample_files/Rests-multimeasure.pae
with
19 additions
and
4 deletions
pae2xml.pl
+
12
−
4
View file @
bd658412
...
@@ -193,8 +193,6 @@ sub parse_notes {
...
@@ -193,8 +193,6 @@ sub parse_notes {
$notes
=~
s/(\.|\d|\,|\')qq/qq$1/gs
;
# pull beginning mark of group of grace notes in front of corresponding notes
$notes
=~
s/(\.|\d|\,|\')qq/qq$1/gs
;
# pull beginning mark of group of grace notes in front of corresponding notes
$notes
=~
s/(xx|x|bb|b|n)qq/qq$1/gs
;
# qq first, then parts of notes
$notes
=~
s/(xx|x|bb|b|n)qq/qq$1/gs
;
# qq first, then parts of notes
$notes
=~
s/\=(\d)/$1/gs
;
# replace multibar rests #n with just n
while
(
$notes
ne
"")
{
while
(
$notes
ne
"")
{
if
(
$notes
=~
/^(\'+|\,+)(.*)$/
)
{
# Octave marks
if
(
$notes
=~
/^(\'+|\,+)(.*)$/
)
{
# Octave marks
(
$oct
,
$notes
)
=
(
$
1
,
$
2
);
(
$oct
,
$notes
)
=
(
$
1
,
$
2
);
...
@@ -205,13 +203,23 @@ sub parse_notes {
...
@@ -205,13 +203,23 @@ sub parse_notes {
}
elsif
(
$notes
=~
/^r(.*)$/
)
{
# End grace
}
elsif
(
$notes
=~
/^r(.*)$/
)
{
# End grace
$notes
=
$
1
;
$notes
=
$
1
;
$qq
=
0
;
$qq
=
0
;
}
elsif
(
$notes
=~
/^(\d
+|\=
)(\/.*)$/
)
{
#
normal and
multi-measure rests
}
elsif
(
$notes
=~
/^
\=
(\d
*
)(\/.*)$/
)
{
# multi-measure rests
$measrest
=
$
1
;
$measrest
=
$
1
;
$notes
=
$
2
;
$notes
=
$
2
;
if
(
$measrest
eq
'
=
')
{
if
(
$measrest
eq
'')
{
$measrest
=
1
;
$measrest
=
1
;
}
}
$toprint
.=
"
$measrest
measures of rest.
\n
";
$toprint
.=
"
$measrest
measures of rest.
\n
";
if
(
$measrest
>
0
)
{
# Create a real multi-bar rest
print
OUT
'
<attributes>
<measure-style>
<multiple-rest>
'
.
$measrest
.
'
</multiple-rest>
</measure-style>
</attributes>
';
}
# Now create the measures
for
$n
(
1
..
$measrest
)
{
for
$n
(
1
..
$measrest
)
{
print
OUT
'
<note>
print
OUT
'
<note>
<rest />
<rest />
...
...
This diff is collapsed.
Click to expand it.
sample_files/Rests-multimeasure.pae
0 → 100644
+
7
−
0
View file @
bd658412
Test Composer
Test case for multi-measure rests
1.1.1: S Multi-measure rests
plain&easy: %C-1@c$bB '=/2AB/=3/=/2AB/=15/2AB/
Test Library
00000000
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment