Recherche Google
OMChroma User ManualPredefined Classes > Karplus-Strong > Karplus-Strong Synthesys with PLUCK-1
page précédentepage suivante

Karplus-Strong Synthesys with PLUCK-1

Tutorial PLUCK-1

Specific Slots

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

dec

Decay time % of the total duration of the amplitude envelope [%]

0.8

Class description

The PLUCK-1 Class realizes a Karplus-Strong Synthesys (naturally decaying plucked string or drum sound) with the following controls:

  • The main amplitude,
  • The fundamental frequency,
  • The decay time of the total duration of the amplitude envelope.
Patch description

The example A collects a list of decay's values (remember they are given in percentage 1=100%).

The example B focuses on the frequency of the fundamental.

The example C allows us to understand the relationship between the duration and the decay time.

Common Red Patches

For the red patch C#ed and Synt see Appendix A

Inside the Class

Csound Orchestra of the PLUCK-1 Class.

instr 1

idur = p3

iamp = (p4 > 0.0 ? (p4*0.001*0dbfs) : (ampdbfs (p4)))

ifq = p5 ; frequency

ibuf = ifq ; buffer size = frequency

idec = p6 ; percentage [0-1] of idur for the last decay ; affect the nature of damping

iranfun = 0 ; random noise

imeth = 1 ; simple averaging

iseg1 = (1-idec)*idur

iseg2 = idec*idur

kamp linseg iamp,iseg1,iamp,iseg2,0

asound pluck kamp, ifq, ibuf, iranfun, imeth

out asound

endin

Flow chart
page précédentepage suivante
A propos...Réalisé avec Scenari