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
84db28be
Commit
84db28be
authored
14 years ago
by
Reinhold Kainhofer
Browse files
Options
Downloads
Patches
Plain Diff
Handle all five types of barlines (and repeat barlines)
parent
06f184c1
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
pae2xml.pl
+32
-7
32 additions, 7 deletions
pae2xml.pl
sample_files/Barlines-basic.pae
+7
-0
7 additions, 0 deletions
sample_files/Barlines-basic.pae
with
39 additions
and
7 deletions
pae2xml.pl
+
32
−
7
View file @
84db28be
...
@@ -288,20 +288,45 @@ sub parse_notes {
...
@@ -288,20 +288,45 @@ sub parse_notes {
$timesig = timesignature($timesig);
$timesig = timesignature($timesig);
print OUT " <attributes>\n$timesig
print OUT " <attributes>\n$timesig
</attributes>\n";
</attributes>\n";
} elsif ($notes =~ /^
\/
(.*)$/) {
} elsif ($notes =~ /^
(:?\/+:?)
(.*)$/) {
$
notes
= $1;
$
barline
= $1;
if (
$notes =
~ /^\/(.*)$/) {
$notes =
$2;
$notes = $1;
if ($barline =~ /^:\/\/:/) {
print OUT
'
<
barline
location
=
"
right
"
>
print OUT
'
<
barline
location
=
"
right
"
>
<
bar
-
style
>
light
-
light
</
bar
-
style
>
<
bar
-
style
>
light
-
light
</
bar
-
style
>
<
repeat
direction
=
"
backward
"
/>
</
barline
>
'
;
} elsif ($barline =~ /^:\/\/$/ ) {
print OUT
'
<
barline
location
=
"
right
"
>
<
bar
-
style
>
light
-
heavy
</
bar
-
style
>
<
repeat
direction
=
"
backward
"
/>
</
barline
>
'
;
} elsif ($barline =~ /^\/\/$/) {
print OUT
'
<
barline
location
=
"
right
"
>
<
bar
-
style
>
light
-
light
</
bar
-
style
>
<
repeat
direction
=
"
backward
"
/>
</
barline
>
</
barline
>
'
;
'
;
}
}
print OUT " </measure>\n";
print OUT " </measure>\n";
if ($notes ne "") {
if ($notes ne "") {
print OUT
'
<
measure
number
=
"
'.
$meas
.'
"
>
print OUT
'
<
measure
number
=
"
'.
$meas
.'
"
>
'
.$clefattr;
'
;
if ($barline =~ /^\/\/:$/) {
print OUT
'
<
barline
location
=
"
left
"
>
<
bar
-
style
>
heavy
-
light
</
bar
-
style
>
<
repeat
direction
=
"
forward
"
/>
</
barline
>
'
;
} elsif ($barline =~ /^:\/\/:$/) {
print OUT
'
<
barline
location
=
"
left
"
>
<
repeat
direction
=
"
forward
"
/>
</
barline
>
'
;
}
print OUT $clefattr;
$meas++;
$meas++;
} else {
} else {
$mopen = 0;
$mopen = 0;
...
...
This diff is collapsed.
Click to expand it.
sample_files/Barlines-basic.pae
0 → 100644
+
7
−
0
View file @
84db28be
Test Composer
Test case for barline types
1.1.1: S One repeat
plain&easy: %C-1@c$bB '4CDE/GABG://CDEF//:GABD//FGAB://:AGFC://
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