o_e Posted January 24, 2021 Share Posted January 24, 2021 Hi, Please have merci with me, but I'am not able to build a library (permanent). I've tried to follow the docs, so I first use def-library: (def-library test (:section testing bla1 '(a b c) bla2 '(e f g) )) This seems to work, testing with: (library 'test 'testing 'bla2) ==>(e f g) Next step in my understanding would be: (create-library 'test 'testing 'bla :file "test" ) that gives an error: ==>Error: Incorrect keyword arguments in ("test") What am I missing, surely something very silly that I overlooked, greatful for some help.. Thanks! ole JulioHerrlein 1 Quote Link to comment Share on other sites More sharing options...
JulioHerrlein Posted January 24, 2021 Share Posted January 24, 2021 Nice quetion, Ole ! I´d like to know this, too ! Best, Julio Quote Link to comment Share on other sites More sharing options...
opmo Posted January 25, 2021 Share Posted January 25, 2021 (create-library 'Binary-Rhythmics '4-bit-binary 'bin (combination2 4 '(1 0 1 0))) ;; The print out in the LISTENER is as follows: => (def-library binary-rhythmics (:section 4-bit-binary bin0 '(0 0 0 0) bin1 '(1 0 0 0) bin2 '(0 1 0 0) bin3 '(1 1 0 0) bin4 '(0 0 1 0) bin5 '(1 0 1 0) bin6 '(0 1 1 0) bin7 '(1 1 1 0) bin8 '(0 0 0 1) bin9 '(1 0 0 1) bin10 '(0 1 0 1) bin11 '(1 1 0 1) bin12 '(0 0 1 1) bin13 '(1 0 1 1) bin14 '(0 1 1 1) bin15 '(1 1 1 1) )) With keyword :file "4-bit-library" the file will be saved in the ~/Opusmodus/Def-Libraries/Def-Library directory. (create-library 'Binary-Rhythmics '4-bit-binary 'bin (combination2 4 '(1 0 1 0)) :file "4-bit-library") 10 hours ago, o_e said: Next step in my understanding would be: (create-library 'test 'testing 'bla :file "test" ) this expression dose not have any values. Quote Link to comment Share on other sites More sharing options...
o_e Posted January 25, 2021 Author Share Posted January 25, 2021 Ok, to complete my own example (hope that may help others): First you have to define a library (like I did already successful): (def-library test (:section testing bla0 '(a b c) bla1 '(e f g) )) to save it (permanent) as a file into ~/Opusmodus/Def-Libraries/Def-Library you have to do the following: (create-library 'test 'testing 'bla (library 'test 'testing nil :collect :all) :file "test" ) correct or do I miss something? Thanks for your patience! Quote Link to comment Share on other sites More sharing options...
opmo Posted January 25, 2021 Share Posted January 25, 2021 You can't create-library with defined library. This is already a library: (def-library test (:section testing bla0 '(a b c) bla1 '(e f g) )) Open a new file and paste your new define library there. The file must start with: (in-package :Opusmodus) The create-library function is a simply automatisation to generate def-library with gen functions (values). Quote Link to comment Share on other sites More sharing options...
o_e Posted January 25, 2021 Author Share Posted January 25, 2021 Ok, so I just save my (def-library test (:section testing bla0 '(a b c) bla1 '(e f g) )) into the Def-Library folder, adding (in-package :Opusmodus) on top The method I choose looks like this: (in-package :Opusmodus) ;; Library | Opusmodus Version 2.1.26191 | 2021-01-25 09:24:09 (def-library test (:section testing bla0 '(a b c) bla1 '(e f g))) #| Examples: (library 'test 'testing 'bla0) (library 'test 'testing nil :random 5) (library 'test 'testing nil :collect '(0 3 5)) |# Can it also be done this way (I find the automatically generated additional lines helpful)..? Or is it embarrasing Quote Link to comment Share on other sites More sharing options...
opmo Posted January 25, 2021 Share Posted January 25, 2021 you could do: (create-library 'test 'testing 'bla '((a b c) (e f g)) :file "test1" ) which will create a file 'test1.opmo' in the ~/Opusmodus/Def-Libraries/Def-Library: (in-package :Opusmodus) ;; Library | Opusmodus Version 2.1.26194M | 2021-01-25 10:30:52 (def-library test (:section testing bla0 '(a b c) bla1 '(e f g))) #| Examples: (library 'test 'testing 'bla0) (library 'test 'testing nil :random 5) (library 'test 'testing nil :collect '(0 3 5)) |# JulioHerrlein 1 Quote Link to comment Share on other sites More sharing options...
o_e Posted January 25, 2021 Author Share Posted January 25, 2021 Ok, now I've got it, thanks a lot! JulioHerrlein 1 Quote Link to comment Share on other sites More sharing options...
JulioHerrlein Posted January 25, 2021 Share Posted January 25, 2021 Thanks a lot !!! Quote Link to comment Share on other sites More sharing options...
o_e Posted January 25, 2021 Author Share Posted January 25, 2021 Ok, one more question.. Lets say I have a library with different sections like this: (def-library test3 (:section one x0 '(a b c) x1 '(d e f) ) (:section two a0 '(x y z) a1 '(u v w) ) ) and now I want to (randomly) call in all sections: (library 'test3 '(one two) nil :collect :all) (library 'test3 '(one two) nil :random 5) is that possible? thanks! Quote Link to comment Share on other sites More sharing options...
opmo Posted January 25, 2021 Share Posted January 25, 2021 This is not possible. One section at the time. What you could do is to create a section with all the values. Quote Link to comment Share on other sites More sharing options...
o_e Posted January 25, 2021 Author Share Posted January 25, 2021 Yes of corse, just thinking how to organize my stuff, thanks for the super quick response! opmo 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.