< Back to IRCAM Forum

Om-Frak fractal music generator

Hello! So I’ve been working on this musical fractal generator, and I’m pretty sure it is the most versatile at what it does yet. It’s called OM-Frak and it’s most basic function is to iteratively insert musical shapes into each other, but there are lots of options that allow for customization, and it can also be used for some other purposes. I’ve written some fairly in-depth documentation, and put it together with the patches hhttps://github.com/nameiwillforget/OM-Frakere on github:

and I thought it would make a nice library for OM-sharp. Can someone take a look at it and tell me if it would be suitable? The documentation file should hopefully do a decent job at explaining the algorithm, the input and output. Currently the code patches themselves are undocumented except for the exemplary “Mahlstrom” composition I’ve created to illustrate the functionality, but I could equip them with some documentation if that is desired.

I also thought OM-Frak would be suitable for an article somewhere. The documentation as is is already halfway there. Do you think it would be worthy of being published? I’ve seen the fractal article in the first OM-composer’s handbook, and while it is very different in its purpose, I thought the same audience that enjoyed it would surely enjoy OM-Frak too.

Also, any testers please tell me about any bugs encountered and any wishes for other options.

Hello,

I ran the “Mahlstrom” patch and I get this error:

Opening document: /Users/lotus/Desktop/OM-Frak-0.8/patches/Mahlstrom.opat
Opening document: /Users/lotus/Desktop/OM-Frak-0.8/patches/om-frak.opat
Opening document: /Users/lotus/Desktop/OM-Frak-0.8/patches/replacen.opat
Opening document: /Users/lotus/Desktop/OM-Frak-0.8/patches/replacen.opat
Opening document: /Users/lotus/Desktop/OM-Frak-0.8/patches/replacen.opat
Opening document: /Users/lotus/Desktop/OM-Frak-0.8/patches/replacen.opat
Opening document: /Users/lotus/Desktop/OM-Frak-0.8/patches/replacen.opat
Opening document: /Users/lotus/Desktop/OM-Frak-0.8/patches/replacen.opat
Opening document: /Users/lotus/Desktop/OM-Frak-0.8/patches/replacen.opat
Opening document: /Users/lotus/Desktop/OM-Frak-0.8/patches/replacen.opat
Opening document: /Users/lotus/Desktop/OM-Frak-0.8/patches/om-frak-core.opat
Opening document: /Users/lotus/Desktop/OM-Frak-0.8/patches/addabs.opat
Opening document: /Users/lotus/Desktop/OM-Frak-0.8/patches/replacen.opat
Opening document: /Users/lotus/Desktop/OM-Frak-0.8/patches/replacen.opat
Opening document: /Users/lotus/Desktop/OM-Frak-0.8/patches/replacen.opat
Opening document: /Users/lotus/Desktop/OM-Frak-0.8/patches/replacen.opat
Opening document: /Users/lotus/Desktop/OM-Frak-0.8/patches/replacen.opat
Opening document: /Users/lotus/Desktop/OM-Frak-0.8/patches/replacen.opat
Opening document: /Users/lotus/Desktop/OM-Frak-0.8/patches/replacen.opat
Opening document: /Users/lotus/Desktop/OM-Frak-0.8/patches/listord.opat
Opening document: /Users/lotus/Desktop/OM-Frak-0.8/patches/ordlist.opat
Opening document: /Users/lotus/Desktop/OM-Frak-0.8/patches/delfirst-n.opat
Opening document: /Users/lotus/Desktop/OM-Frak-0.8/patches/addabs.opat
[!!] :: PATCH NOT FOUND: #P"/Users/lotus/Desktop/OM-Frak-0.8/patches/../../../length-1.opat" !
Opening document: /Users/lotus/Desktop/OM-Frak-0.8/patches/listord.opat
Opening document: /Users/lotus/Desktop/OM-Frak-0.8/patches/om-frak-core.opat
Opening document: /Users/lotus/Desktop/OM-Frak-0.8/patches/rotate.opat
Opening document: /Users/lotus/Desktop/OM-Frak-0.8/patches/rotate.opat
Opening document: /Users/lotus/Desktop/OM-Frak-0.8/patches/rotate.opat
Opening document: /Users/lotus/Desktop/OM-Frak-0.8/patches/splitc.opat
Opening document: /Users/lotus/Desktop/OM-Frak-0.8/patches/ordlist.opat
Opening document: /Users/lotus/Desktop/OM-Frak-0.8/patches/addabs.opat
[!!] :: PATCH NOT FOUND: #P"/Users/lotus/Desktop/OM-Frak-0.8/patches/../../../length-1.opat" !
Opening document: /Users/lotus/Desktop/OM-Frak-0.8/patches/deleten.opat
Opening document: /Users/lotus/Desktop/OM-Frak-0.8/patches/ordlist.opat
Opening document: /Users/lotus/Desktop/OM-Frak-0.8/patches/ordlist.opat
Opening document: /Users/lotus/Desktop/OM-Frak-0.8/patches/ordlist.opat
[!!] :: MISSING REFERENCE FOR BOX 'length-1'.
[=> File '#P"/Users/lotus/Desktop/OM-Frak-0.8/patches/../../../length-1.opat"' not found]

`

Oh, so sorry, I’ve accidentally saved one patch to the wrong location. I’ve added the missing patch to the patches folder now.

strange…

image

That is strange. Can you try restarting OM#? I’ll try it from a clean install on another system so I can see if I can replicate the bug.

So, the bug replicates and I think I see the problem, which is that the system path of the patch in question is erroneous. I’ll need a moment to correct this. I’m truly sorry, I should have tried it out from a foreign system before I put it up here.

Alright, I’ve solved the bug, made a new release and tried it out on a foreign system, where it worked, so from all I can tell, the error should be resolved. Weirdly enough though, I now get a “Last argument to apply is too long: 2122” error (which generally comes up if I set the recursion number too high, so the lists become too long) when I try to run Mahlstrom with the recursion depth I’ve used before, though the algorithm wasn’t changed in any substantial way, and the output is otherwise the same, as far as I can tell. I’ve reduced the recursion depth by 1 for now, and the result sounds exactly as it should and has before, except one iteration shorter. If anyone wants to try it out, it would be interesting to see if the error is reproduced on another computer (if the recursion depth is raised by 1 again).

In any case, the algorithm should perform now.

1 Like

yes, it works fine,

thank you

jerome

1 Like

Hi,

Does it work on OpenMusic, or only on OM# exclusively? In any case, thanks for this. Great project.

All the best,
António

Thanks! OpenMusic doesn’t have functional programming, right? In that case it won’t work, since I’ve mostly used mapcar and reduce instead of loops. It would be possible to design the basic algorithm using loops, but it would be even less tidy. Moreover, functional programming allows the use of functions as input arguments, which has made the algorithm much more general than it otherwise would have been, so while it’s not part of the core functionality, it is important as a modification tool.

Best,
Alex

Hi Alex,

I actually don’t think that OpenMusic has more limitations than OM# when it comes to LISP… I think that they both share the same capabilities, but I may very well be wrong on this.

All the best,
António

Hi

No there are no Lisp limitations concerning OM since most of OMsharp’s code is taken from OM. Saying that OpenMusic has no functional programing is absurd.

Best
K

1 Like

Oh, ok, then it should run fine on OM. I thought it didn’t have it because the OM# handbook features it so prominently and I thought the handbook mostly covered the differences between the two.

Best,
Alex

Dear Alex,

You can find more info here:
https://support.ircam.fr/docs/om/om6-manual/co/LispFunctions.html

Although its a little outdated.

Best
K

1 Like

Hi all,

Is there a way to open these .opat files in OpenMusic?

Hi hjemadden,

I tried to open them in Openmusic after I was told that it should be possible to do so, but they didn’t open and I didn’t know enough about the internals of Lisp to understand why. Since they are basically just Lisp-code, porting them shouldn’t be too hard, but I don’t know exactly what to do and currently don’t have the time to find out. I’m sure someone on this forum knows though and if you’re interested and could look into it, that would be great, it might be as simple as changing the file name and some heading in the file or something…

Dear maneiwillforget,

No this is unfortunately not possible. these lisp files are omsharp graphical patches, and not plain lisp code. Since omsharp has its own api that differs with OM’s you will not be able to read them without “translating” them as OM patches.
Libraries code is a different issue. You can indeed port them to OM and omsharp (and vice versa) at the condition they don’t involve graphical objects.

Best
K