Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Dependency Algorithm

Options
  • 26-11-2010 1:37pm
    #1
    Registered Users Posts: 3,945 ✭✭✭


    I'm currently writing a modular software synthesiser in C++ using the JUCE framework. The question isn't really related to those however. The problem I have is as follows.

    I have a class which is a manager for a number of units or modules if you like. These units basically can either be generators of audio (need no inputs, generate outputs) or filters (require inputs and produce outputs).

    Its the manager's task to produce a block of audio every time its asked to do so by the audio callback. So I need an algorithm that will calculate in which order the units should be processed. There is a dependency situation in that some filters that will require input need to wait until they can be processed.

    The user will be able to graphically select connections between units so the order in which the units need to be processed is not known before run time either.

    I was thinking that there must be some well known solution for this kind of problem but can't seem to find anything. Also I was thinking that it could be possible to parallelise the application by finding when things need to be processed.

    Anyone have any comments / ideas?


Comments

  • Registered Users Posts: 669 ✭✭✭whatstherush


    Hi,
    Not a 100% what you're looking for. Say you have sound source A and filter X and Y. User sets up sound source A to be first filtered through X then through Y, why do you need a an algorithm to calculate the order that has all ready been specified by the user.

    P.S. Apologizes if my understanding is off the wall.


  • Registered Users Posts: 3,945 ✭✭✭Anima


    I did some more research and I think that this algorithm is what I'm looking for: http://en.wikipedia.org/wiki/Topological_sorting

    I remember doing stuff like that in college after seeing it but I've forgotten most of it.

    I was wondering though if anyone has any input on the concurrency aspect of this? I've used threads before but I'm not so sure of how to structure something like this.


  • Registered Users Posts: 3,945 ✭✭✭Anima


    Hi,
    Not a 100% what you're looking for. Say you have sound source A and filter X and Y. User sets up sound source A to be first filtered through X then through Y, why do you need a an algorithm to calculate the order that has all ready been specified by the user.

    P.S. Apologizes if my understanding is off the wall.

    Hey sorry didn't see your reply there.

    It might just be the way that I am trying to implement the application that it requires such an algorithm. You're correct in what you say but I dunno if that still holds true with more complicated setups. I could be wrong of course!


  • Registered Users Posts: 669 ✭✭✭whatstherush


    Had a look at the wiki but still not sure what your looking for in relation to ordering the filters, so can't really help.
    Anyhoo have a passing interest in soft synths, if ya get it up and running and want a beta tester, drop us a line, would love to see what you came up with.


Advertisement