Jump to content

Transpose whole list


Recommended Posts

I try to use the function filter-repeat 1 to avoid repetitions of notes like here,  it doesn't work

image.png.dc52c10eb64566145567d04714daf531.png

 

(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)))))))

 

Link to comment
Share on other sites

This style of code is hard to read and considered poor practice. It's advisable to use variables for individual expressions, especially when you're just starting out. Before stating that something isn't working, it's a good idea to study the function carefully and run some tests or experiments.

 

Good forum etiquette suggests starting a new post if the previous issue has been resolved. Otherwise, we risk having a single, elongated conversation that strays from the original topic indicated by the post title.

Link to comment
Share on other sites

You are right, I will open a new message!

 

but I was just saying I had an error message...that is all!

 

;Compiler warnings for "/Volumes/web/Opus modus file/test rhytme.opmo" :
;   In an anonymous lambda form at position 0: In the call to filter-repeat with arguments (1 (rnd-order (car (gen-divide 5 bar)) :type :pitch) (car (cdr (gen-divide 5 bar)))),
;     the variable portion of the argument list ((car (cdr (gen-divide 5 bar)))) contains an odd number
;     of arguments and so can't be used to initialize keyword parameters
;     for the current global definition of filter-repeat
> Error: OMN Parse Error: fail
> While executing: omn-to-ast, in process Listener-1(7).
> Type cmd-. to abort, cmd-\ for a list of available restarts.
> Type :? for other options.

 

 

 

 

 

 

 

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