Jump to content

Extending a library?


Recommended Posts

Is there a way a way to extend an existing library? For example, for a specific composition I may want to collect a library of rhythms, melodic fragments etc., to arrange and transform these later with existing library features. Is it possible to by and by extend a library so that instead of, say, defining

(setf rhythm1 (length-divide 1 3 '(q)))

 

I instead may write something like

(setf (library 'new-piece 'rhythms 'rhythm1) (length-divide 1 3 '(q)))

 

Asked differently: what is the internal data structure of the existing library feature(s)? Is it possible to get access to that data for user-defined functions etc.?

 

Also, is it possible to export an existing library into a file?

 

BTW: Why are all these quotes necessary in calls to functions like library and many others -- why is the function library not a macro instead (only at the top-most level of course as syntactic sugar, I am certainly not suggesting to have macros instead of functions in principle).

 

Thank you very much!

 

Best,

Torsten

 

 

Link to comment
Share on other sites

  • 7 months later...

>> Is there a way a way to extend an existing library?

>> Also, is it possible to export an existing library into a file?

 

> I agree this would be useful indeed.

 
Sorry for following this up. Any plans to extend the existing library functionality to make libraries extendable and exportable?
 
If not I am happy to roll my own (that should be easy enough :) 
 
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