-
jameslo
@seb-harmonik.ar In other words "technically 32 but really 64" since the effective sample rate inside the blocked patch is half. Sort of like agreeing to repay double your loan but waiting until inflation has eroded the dollar to one half its value.
-
jameslo
@seb-harmonik.ar Lovely explanation, thanks, but can you say more about
actually,
[bang~]
can go lower than 64, it just can't go lower than 64 per the root patch samplerate.How can I make [bang~] output (and execute control rate logic) after each 32 (for instance) sample audio block is processed?
(Apologies to @mbbaker for hijacking topic)
-
jameslo
@mbbaker I never use downsampling so I can't explain that behavior off the top of my head, but I know that the fastest [bang~] will output is once every 64 samples, which you can see documented in {bang~] help. That explains the behavior when there's no downsampling.
I modified your patch to display a ramp that goes from 0 to 1 every 64 samples to see what's going on: tabwrite~ half table.pd Now I can see that 128 1 1 is equivalent to 64 1 0.5, but I'm struggling to understand why.If you're more interested in doing rather than knowing, try substituting [tabsend~] for [tabwrite~]. That consistently writes the first half of the table but I'm not sure if it is excerpting the signal in the way you expect. Unlike @Maelstorm's windowing solution that @whale-av linked to, it doesn't overwrite the second half of the table. [tabsend~] outputs continuously so if you need to initiate it with a bang then you should look into [switch~]
-
jameslo
@oid On Windows Pd sometimes runs weirdly slow when the selected audio interface is unhappy for whatever reason. It's usually accompanied with terrible sound or silence which @ionicle didn't mention, so I was also hesitant to suggest that possibility. @ionicle: maybe try selecting a different output to see if you get better results?
-
jameslo
@FFW Thanks, your approach is the way I was originally thinking about it, but since I'm new to dynamic patching and my clone has a lot of connections, I started down a slightly different path. Since I know I can set a $n argument from an enclosing patch, I was thinking I could make a wrapper for my clone patch and instantiate the wrapper instance dynamically with the args set to the values I want. But even this is moot because in my prev post I discovered that there are simpler ways to achieve my goal than trying to parameterize the clone start index flag.
-
jameslo
@oid I never use [set <n>(, but my understanding is that it modifies the state of clone's built-in round-robin allocator (which I'm not using). I'm trying to change how clone assigns the argument $1 inside each abstraction instance that clone has loaded so that I don't have to worry about which subprocess a particular clone is running in. Subprocess 0 will have clones 0-99, subprocess 1 will have clones 100 - 199.... But now (of course) that you've forced me to think about it some more, yes I could just add an offset to the value of $1 in each cloned abstraction, and set that offset with a message from the main process. That's probably clearer than dynamic patching.
-
jameslo
Thanks for the ideas.
@whale-av said:Maybe you "just" add the arguments after the patch name?
Yeah, that seems like something undocumented that Pd would support, but alas, it doesn't. [pd~ start subprocess.pd 42( just causes the subprocess console to print ""42.000000: can't open"
-send "msg..." -- send a message at startup, after patches are loaded
.... where does it go?...... maybe -send receivename message ...?-msg "cheer go bears" sends [go bears( to [r cheer], which is probably what you meant. I'd use that but what I'm trying to do is set the clone start index [clone -s $1 dollyTheSheep] and there's no clone message that does that (as far as this blind man can see).
-extraflags <s> -- string argument to send schedlib
I don't know where to begin with this one.
Oooh, wait! If it doesn't exist, then maybe -send "msg" together with dynamic patching would work?
-
jameslo
From [pd~] help:
It looks like I just need to find the startup flags that let me pass args to the top-level abstraction, but (having already proven myself to be functionally blind on this forum) I can't find them. Here is someone wondering the same thing in 2011 with no resolution https://forum.pdpatchrepo.info/topic/4600/pure-data-start-up-arguments-as-abstraction-arguments. Do these flags exist?
-
jameslo
@seb-harmonik.ar Yeah, I think that's it, nice work.
Sorry for confusion about changing the # of outlets. I really meant "adding more outlets manually without a whole lot of effort". Yours is easier than mine, so you win that one too.For those following along at home, round-robin looks like this:
OF COURSE it seems so obvious now that I see it! -
jameslo
@whale-av like this:
I was a hardware gofer in my 20s, so maybe this seems odd in 2024 but it's just like the ICs I remember from the early '80s. (RE 689 Hz, sorry to restate the obvious to you)