< Back to IRCAM Forum

Weird problems with p-form

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))
|3-1|

OpenMusic 2 > (p-form :fn '(1 0 2))
|3-1|

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

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

OpenMusic 5 > (p-form :fn '(0 2 7))
|3-9|

OpenMusic 6 > (p-form :fn '(2 0 7))
|3-9|

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,
perti

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.

Usage:
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)

regards
wolfgang

music-pcs-update.lisp (3.88 KB)

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,
perti
n.b.: please om-team, include this fix in the next release

Re:

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 6.x.app/Contents/Init,
or simply put your Lisp code in the Workspace’s “user” folder instead.

—Jean

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

=> done (OM 6.14) :
http://forumnet.ircam.fr/shop/fr/forumnet/43-openmusic.html