Administrateur

  • Profile picture of Karim
  • Profile picture of Jean

OpenMusic

Groupe Public active 1 day et 14 hours ago

User group for OpenMusic and computer-aided composition. Visit the Forum for discussions.

Permutation of sublists

Auteur 2 Utilisateurs souscrits |
Profile photo of michalszostalo
michalszostalo

Hi everyone,

I am wondering if there is an efficient way to apply permutations (or any other process, for that matter) to sublists. There is a patch in the FDSDB library that does this, but it only applies random permutation, whereas I’d like to control the type of permutation. I will say at the outset that I haven’t learned how to write lisp code yet, maybe it’s time that I do that, but in the meantime, if anyone has a suggestion how to do it visually I’ll be very grateful.

I’ve found one unsatisfactory workaround: flat the list of lists, apply the process, then -> group list.

Mai 30, 2018 à 17:54 #26625
Profile photo of Karim
Karim

Hi,

No group-list is a bad idea. Use instead mapcar (or omloop for more complicated stuff)
cf. attachment

Best
K

Mai 30, 2018 à 18:42 #26626
Profile photo of michalszostalo
michalszostalo

Perfect, thanks very much!

Mai 30, 2018 à 19:09 #26629

Vous devez être connecté pour répondre à ce sujet.

Log in now