Apologies for spam; we've changed our policy by requiring approval for accounts, and deleted all existing spam and user - thanks for your help flagging content. We continue to test our forums and Vanilla software, aiming for release early in 2013. If you need to give us feedback outside the forum, contact us via http://createdigitalmusic.com/contact/ or on Facebook
Do you think it will be possible to call throw~ on multiple items in a list?
  • I'm making an app that will run a signal through an unknown number of effects in any given order. 

    To keep the effects abstracted, I'm routing signal through them using throw~ and catch~.   

    To make it so PD can use the effects in any order, I'm thinking that I'll create a list of message names, then loop through that list (using 'until') and call throw~ on each item.

    But before I go down this road, I'd like to verify that this approach won't be too slow. PD is magic, and one gets used to that magic. But looping through a list and throwing an audio signal thousands of times a second for each item in the list seems like it will probably fail.

    PD experts, what do you say? If this will indeed fail, can you think of another way to achieve what I'm looking to do? The next option, I guess, is dynamic patching.... 

    All help appreciated... thanks.
  • By calling throw~ on each item, do you mean sending a set message to a throw~ object for each item? If that's what you have in mind, then it won't work at all. Control messages take zero logical time, i.e., while [until] is executing, no audio will be computed. The throw~ object will only become active after [until] is done, and then it'll just add its signal to the bus corresponding to the last item in your list.
  • Without actually knowing any of that, that's sort of what I was afraid of... 

    Thank you for the reply! I'll look deeper into dynamic patching.

    Have there been any major advances in dynamic patching that you're aware of since this was written: 

    http://www.mail-archive.com/pd-list@iem.at/msg43036.html
  • For anyone looking into this in the future, PD internal messages seem like they'll be helpful with this. Documentation is well hidden here:

    http://puredata.info/community/pdwiki/PdInternalMessages/
  • Hey Shmim, 

    This is possible without dynamic patching, I've implemented a very similar feature in an app we've just released. But as Peter said I'd be careful about using [until]. 

    Maybe look at having a fixed amount of fx buses, and then dynamically (with the set message) assign each fx input and output to the buses accordingly. 

    For example, I set the first fx (fx0) in the chain to receive the input signal, the output of fx0 is routed to the input of fx1 (the next one in the chain), and so on until the last fx output is routed to the output bus. 

    Hope that helps!
  • I made a dynamic 'hub' / patch bay a few years back - my approach was to dynamically place an abstract on the canvas with a $ argument that was used as a part of it's unique receiver.  To make sure audio ran smoothly, the parent patch had to have a [switch~ 0] statement in it and it was only turned on after all audio connections were made.

    I lost that code a while back, but I remember there was some magic necessary with [namecanvas] (or at least I couldn't find a different way) and this guy has known issues with dynamic patching.  Also, I haven't ever recreated this 'hub' since in the world of libpd, you have much more powerful ways to open and connect patches.  Look at any of the Patch classes in the language wrappers and you'll see there is a dollarZero member variable that will let you send data to only one instance of a patch. This also adheres to the way pd was originally designed - patches are files and are loaded from disk.

    Hope this gives you some ideas..