Hi everybody!!
In another forum I find this patch. It's an ASR envelope
It works very well but i cannot understand how. someone could explain me in details please?
Sorry for my bad english.
ASR Envelope, help!!
Hi everybody!!
In another forum I find this patch. It's an ASR envelope
It works very well but i cannot understand how. someone could explain me in details please?
Sorry for my bad english.
First, there are as many ways to generate envelopes as there are pd users^2. One helpful thing to remember is that, in an ADSR, [A]ttack [D]ecay and [R]elease are measured in units of time, while ustain is measured in units of amplitude. This patch has control over attack and decay, and the sustain level is controlled by the midi velocity value.
I annotated the patch a little bit for you, it is not my way of doing things, but looks like it would work well for midi control. If you still can't figure it out, start at the top and track the data. Checking out the help patches for each object definitely would not hurt.
Thank you very much!!!
I have some specific question:
Why the right outlet of sel is /127? (why 127??) Probably it'is a control of the amplitude (sustain) but why this object (/ 127) is necessary? I tried to eliminate it and the output sound is terrible!! Why??
Why after line~ there are 0 and 10?
I think that the release control doesn't work, the rapidity of volume decrease is the same!
1.I havent looked at the patch, but the [/ 127] would be because there is a fader next to it most probably, and the standard fader value is 0-127, ie. midi.
2. Look in the help file for [line~]
seeing as it says [line~ 0 10] it means, that from wherever the value currently is, it will move it to 0, bypassing everything inbetween, in 10 milliseconds.
3. like i said, haven't looked at the patch so i cant answer this.
puredata punx http://www.cyberpunki.biz
@banto said:
Thank you very much!!!
I have some specific question:
- Why the right outlet of sel is /127? (why 127??) Probably it'is a control of the amplitude (sustain) but why this object (/ 127) is necessary? I tried to eliminate it and the output sound is terrible!! Why??
The second output of notein in the midi velocity info. Midi data is scaled from 0-127 because of bytes or something ( I knew at one point.) the [/127] is there to scale it down to 0-1 to make it useful for [*~] multiplying the amplitude of the signal.
@banto said:
- Why after line~ there are 0 and 10?
the creation arguments are initial value and grain rate. 0 is the initial value and the ramp changes every 10ms
@banto said:
- I think that the release control doesn't work, the rapidity of volume decrease is the same!
Just looking at the patch this seems like it should work... hmmm.... are you holding down a key on your keyboard or just hitting briefly?
I would suggest that you thoroughly read over the help files for [line], [line~], and [vline~], these are •the• tools for generating basic amplitude envelopes. If you can understand their functionality, you can make your own envelope generators quite easily.
>>the creation arguments are initial value and grain rate. 0 is the initial value and the ramp changes every 10ms<<
cool, didn't know about the grain rate argument. cheers.
The autor of the patch confirm that the comment "release" and "attack" must be switched. Now I have another problem...why the velocity 0 controlled the release? And attack?
when you release the keyboard key, the velocity goes to zero. When you press a keyboard key, there is velocity information sent corresponding to how fast the key travels. [sel] in this example outputs a bang out of it's fist outlet when a zero is received; the right output always bangs when the creation arguments are not met (anything other than zero in this case.)
Oops! Looks like something went wrong!