Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
OrchestralLily
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
Edition Kainhofer
OrchestralLily
Commits
a1b71e02
There was an error fetching the commit references. Please try again later.
Commit
a1b71e02
authored
17 years ago
by
Reinhold Kainhofer
Browse files
Options
Downloads
Patches
Plain Diff
Implement *MidiInstrument setting for a staff
parent
f796a3d1
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
Documentation/examples/orchestrallily.ly
+1
-1
1 addition, 1 deletion
Documentation/examples/orchestrallily.ly
orchestrallily.ly
+20
-13
20 additions, 13 deletions
orchestrallily.ly
with
21 additions
and
14 deletions
Documentation/examples/orchestrallily.ly
+
1
−
1
View file @
a1b71e02
../orchestrallily.ly
\ No newline at end of file
../../orchestrallily.ly
\ No newline at end of file
This diff is collapsed.
Click to expand it.
orchestrallily.ly
+
20
−
13
View file @
a1b71e02
...
...
@@ -260,28 +260,35 @@ orchestralScoreStructure = #(define-music-function (parser location structure) (
)
)
% Given a property name and the extensions, either generate the pair to set
% the property or an empty list, if no pre-defined variable could be found
#(define (oly:generate_property_pair prop piece instr type)
(let* ((val (namedPieceInstrObject piece instr type)))
(if (not-null? val) (list 'assign prop val) '())
)
)
% Generate the properties for the staff for piece and instr. Typically, these
% are the instrument name and the short instrument name (if defined).
% return a (possibly empty) list of all assignments.
#(define (oly:make_staff_properties piece instr)
(let* (
(instrName (namedPieceInstrObject piece instr "InstrumentName"))
(shortInstrName (namedPieceInstrObject piece instr "ShortInstrumentName"))
(props '())
(mapping '(
(instrumentName . "InstrumentName")
(shortInstrumentName . "ShortInstrumentName")
(midiInstrument . "MidiInstrument")
))
(assignments (map
(lambda (pr)
(oly:generate_property_pair (car pr) piece instr (cdr pr))
)
mapping))
(props (filter not-null? assignments))
)
(if (not-null? instrName)
(set! props (append props (list (list 'assign 'instrumentName instrName)))))
(if (not-null? shortInstrName)
(set! props (append props (list (list 'assign 'shortInstrumentName shortInstrName)))))
(display props)
props
)
)
#(define (oly:settings_pair setting value)
(if (not-null? value)
(list setting value)
'()
)
)
#(define (oly:make_staff_group parser piece instr stafftype instruments)
(let* (
(staves (oly:make_parallel_staves parser piece instr instruments))
...
...
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