SynthMaker

recursive modules

Archive · 2005 4 old posts

From the original SynthMaker forum (2004–2014), with its members’ names and dates.

NothanUmber ·

Hi,

wouldn't it be cool to be able to define recursive modules with Synthmaker? In order to be able to do that one would need a mechanism to place some kind of "reference" to a module into the toolbox that points to a module so that it can be changed afterwards - in that case by adding a reference to itself into it's structure. Of course that would have many side effects concerning e.g. the code and gui creation - both generators would have to recognice terminal conditions (and warn if there is nothing like that instead of "going berserk") so it's presumably not a simple task - but (on my opition) it could be really worth the effort: Imagine arbitrary loops with tail recursion could be used to set up huge amounts of oscillators for "special" additive synthesizers that determine the number of oscillators depending on the complexity of a sample that should be resynthesized, flexible GUIs that adapt themselves to arbitrary circumstances (e.g. a knob determines the number of filters what automatically leads to an expanded surface with additional fiter controls) etc. That should greatly reduce the cases where one otherwise would have to choose a "conventional" programming language over Synthmaker and thus pay the price of longer development time for some additional flexibility (respectively make more complex synth possible to people who don't want to put some effort into learning e.g. C++ or Supercollider etc.)

Greetings, NothanUmber

P.S.: No, I don't expect that to be ready for 1.0, just an idea for your next complete rewrite 😉

stefan ·

I think what you want to achieve will be doable in the next release. Not by using recursion, but there will be a loop module that might work for these things. I'm not sure though, so don't take my word on it 🙂

jorge ·

NothanUmber, thanks for planting the recursive seed inside my brain. At the moment, there are no function calls in the code component. I think what you suggest would be a question of implementing them and also a way to avoid infinite loops. The way stefan mentions, using loops, would be much easier to implement, it doesnt require much work at all and would still allow you to set up a huge amount of oscillators. Loops can easily be in v1.0, recursive modules most probably not.

NothanUmber ·

That's a really responsive forum here, much appreciated!

Well yes, loops would also do the trick (at least for tail recursions and that's what I was mostly looking for). Avoiding function calls would indeed be difficult (one could try to solve the recursion what's possible in many but not all cases (have a look at e.g. http://www.math.kth.se/math/student/cou ... linrek.pdf )). Perhaps one could make an optimizing compiler that doesn't create function calls by default but only for modules it identifies as recursive or more simple: One could offer a special module that has to be used for recursive constructs. But as said loops should be sufficient for many cases.

Greetings, NothanUmber

Wrote something here? To have a post removed or your name hidden, write to [email protected].

Before your first post

A few rules keep this a friendly place. You agree to them once.

Shown next to what you post, here and in the app. It doesn’t have to be your real name: 3–24 lower-case letters, digits or _ (capitals become lower case, spaces become _).

    Then your post goes up straight away.

    Delete this reply?

    Open it in SynthMaker?

    It goes on the track you’re editing there, in place of that track’s sound, and into My sounds. Your other tracks stay as they are.

    Want to keep that track’s sound? Start a new song in SynthMaker first (Song › New song), then open this.

    Report this reply?

    Only the developer reads reports. The person isn’t told who reported them.

    What’s wrong with it?

    Block this person?

    You won’t see their posts and replies here any more. They aren’t told, and you can unblock them at any time.

    People you’ve blocked

    Their posts and replies are hidden from you. Unblock someone to see them again.

    The community rules

    A few rules keep this a friendly place. Everyone agrees to them once, before their first post.