Jump to content

erka

Members
  • Posts

    104
  • Joined

  • Last visited

Contact Methods

Profile Information

  • Gender
    Male
  • Location
    Munich/Bavaria/Germany
  • Interests
    DAWs, Plugins, Guitars. Programming. Improvising. Listening to all kinds of music

Recent Profile Visitors

2,947 profile views
  1. I assume your example was a working example. It also throws an error on cmd-1 on my Mac(Sonoma) newest Opusmodus. In case it is working on your system I can send a bug report. I tried the following: '( 1/139 c5 1/99) '( 1/139 c5 1/101) '( 1/139 c5 1/101 1/99) (setf step 1) (setf den (gen-integer 144 2 step)) (setf xx (make-omn :pitch '(c4 ) :length (loop for i in den collect (/ 1 i)) )) (single-events xx) The first 2 lines are shown in notation . The third throws error. For xx: midi and audition works. Notation throws error. (single-events xx) shows all length in notation and plays them. The problem seems not to be that the length can't be displayed but calculating the beat I guess.
  2. Maybe like this .That is the first that came to mind. Probably a better way. (setf ll (gen-integer 144 88)) (make-omn :pitch '(c4 ) :length (loop for i in ll collect (/ 1 i)) ) ;; result is this: '(1/144 c4 mf 1/143 1/142 1/141 1/140 1/139 1/138 1/137 1/136 1/135 1/134 1/133 1/132 1/131 1/130 1/129 u 1/127 1/126 1/125 1/124 1/123 1/122 1/121 1/120 1/119 1/118 1/117 1/116 1/115 1/114 1/113 1/112 1/111 1/110 1/109 1/108 1/107 1/106 1/105 1/104 1/103 1/102 1/101 1/100 1/99 1/98 1/97 1/96 1/95 1/94 1/93 1/92 1/91 1/90 1/89 1/88) But I get this error when I try to get notation with cmd-1 : OM 40 > audition-musicxml-omn-snippet Error: Failed to create interface #<om-capi::notation-view "Notation Viewer: Snippet [10]" 812054F143> in its process #<mp:process Name "Cocoa Event Loop" Priority 70000000 State "Running (inside foreign code)">. Errors during display: -->> The value 3217 of cl-midi::numer inside CL-MIDI:MAKE-TIME-SIGNATURE-EVENT is not of type (unsigned-byte 8). The values are ratios that should be valid.I tried several by themselves and they show in notation. Any idea?
  3. Example of separating to each function. Evaluate step by step and check the result. That is how I learned functions and checked if that is what I want. (setf mat '((e f5 g5 a5 s gb5 f5 e e5 f5 g5 s e5 eb5) (e d5 e5 f5 s d5 db5 e c5 d5 e5 s c5 b4) (e bb4 c5 d5 s b4 bb4 e a4 bb4 c5 s a4 ab4) (e g4 a4 bb4 s g4 gb4 e f4 g4 a4 -e))) (setf bar1 '(e f5 g5 a5 s gb5 f5 e e5 f5 g5 s e5 eb5)) ;; or (setf bar1 (first mat)) (setf bar1_1 (first (gen-divide 5 bar1))) (setf bar1_2 (second (gen-divide 5 bar1))) ;;rnd-order only for the first half of bar (setf bar1_1ro (rnd-order bar1_1 :type :pitch :seed 21)) ;; or without seed to get diiferent results each time (setf bar1_1fr (filter-repeat 1 bar1_1ro :type :pitch)) (setf bar1_1_2 (list bar1_1fr bar1_2)) ;; if the same for second half of bar ;;(setf bar1_2ro (rnd-order bar1_2 :type :pitch :seed 21)) ;; or without seed to get diiferent results each time ;;(setf bar1_2fr (filter-repeat 1 bar1_2ro :type :pitch)) ;;(setf bar1_1_2 (list bar1_1fr bar1_2fr)) ;;together for bar1 (setf maintask (list (filter-repeat 1 (rnd-order (first (gen-divide 5 bar1)) :type :pitch :seed 21) :type :pitch) (second (gen-divide 5 bar1)))) ;; main task applied to all bars of mat (setf loopbars (loop for bar in mat collect ;;or append (list (filter-repeat 1 (rnd-order (first (gen-divide 5 bar)) :type :pitch :seed 21) :type :pitch) (second (gen-divide 5 bar))))) ;; transpose loop (setf looptrans (loop for i in '(0 5 -2 3 8 1 6 -1 4 9 2 7) append (pitch-transpose i loopbars))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; check what happens if two pitches repeat (filter-repeat 1 '(e f5 f5 a5 s gb5 g5) :type :pitch) ;;all together in a nested loop (loop for i in '(0 5 -2 3 8 1 6 -1 4 9 2 7) append (pitch-transpose i (loop for bar in mat collect (list (filter-repeat 1 (rnd-order (first (gen-divide 5 bar)) :type :pitch :seed 21) :type :pitch) (second (gen-divide 5 bar)))))) Is more to write but easier to test. When everything works fine you could nest the different steps. But evaluating the whole script gives the same result.
  4. Do you want to only rnd-order the first half or both halfs of the bar? You probably only want to filter-repeat the rnd-ordered omn to prevent repeats after ordering. When the second half is not re-ordered then filter-repeat is not needed, unless you want to prevent a repeat at the beginning of the second bar. As mentioned before try to break the whole thing into single steps. Each step assigned to a variable (setf) and work the next step on this variable. This makes things easier to understand and you easily see what a function is doing to what input and what the output is and if you want that. Or try the loop with only '(0 1) and the mat with only 1 or 2 bars and it will be easier to check if the result is what you expect. That is what I usually do. Reduce the input to see if the algorithm is working at all and then try complex things.
  5. (loop for i in '(0 5 -2 3 8 1 6 -1 4 9 2 7) append (pitch-transpose i (loop for bar in mat collect (list (filter-repeat 1 (rnd-order (first (gen-divide 5 bar)) :type :pitch :seed 21) :type :pitch) (second (gen-divide 5 bar))))))
  6. You forgot the :type :pitch for the rnd-order and only set it for the filter-repeat. So the events were rnd-ordered not only the pitch. (loop for i in '(0 5 -2 3 8 1 6 -1 4 9 2 7) append (pitch-transpose i (loop for bar in mat collect (list (filter-repeat 1 (rnd-order (first (gen-divide 5 bar)) :type :pitch) :type :pitch) (second (gen-divide 5 bar)))))) I can't remember V2. Time to upgrade? I like to be up to date and also like to support the development. Is there a <> at the top of the post-editor in V2. Then you can click it and post code inside the appearing box.
  7. This works here. (loop for i in '(0 5 -2 3 8 1 6 -1 4 9 2 7) append (pitch-transpose i (loop for bar in mat collect (list (filter-repeat 1 (rnd-order (first (gen-divide 5 bar))) :type :pitch) (second (gen-divide 5 bar)))))) It is a problem of position of parentheses. The filter-repeat was applied on the two half bars not on the output of (rnd-order..). When you put the mouse on the opening parentheses of a list the closing parentheses will be green, too. So you can see what is enclosed in the list. I agree with Janusz that is actually easier to program and to understand later what you did when you do this in steps with variables. (one of the examples in the last thread). What some people don't like about LISP is the lot of parentheses. But the opus modus editor is very helpful to check those. My rule is to always check the beginning and end of a list, especially in nested statements. Takes a little time but solves the problem.
  8. '(e f5 g5 a5 s gb5 f5 e e5 f5 g5 s e5 eb5) is a omn-list. e f5 is an omn-event with mf as a default velocity. You can express an omn-list as events by calling (single-events '(e f5 g5 a5 s gb5 f5 e e5 f5 g5 s e5 eb5)) =>((e f5 mf) (e g5 mf) (e a5 mf) (s gb5 mf) (s f5 mf) (e e5 mf) (e f5 mf) (e g5 mf) (s e5 mf) (s eb5 mf)) gen-divide is described in the function-document as : GEN-DIVIDE can be used to divide a sequence into sublists of a given size. When gen-divide sees an omn-list it counts events and then divides the event-list in given size. The 5 is the number of events. Only in your example it is 5, because each bar has 10 events. It is not really dividing into 2/4 . It just splits the list in 5 events each. Try (gen-divide 2 '(e f5 g5 a5 s gb5 f5 e e5 f5 g5 s e5 eb5)) or (gen-divide 3 ...)
  9. What do you mean with "uses an integer bar in rnd-order" ? >>> this one doesn't work either because it uses an integer bar in rnd-order (loop for i in '(0 5 -2 3 8 1 6 -1 4 9 2 7) append (pitch-transpose i (loop for bar in mat collect (rnd-order bar :type :pitch :seed 20)))) >>> "bar" will be some like this '(e f5 g5 a5 s gb5 f5 e e5 f5 g5 s e5 eb5) and not an integer. From your question I would not have guessed that this is what you want. (loop for i in '(0 5 -2 3 8 1 6 -1 4 9 2 7) append (pitch-transpose i (loop for bar in mat collect (list (rnd-order (first (gen-divide 5 bar)) :seed 20) (second (gen-divide 5 bar)))))) I was curious for myself how I would divide a bar and work only on half of it because you mentioned "divide". But this does not rnd-order bar by bar , but half of a bar only. But good that it helped.
  10. I think the first example is what you are looking for. But I also tried some other possibilities. If I got it wrong let me know. (setf mat '((e f5 g5 a5 s gb5 f5 e e5 f5 g5 s e5 eb5) (e d5 e5 f5 s d5 db5 e c5 d5 e5 s c5 b4) (e bb4 c5 d5 s b4 bb4 e a4 bb4 c5 s a4 ab4) (e g4 a4 bb4 s g4 gb4 e f4 g4 a4 -e))) (loop for i in '(0 5 -2 3 8 1 6 -1 4 9 2 7) append (pitch-transpose i mat)) ;;rnd-order events in each bar then transpose the new material (loop for i in '(0 5 -2 3 8 1 6 -1 4 9 2 7) append (pitch-transpose i (loop for bar in mat collect (rnd-order bar :seed 20)))) ;;rnd-order only :type (here :pitch, could also be :length etc) in each bar (loop for i in '(0 5 -2 3 8 1 6 -1 4 9 2 7) append (pitch-transpose i (loop for bar in mat collect (rnd-order bar :type :pitch :seed 20)))) ;;rnd-order everything with :type :all in each bar (loop for i in '(0 5 -2 3 8 1 6 -1 4 9 2 7) append (pitch-transpose i (loop for bar in mat collect (rnd-order bar :type :pitch :seed 20)))) ;; divide each bar in two and switch the two halfs in the bar (loop for i in '(0 5 -2 3 8 1 6 -1 4 9 2 7) append (pitch-transpose i (loop for bar in mat collect (list (second (gen-divide 5 bar)) (first (gen-divide 5 bar)))))) ;; divide each bar in two and only rnd-order the first half (loop for i in '(0 5 -2 3 8 1 6 -1 4 9 2 7) append (pitch-transpose i (loop for bar in mat collect (list (rnd-order (first (gen-divide 5 bar)) :seed 20) (second (gen-divide 5 bar)))))) ;; divide each bar in two and rnd-order :type :all of the second half and switch (loop for i in '(0 5 -2 3 8 1 6 -1 4 9 2 7) append (pitch-transpose i (loop for bar in mat collect (list (rnd-order (second (gen-divide 5 bar)) :type :all :seed 21) (first (gen-divide 5 bar))))))
  11. Another way of solving your original request only using Opusmodus-functions could be: (setf mat '((e f5 g5 a5 s gb5 f5 e e5 f5 g5 s e5 eb5) (e d5 e5 f5 s d5 db5 e c5 d5 e5 s c5 b4) (e bb4 c5 d5 s b4 bb4 e a4 bb4 c5 s a4 ab4) (e g4 a4 bb4 s g4 gb4 e f4 g4 a4 -e))) (setf theme-tr (assemble-seq (pitch-transpose 0 mat) (pitch-transpose 5 mat) (pitch-transpose -2 mat) (pitch-transpose 3 mat) (pitch-transpose 8 mat) (pitch-transpose 1 mat) (pitch-transpose 6 mat) (pitch-transpose -1 mat) (pitch-transpose 4 mat) (pitch-transpose 9 mat) (pitch-transpose 2 mat) (pitch-transpose 7 mat)) ;;;;;; or more flexible (setf t0 (pitch-transpose 0 mat)) (setf t5 (pitch-transpose 5 mat)) (setf t-2 (pitch-transpose -2 mat)) (setf t8 (pitch-transpose 8 mat)) (setf t1 (pitch-transpose 1 mat)) (setf t6 (pitch-transpose 6 mat)) (setf t-1 (pitch-transpose -1 mat)) (setf t9 (pitch-transpose 9 mat)) (setf t2 (pitch-transpose 2 mat)) (setf t7 (pitch-transpose 7 mat)) (setf theme-tr (assemble-seq t0 t5 t-2 t8 t1 t6 t-1 t9 t2 t7)) This is also easy editable and expandable and you can do more with it: (setf theme-tr2 (assemble-seq (rnd-order '(t0 t5 t-2 t8 t1 t6 t-1 t9 t2 t7)))) (setf theme-tr3 (assemble-seq (rnd-order '(t0 t5 t-2 t8 t1 t6 t-1 t9 t2 t7) :seed 2023) )) (setf theme-tr4 (assemble-seq (reverse '(t0 t5 t-2 t8 t1 t6 t-1 t9 t2 t7) ) )) (setf theme-tr5 (assemble-seq (rnd-sample 24 '(t0 t5 t-2 t8 t1 t6 t-1 t9 t2 t7) ) ))
  12. I have just remembered that the book can be read online for free. Link: COMMON LISP: A Gentle Introduction to Symbolic Computation I bought the book because I like books. What I meant was an extra category like "function examples" , but named "General LISP" or so . Yes, one for "General Music Theory" or "Music basics" would be a good one, too. Opusmodus is where both meet. Yes, the LISP you need for Opusmodus I am certain I can show you in a day, so you can use it. So when you happen to be in Munich sometime I would enjoy doing this and have some glasses of wine .
  13. This book has a very good entry gradient: "Common LISP" by David S. Touretzky I red some books before that but most took me too far and covert things I didn't care about. This one covers the basic things with good examples. It was the last book on LISP I bought and it was the most fun. It will take you as most 2 weeks to get the main things. You won't need all for Opusmodus. Mostly list manipulation. I agree with Janusz. A lot in Opusmodus will make more sense. In short time things won't look complex at all. There are much, much more things to learn in music (not even talking about learning an instrument) then in LISP. The theory of LISP is as easy as it can get. I explained it to my wife on a walk through the park and she doesn't need it but got the basics and liked it. Well, there is the next step to apply it. To our advantage we have the Opusmodus environment to try things and experiment and get good error messages. Maybe we could have a special place in the forum for LISP questions . So the more fluent LISPers can help out the not so fluent.
  14. I can recommend reading the "Book1". You will get a lot of good ideas. Especially for the more organized and tonal music. Please keep asking questions and post ideas. That is what the forum is for. I think there is not enough traffic here. Any question is valid because people use Opusmodus for different things and in different depth. Some every day for complete compositions, some just to create snippets for MIDI etc. Some do it since years ,some started yesterday. Some use only Opusmodus, some a lot of other tools. Some mostly compose, some play there instrument most of the time. When answering you seldom know where the asking person comes from. So you sometime miss the idea. Thank you for the "well done". I have been on your site before. Excellent. You are a real composer and musician. I have no training in any of both. So I don't compare. I like to play with my guitar more in a way of a dervish dance. Have a groove and fly over it. Opusmodus, MAX/MSP, VCV-rack and DAWs I use mostly generative to be surprised by the results. More of an adventure. I seldom know what will come out at the end. Most of my playing around I don't keep because having fun was good enough and I can do something else another day. The surprising thing is that when I come back to some of the recordings and I forgot how I did it , I can appreciate it more. On the consuming side I am mostly into Mahler, Schubert, Atterberg, Stenhammar String Quartets, Mendelssohn String Quartets, Lachenmann, Rihm and always looking for new stuff. Lately more on the tonal side. I had listend to the whole "Donaueschinger Musiktage" CD collection (all recordings ever done there) for a long time. A lot of stuff and when it became repetitive I came back to the old masters and found my romantic side again. And for sure I listen to a lot of Jazz, Rock and Electronic. As long as I can feel that the people doing it are having a good time.
  15. (loop for i in '(0 5 -2 3 8 1 6 -1 4 9 2 7) append (pitch-transpose i mat)) Would also keep the 4/4. (append instead of collect) "Loop" is important in lisp. Google gives you a lot of examples. I like the book "Common LISP" by David S. Touretzky to better my LISP or refresh what I forget. Or the site Welcome to Common-Lisp.net! COMMON-LISP.NET With a lot of online resources.
×
×
  • Create New...

Important Information

Terms of Use Privacy Policy