I have what I think is a very simple question, but it might have a less simple solution. If I have a scenario as in the attached project (multiplying slider values), is there a way for me to make the output update even if it's the 2nd input slider I'm modifying? I understand pd's way of working, that the 1st input is working as 'bang', but is there a way to make both inputs work as such without doing it manually?
-
Constantly updating output independent of slider
-
@buddybudbud You need to use [trigger]...... you can just put [t] .... it's quicker.
Trigger takes its input and outputs it (right outlet first) or sends a bang, depending on it's arguments....
So....
[t b f] will have 2 outlets and send the floats from your fader first (the right outlet) and then send a bang from the left outlet.
Put one for every slider, and connect the "bang" outlets to the left inlet of [pack]...
You really should read http://puredata.info/docs/manuals/pd/x2.htm ....... It is absolutely essential bedtime reading!
Stop when you get to Chapter 2.9 Data Structures. You have a lot to learn before Data Structures make any sense.......
David. -
Alright, so I think I understand what you're saying, but how would one approach it with a more complex situation like the one I attached to this comment?
eq.pdLet's say I want to make the function Global_BANG does automatic. I tried doing something along what you've said, attaching the bang element to pack while using f as output, but it didn't seem to change. My hunch is it's because there's so many operations between the sliders and the pack that also would need triggers, but I worry this would cause a huge mess. Maybe there is a simpler way I'm unaware of?
-
Hi, I think that in the eq patch it's important to make sure that, when you change one of the sliders, that change triggers all of the operations that are related to that parameter. This makes the global_bang redundant, for example if you change a value that needs to be divided by 1, you can include the operation with the value change by using trigger and sending lists to the [-] object.
In this particular case, not all slider changes affect all of the biquad~ parameters, so you need to make sure that whenever each parameter is updated, all of the values stored in the [pack] object are sent out. This is done with [t b f] because [pack] sends an output only when the first inlet on the left is updated or gets a bang.
There is also no need for the [$1 $2 $3 $4 $5( message since the list coming out of the [pack] object is just the same.
Hope this helps.
-
@weightless Seemed to solve my trigger problem! Great answer, and nice organising, opened my eyes a bit for what you can do. Now I just need to get the actual band-pass filter working. In case that's also something you're familiar with, I've made another post regarding this specifically: http://forum.pdpatchrepo.info/topic/10730/creating-a-bandpass-filter-using-biquad
Thanks for the help!
-
You're welcome. As a step further, you could do all of that with the [expr] object and keep the patch tidier and perhaps easier to debug.
Unfortunately I don't know anything about the math for filters, but I think it's worth mentioning that if you just need a bandpass filter you could try the [bp~] object. Good luck with your project.
-
That simplified the math very well, even found a little error in the math, but fixed it now. I am however experiencing an odd error, if I load a song and start playing it, it only plays on certain gain levels, plus it only seems as if it's playing on every 2nd tick of the bandwith and center frequency slider. I find this behaviour odd, as I at current points is pretty sure the math is correct, so maybe it's a PD thing I missed? Just wanted to check in, if there's something you might know regarding this.
You can test it for yourself with the fixed math:
eq.pd -
I do get the same problem, but I don't actually know what those coefficients mean, I've never used [biquad~] and know nothing about filter math. Maybe somebody else reading the thread can help you out.
-
Good to know it's not only happening on my machine! Thanks for your assist, hopefully someone with knowledge about biquad~ comes along!