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
247fe6f1
Commit
247fe6f1
authored
14 years ago
by
Reinhold Kainhofer
Browse files
Options
Downloads
Patches
Plain Diff
Repetitions: Use correct repeat count indicated by f+ after the !
parent
7f7eca12
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
+11
-1
11 additions, 1 deletion
pae2xml.pl
sample_files/Shortcuts-repetition.pae
+7
-0
7 additions, 0 deletions
sample_files/Shortcuts-repetition.pae
with
18 additions
and
1 deletion
pae2xml.pl
+
11
−
1
View file @
247fe6f1
...
...
@@ -154,6 +154,16 @@ REST: $rest\n";
close
OUT
;
}
# Repeat $1 by a count of $2
sub
repeat
{
(
my
$e
,
my
$count
)
=
@_
;
my
$res
=
"";
for
(
my
$i
=
1
;
$i
<=
$count
;
++
$i
)
{
$res
.=
$e
;
}
return
$res
;
}
sub
parse_notes
{
my
(
$notes
,
$keysig
)
=
@_
;
...
...
@@ -166,7 +176,7 @@ sub parse_notes {
$notes
=
$
1
;
}
$notes
=~
s/!([^!]*)!
/$1$1
/gs
;
# write out repetitions
$notes
=~
s/!([^!]*)!
(f*)/repeat($1, length($2)+1)
/gs
e
;
# write out repetitions
$notes
=~
s/\{([^\}]*)\}/$1/gs
;
# ignore beamings
while
(
$notes
=~
s/(:?\/+:?|^)([^\/:]*)(:?\/+:?)i(:?\/+:?)/$1$2$3$2$4/gs
)
{};
# replace whole-measure repeats (i notation)
...
...
This diff is collapsed.
Click to expand it.
sample_files/Shortcuts-repetition.pae
0 → 100644
+
7
−
0
View file @
247fe6f1
Test Composer
Test case for repetitions
1.1.1: S repetitions
plain&easy: %C-1@c$bBü '4A!'6BG!fff4A/
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