Name | Description | Default value |
---|---|---|
amp | Maximum Amplitude. Linear from >0.0 to 1000 or in dB from 0 to -∞ (see Tutorial Getting Started 02 - Amplitude and Internal Editor for more details) | -6.0 |
freq | (Minimum) fundamental frequency [Hz] | 440.0 |
buf | Intended pitch value in Hz, used to set up a buffer of 1 cycle of audio samples which will be smoothed over time by a chosen decay method. The buffer normally anticipates the value of the frequency, but may be set artificially high or low to influence the size of the sample buffer. | 220.0 |
dec | Decay time % of the total duration of the amplitude envelope [H%] | 0.8 |
ranfun | Function number of the random source [GEN] | 0 |
meth | Method of natural decay. There are six, some of which use parameters values that follow
| 4 |
ipar1 | Parameter required by some values of meth | 0.5 |
ipar2 | Parameter required by some values of meth | 10.0 |
The PLUCK-2 Class realizes a Karplus-Strong Synthesys (naturally decaying plucked string or drum sound) with the following controls:
These examples collect all methods each of which has its own feature (see specific slots' description). Watch out to the optional parameters and their range and relationship.
For the red patch C#ed and Synt see Appendix A
The example F fixes on the buffer size values. With increasing values the sound changes into more muffled and less brilliant.
The example G gives 5 GEN subroutines as stored function used to initialize the cyclic decay buffer. The default one (f0) is random sequence, the kind of function (given as f- functions to the keyword inlets "tables" of synthesize) influence the timbre of the sound.
For the red patch C#ed and Synt see Appendix A
instr 1
idur = p3
iamp = (p4 > 0.0 ? (p4*0.001*0dbfs) : (ampdbfs (p4)))
ifq = p5 ; frequency
ibuf = p6 ; buffer size
idec = p7 ; percentage [0-1] of idur for the last decay ; affect the nature of damping
iranfun = p8 ; random noise
imeth = p9 ; simple averaging
ipar1 = p10
ipar2 = p11
iseg1 = (1-idec)*idur
iseg2 = idec*idur
kamp linseg iamp,iseg1,iamp,iseg2,0
asound pluck kamp, ifq, ibuf, iranfun, imeth, ipar1, ipar2
out asound