diff --git a/Documentation/examples/orchestrallily.ly b/Documentation/examples/orchestrallily.ly
index f7c199c7ab367e86b7268e17b8eb6adf2ec6efe6..411a71ddabc347a07e3ce77f53219bd6fa23ed49 120000
--- a/Documentation/examples/orchestrallily.ly
+++ b/Documentation/examples/orchestrallily.ly
@@ -1 +1 @@
-../orchestrallily.ly
\ No newline at end of file
+../../orchestrallily.ly
\ No newline at end of file
diff --git a/orchestrallily.ly b/orchestrallily.ly
index 32b9ebd0e0f99c0cfee9f58a7c7ca6165bd1510b..c40cbc7e813aa1320948bd7eda74a364a34c9678 100644
--- a/orchestrallily.ly
+++ b/orchestrallily.ly
@@ -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))