• jameslo

    @PD-Pi Oh sorry, I didn't mean to digress, I honestly thought this was relevant to your original question.

    posted in technical issues read more
  • jameslo

    @manuels That's clever, thanks! I especially like how you get the slope of the input phasor (compensating for that downward jump every cycle) and how you construct the output phasor. But I think there are two issues with it. Firstly, a sync will reset the phase of the output phasor at an arbitrary point unless the output phasor frequency is an exact multiple of the input frequency. Secondly, without sync, I think the output phasor may drift WRT the input phasor due to floating point roundoff error. Agree?

    Backing out to look at the big picture again, i.e. Brendan's question, this means that it couldn't be used to make either a "hardsync" synthesizer (disclaimer: I don't really know what that is) or a "phasor~-synchronized system", assuming that both require a precise phase relationship between the input and output phasors and that the output phasor doesn't contain discontinuities. What do you think?

    posted in technical issues read more
  • jameslo

    @ddw_music Yep, more reasons why it would be great to see a patch.

    This morning I'm thinking that in the case of equal temperament, would sync between two oscillators even be meaningful? If the ratio between two pitches is a floating-point approximation of an irrational number, well gosh, that's as complicated as having no sync at all, isn't it?

    posted in technical issues read more
  • jameslo

    @PD-Pi Yeah, but the devil's in the details. I'd love to see a patch.

    posted in technical issues read more
  • jameslo

    @PD-Pi Just read the documentation for rate~...also interesting. I wonder how they do that?

    posted in technical issues read more
  • jameslo

    @Obineg Interesting. Can you show me a patch that, say, generates all 12 equally tempered tones starting with middle C from 1 phasor?

    posted in technical issues read more
  • jameslo

    @porres Yes, on MacOS 14.4.1 using Pd 0.54.1, I created an aggregate device using the built in speakers and my Yamaha 01V96i. [dac~] inputs 1 and 2 output to the built in speakers, and inputs 3 and 4 output to the first two USB sources on my mixer. I've never tried on a Windows machine though.

    PS Oh but to get inputs 1 and 2 working I had to fiddle with the volume control a little, not sure why

    PPS And to be clear I used Audio MIDI Setup in MacOS to create the aggregate device, not the "Use Multiple Devices" option in Pd (which may not be an option on a Mac, also not sure)

    posted in technical issues read more
  • jameslo

    @PD-Pi Wait, if each clone instance is a voice, then they can't share a single phasor because then they'd all have to play the same pitch, which is not my understanding of a polyphonic synth.

    posted in technical issues read more
  • jameslo

    @brendanmac I'm not a synthesis guy, but a friend told me that you sometimes want your ADSR synchronized with oscillator phase to make attacks sound consistent. So maybe that's a reason to not use a single centralized phasor? Looking forward to the replies of more knowledgeable folk.

    posted in technical issues read more
  • jameslo

    @EEight Just to add on to what David said, multiplying an audio signal by -1 is the same as using a phase-inverted cable.

    posted in patch~ read more
  • jameslo

    @brendanmac The Pd help examples contain two ways to address aliasing. J07.oversampling.pd shows how to use oversampling to create a better alias filter--just replace the phasor with your preferred method of generating square waves. J09.bandlimited.pd replaces the jump with a specific kind of squiggle, but for a sawtooth. If you want to do the same for a square wave, I think all you have to do is replace the phasor~ with the equivalent triangle wave. It's called "transition splicing" in Miller Puckette's book https://msp.ucsd.edu/techniques/latest/book-html/node196.html

    posted in Off topic read more
  • 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. :)

    posted in technical issues read more
  • 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)

    posted in technical issues read more
  • 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.
    Screenshot 2024-03-22 152448.png 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 Screenshot 2024-03-23 084341.png 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~]

    posted in technical issues read more
  • 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?

    posted in technical issues read more
  • 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.

    posted in technical issues read more
  • 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.

    posted in technical issues read more
  • 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?

    posted in technical issues read more
  • jameslo

    From [pd~] help:

    Screenshot 2024-03-05 093804.png

    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?

    posted in technical issues read more
  • jameslo

    @seb-harmonik.ar Yeah, I think that's it, nice work.

    Screenshot 2024-03-02 173357.png
    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:
    Screenshot 2024-03-02 174406.png
    OF COURSE it seems so obvious now that I see it! :)

    posted in technical issues read more
Internal error.

Oops! Looks like something went wrong!