Jump to content

Dynamically Create DEF-SCORE Body?


Recommended Posts

In all the examples, the score has the instruments readily defined by the programmer:

(def-score 
    (:score-prop score-val ...)
    (instrument-1 
        :instrument-prop instrument-val
        ...)
    (instrument-2
        :instrument-prop instrument-val
        ...)
)

 

What I have been wondering is can I dynamically create these instruments, allowing for proper reference in :layout afterwards, etc.

For example, if I wanted 10 instruments:  

(defun my-generate-instrument ...) ;; something

(def-score 
    (:score-prop score-val ...)
    (loop 
        for i from 1 to 10
        collect (my-generate-instrument i)))

 

Any tips for an scenario like this one? 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

Terms of Use Privacy Policy