Group Admins

  • Profile picture of Karim
  • Profile picture of Jean


Public Group active 1 day, 5 hours ago

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

weird problems with p-form

Author 3 Subscribed Users |
Profile photo of perti

hello listers,

i’m working in a rather complex patch which was giving erroneous results. it might be something i didn’t understand or i’m doing something wrong (most likely), but see by yourself…

OpenMusic 1 > (p-form :fn ‘(0 1 2))

OpenMusic 2 > (p-form :fn ‘(1 0 2))

OpenMusic 3 > (p-form :fn ‘(0 5 7))

OpenMusic 4 > (p-form :fn ‘(5 7 0))

OpenMusic 5 > (p-form :fn ‘(0 2 7))

OpenMusic 6 > (p-form :fn ‘(2 0 7))

as you see, p-form gives an erroneous result, just on that particular set-class. it seems it gets confused with TnI of that set-class. see that an inversional instance of 3-9 results in nil, but if you give ‘(0 2 7) or any Tn of it will yield the right set-class. for other set-classes the results are ok.

it was very difficult to pinpoint this as it was buried inside an internal patch of an internat patch of an internal patch…
can anyone please confirm this strange behaviour? i can confirm that is the same with pcs-prime-form function and with the icon as well.
i’m still on 6.12/el-capitan
thank you so much in advance,

April 5, 2018 at 18:18 #26175
Profile photo of wolf66

hello peri,

I’v made a fix for this (small rewrite of the functions to get prime forms and normal order of a pitchclass-set) and if you like – or someone else – you can use it.

for OM-6.12 and before: put the file in patches folder to load the file automatically…for OM-6.13 I have no idea where the file should be located. (you can also just compile the functions inside the file)


April 6, 2018 at 08:00 #26177
Profile photo of perti

thank you wolf66!

your patch saved me a lot of working hours. i designed one of my basic patches some 2-3 years ago. then was included in another bigger patch to work with some k-net basic operations. now using this last patch included in other more complex ones. tracing the problem took me days, literally. because this error was only given in set-class TnI 3-9, and so it was difficult to chase it while testing. more than that, as i was now using the patch to actually compose a piece which included that very set-class i’ve got really stuck. thanks again for your solution!
best regards,
n.b.: please om-team, include this fix in the next release

April 6, 2018 at 13:49 #26186
Profile photo of Jean


OM-6.13 I have no idea where the file should be located.

=> you might get useful info in the OM 6.13 README file:

The ‘patches’ folder is no more visible: you can find it as OM,
or simply put your Lisp code in the Workspace’s “user” folder instead.


April 6, 2018 at 21:25 #26189
Profile photo of Jean

n.b.: please om-team, include this fix in the next release

=> done (OM 6.14) :

August 28, 2018 at 09:59 #27544

You must be logged in to reply to this topic.

Log in now