Jump to content

Disassembling incomplete OMN expressions?


Recommended Posts

Dear Janusz,

 

Opusmodus is already flexible enough to notate incomplete OMN forms like the following, even though the pitch is missing.

 

'(h mp pizz)

 

Because this expression is no complete OMN, omn-formp returns nil.

 

(omn-formp '(h mp pizz))

=> nil

 

However, it would be useful to still be able to disassemble this expression. Currently disassemble-omn returns an error, because the pitch is missing. However, if such expression can even be notated, then why not allowing to also disassemble it as follows.

 

(disassemble-omn '(h c4 mp pizz))

; desired output -- currently error is caused

=> (:length (1/2) :velocity (mp) :articulation (pizz)) 

; alternative -- likely default pitch needed for consistency

=> (:length (1/2) :pitch (c4) :velocity (mp) :articulation (pizz)) 

 

I am asking for this, because that would allow to implement functions that can build up OMN forms incrementally (as an alternative to make-omn), increasing flexibility. Here is an example of a not yet existing function demonstrating what I am talking about. It would complement the function edit-omn I was proposing earlier today.

 

(add-omn :pitch '(g4 a4)
         '((q f pizz) (h arco)))

=> ((q g4 f pizz) (h a4 arco)))

 

What do you think?

 

Thanks!

 

Best,

Torsten

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