streson

streson — A string resonator with variable fundamental frequency.

Description

An audio signal is modified by a string resonator with variable fundamental frequency.

Syntax

%
ares streson asig, kfr, kfdbgain

Performance

asig -- the input audio signal.

kfr -- the fundamental frequency of the string.

kfdbgain -- feedback gain, typically between 0 and 1, of the internal delay line. A value close to 1 creates a slower decay and a more pronounced resonance. Small values may leave the input signal unaffected. Depending on the filter frequency, typical values are > 0.9. Values down to -1 are also useful.

streson passes the input asig through a network composed of comb, low-pass and all-pass filters, similar to the one used in some versions of the Karplus-Strong algorithm, creating a string resonator effect. The fundamental frequency of the string is controlled by the k-rate variable kfr.This opcode can be used to simulate sympathetic resonances to an input signal.

See Modal Frequency Ratios for frequency ratios of real instruments which can be used to determine the values of kfrq.

streson is an adaptation of the StringFlt object of the SndObj Sound Object Library developed by the author.

Examples

Here is an example of the streson opcode. It uses the file streson.csd.

Example 1042. Example of the streson opcode.

See the sections Real-time Audio and Command Line Flags for more information on using command line flags.

<CsoundSynthesizer>
<CsOptions>
; Select audio/midi flags here according to platform
-odac  ;;;realtime audio out
;-iadc    ;;;uncomment -iadc if realtime audio input is needed too
; For Non-realtime ouput leave only the line below:
; -o streson.wav -W ;;; for file output any platform
</CsOptions>
<CsInstruments>

sr = 44100 
ksmps = 32 
0dbfs  = 1 
nchnls = 2

instr 1

asig diskin2 "fox.wav", 1, 0, 1
 
kfr = p4
ifdbgain = 0.90

astr streson asig, kfr, ifdbgain
asig clip astr, 0, 1
     outs asig, asig

endin
</CsInstruments>
<CsScore>

i 1 0 1 20
i 1 + . >
i 1 + . >
i 1 + . >
i 1 + . >
i 1 + . >
i 1 + . 1000
e
</CsScore>
</CsoundSynthesizer>


Credits

Author: Victor Lazzarini
Music Department
National University of Ireland, Maynooth
Maynooth, Co. Kildare
1998

New in Csound version 3.494