• jameslo

    @ice-ice I have to correct a false statement I made.
    @jameslo said:

    Edit 2: Hmm, there might be something wrong with the expression for the first outlet of fexpr~. See how it references the last value of the 2nd outlet? I don't think that value is calculated yet, and so it's using 1 sample old data. Maybe I should've xor'd the 2 bits that are 1 bit to the left?

    Nope. When [fexpr~] has multiple expressions, they're evaluated bottom to top, i.e. the outlets are evaluated right to left. Therefore, $y2 is calculated before it is potentially used to calculate $y1.

    posted in technical issues read more
  • jameslo

    @Ice-Ice Ha! I went down this same rabbit hole but I was thinking about the TR-909
    https://electricdruid.net/tr-909-noise-generator/
    and I didn't use fexpr~ or expr~. The algorithm definitely requires feedback.
    TR909 LFSR.zip
    It might not be the most efficient way, but I like how the patch looks like the circuit.

    Edit: Thanks for the fun problem. I tried to make the example in the last link you posted using [fexpr~], see what you think.
    srNoiseFexpr~.pd (use [metro~] from the zipfile I uploaded earlier)

    Screenshot 2026-06-02 083707.png
    Edit 2: Hmm, there might be something wrong with the expression for the first outlet of fexpr~. See how it references the last value of the 2nd outlet? I don't think that value is calculated yet, and so it's using 1 sample old data. Maybe I should've xor'd the 2 bits that are 1 bit to the left?

    posted in technical issues read more
  • jameslo

    @xaverius Because Pd evaluates the control graph depth first, and you happened to connect the left inlet of [_pan] to the right spigot before you connected it to the left spigot. That means Pd will go as deep as it can down the right side (including the feedback on the outside of the abstraction) before it evaluates the left side. That depth-first plunge stops at [delay 1] because the whole point of [delay 1] is to schedule the evaluation of the rest of the graph for 1 ms later. With this understanding, print out what you're sending to the right inlet of [_pan] (both with the delay and without) and I think you'll see what's happening.

    Personally, I wouldn't do this with feedback, just with a toggle and select, e.g.

    Screenshot 2026-05-26 204124.png

    posted in technical issues read more
  • jameslo

    @jorbecke I am not qualified to opine on your mental health, but if you are referring to the hurleur links going nowhere, then it might be a Google Chrome thing. Is that what you're using? If so, try another browser. Otherwise I'd have more modest expectations of a 13 year old thread :)

    posted in tutorials read more
  • jameslo

    @y0g1 My friend who uses Max/MSP just explained to me that phasor~ resets when the right input signal changes to a non-zero value, which means that in my fexpr~ version the test should be "$x != 0 && $x != $x[-1]"

    Edit: argh, I even misunderstood my friend. @lacuna is correct below--it's when the signal changes to a non-zero value from zero

    posted in technical issues read more
  • jameslo

    @y0g1 said:

    "phasor~"'s phase is reset when receiving a non zero signal.

    If this was a test in college I'd be there during office hours arguing that the question was misleading :)

    posted in technical issues read more
  • jameslo

    @y0g1 Assuming the sample frequency is 44.1khz, the phasor frequency is fixed at 1, and you don't need to support any other feature than what you mentioned above, try [fexpr~ if($x != 0, 0, ($y + 1) % 44100)] to replace both the phasor and following multiplication.

    posted in technical issues read more
  • jameslo

    @playinmyblues The object named a12 should be an array, not a canvas. Replace it and things should start working.

    posted in technical issues read more
  • jameslo

    @y0g1 said:

    How would you adapt metronome timer for getting the difference between 4 consecutive "onsets", then reset the sample counter to be ready for the next 4 onsets ?

    Ugh, in audio domain? I dunno but off the top of my head I think it would be nasty/not worth it. Can't you just take a stream of timing intervals in control domain and process them in groups of 4? How you would align each group of 4 isn't obvious to me either, which is what I think @ben.wes was alluding to earlier RE "cooldown period". Edit: maybe [fexpr~] could help.

    posted in technical issues read more
  • jameslo

    @y0g1 I'm unable to test, but your patch looks like [fluid.ampfeature~] and [fexpr~] is supposed to be outputting 1 when the signal is above some threshold and 0 otherwise, is that correct? Is it working as you expect?

    If so, the only thing you need from my patch is the part that extracts the leading edge as a pulse, inverts it, and then counts the samples between pulses, but if the signal out of [fexpr~] isn't clean (i.e. outputs one and only one contiguous block of 1s for every drum note) then my counter will output junk. That's why I was asking about [lop~] and threshold in my patch, which is what I assumed you were using for signal conditioning, e.g. for novelty metronome sounds I had to adjust them to get clean square pulses.

    posted in technical issues read more

Internal error.

Oops! Looks like something went wrong!