@s.elliot.perez lol actually I tried it it wasn't that bad, this should convert a 60db decay time in ms into a frequency for lop~ mstolop.pd
edit: basically you get the nth root of .001 (n = no. of samples) using ln & e^x and that's the pole value.
@s.elliot.perez I would recommend using lag~ if you are interested in using lop~ like this. it is exactly the same, but uses 60db time calculated from dbpole. There is a version of lag~ made in vanilla (lagtime~) in the other thread also.
Otherwise you would have to use the inverse of the function lop~ uses internally to pass in the right hz in order to get the specific coefficient that will give you the right 60db time, rather than passing in the coefficient directly.
@s.elliot.perez well, yes and no
You are right that the lower frequencies generally stick around and the higher ones get filtered out,
One thing to keep in mind is that a 1-pole filter has a very shallow frequency roll-off, so even if you set it at 1hz many other frequencies will "get through".
The exponential ramp is the linear combination of all of the sine waves (at their specific volumes) that the one-pole filter will let through at a specific "cutoff frequency", which is correlated to the steepness of the ramp. (A steep band-pass filter or even a steep low pass filter, on the other hand, might do what you say because it only lets through one narrow band of frequency)
hi, the impulse response (the name for what happens in the time domain when you feed something an impulse, which has all "frequencies" of sine wave) of a causal low-pass filter generally has a "exponential" ramp characteristic in the time domain. This (of course) corresponds to the frequency response of a lowpass filter. (if you take the discrete fourier transform of the impulse response, it gives the frequency response).
if you lower the "frequency", which generally corresponds to less steepness/longer length of the exponential ramp in the time domain, then the fast changes in the signal will be "integrated" out more
see this thread for further info on using real poles in the time domain like this https://forum.puredata.info/topic/11356/signal-rate-separate-positive-negative-slew/4
also lag~ (which is like lop~ but you can set the coefficient directly) is now in my library, in case you are interested
I think this should work for what you want
I think the issue you were having was that old notes you release would send the
[line~]a 0. This way, every new note is checked if it is an on or off message. If it is an on message, it is sent to the
[line~]and a new note is played. If it is an off message, it checks to see if the note is the same as the last on message. If it is, then it sends a 0 to
[line]. If you want a monophonic behavior that remembers what notes are held down before you will need something more sophisticated though (like a FIFO stack of some kind).
I also changed
[* .001]before the envelope because it's slightly more efficient.
It might make it sound more legato if you put a short
Actually, personally I think I'm going to go for the opposite: Supercollider for composition & Pure Data for synthesis, because Supercollider has routines and Patterns, which are more useful for composition than what pure data has to offer imo. There is no such thing as a routine in pure data, the closest thing you get is qlist/text sequencer. Supercollider has conditional branching etc. and it's just easier to do algorithmic composition in text.
I would use Pd for synthesis mainly because the signal-flow representation is easier to visualize in Pd, and because I started on Pd. That being said, Supercollider is the best for creating "voices" on the fly and having something like 500 voices playing at the same time.
for instance, inside your
[apple]abstraction you have
[receive $1-anapple]that will
send your loadbang
then when you create each abstraction dynamically you do the same as before but add
a second line to your message box you are sending from that sends to this receive:
[; ( [pd-apples-ch1 obj 100 100 apple $1;( [$1-anapple bang (
Since you are using an abstraction, I think the way to do it would make a receive with the "number" of apple in the name, then immediately send the receive a bang when you create it
edit: see this thread https://lists.puredata.info/pipermail/pd-list/2011-02/086968.html
another option is to use initbang instead apparently (currently in iemguts)