wgflute — Creates a tone similar to a flute.
Audio output is a tone similar to a flute, using a physical model developed from Perry Cook, but re-coded for Csound.
ares wgflute kamp, kfreq, kjet, iatt, idetk, kngain, kvibf, kvamp, ifn \
[, iminfreq] [, ijetrf] [, iendrf]
iatt -- time in seconds to reach full blowing pressure. 0.1 seems to correspond to reasonable playing.
idetk -- time in seconds taken to stop blowing. 0.1 is a smooth ending
ifn -- table of shape of vibrato, usually a sine table, created by a function
iminfreq (optional) -- lowest frequency at which the instrument will play. If it is omitted it is taken to be the same as the initial kfreq. If iminfreq is negative, initialization will be skipped.
ijetrf (optional, default=0.5) -- amount of reflection in the breath jet that powers the flute. Default value is 0.5.
iendrf (optional, default=0.5) -- reflection coefficient of the breath jet. Default value is 0.5. Both ijetrf and iendrf are used in the calculation of the pressure differential.
kamp -- Amplitude of note.
kfreq -- Frequency of note played. While it can be varied in performance, I have not tried it.
kjet -- a parameter controlling the air jet. Values should be positive, and about 0.3. The useful range is approximately 0.08 to 0.56.
kngain -- amplitude of the noise component, about 0 to 0.5
kvibf -- frequency of vibrato in Hertz. Suggested range is 0 to 12
kvamp -- amplitude of the vibrato
Here is an example of the wgflute opcode. It uses the file wgflute.csd.
Example 521. Example of the wgflute 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 ; Audio out Audio in No messages -odac -iadc -d ;;;RT audio I/O ; For Non-realtime ouput leave only the line below: ; -o wgflute.wav -W ;;; for file output any platform </CsOptions> <CsInstruments> ; Initialize the global variables. sr = 44100 kr = 4410 ksmps = 10 nchnls = 1 ; Instrument #1. instr 1 kamp = 31129.60 kfreq = 440 kjet = 0.32 iatt = 0.1 idetk = 0.1 kngain = 0.15 kvibf = 5.925 kvamp = 0.05 ifn = 1 a1 wgflute kamp, kfreq, kjet, iatt, idetk, kngain, kvibf, kvamp, ifn out a1 endin </CsInstruments> <CsScore> ; Table #1, a sine wave. f 1 0 16384 10 1 ; Play Instrument #1 for two seconds. i 1 0 2 e </CsScore> </CsoundSynthesizer>