gogobel

gogobel — Audio output is a tone related to the striking of a cow bell or similar.

Description

Audio output is a tone related to the striking of a cow bell or similar. The method is a physical model developed from Perry Cook, but re-coded for Csound.

Syntax

ares gogobel kamp, kfreq, ihrd, ipos, imp, kvibf, kvamp, ivfn

Initialization

ihrd -- the hardness of the stick used in the strike. A range of 0 to 1 is used. 0.5 is a suitable value.

ipos -- where the block is hit, in the range 0 to 1.

imp -- a table of the strike impulses. The file marmstk1.wav is a suitable function from measurements and can be loaded with a GEN01 table. It is also available at ftp://ftp.cs.bath.ac.uk/pub/dream/documentation/sounds/modelling/.

ivfn -- shape of vibrato, usually a sine table, created by a function.

Performance

A note is played on a cowbell-like instrument, with the arguments as below.

kamp -- Amplitude of note.

kfreq -- Frequency of note played.

kvibf -- frequency of vibrato in Hertz. Suggested range is 0 to 12

kvamp -- amplitude of the vibrato

Examples

Here is an example of the gogobel opcode. It uses the file gogobel.csd, and marmstk1.wav,

Example 425. Example of the gogobel 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 gogobel.wav -W ;;; for file output any platform
</CsOptions>
<CsInstruments>

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

instr 1

   kfreq = 200
   ihrd = 0.5
   ipos = p4
   kvibf = 6.0
   kvamp = 0.3

asig gogobel .9, kfreq, ihrd, ipos, 1, 6.0, 0.3, 2
     outs asig, asig
endin
</CsInstruments>
<CsScore>
;audio file
f 1 0 256 1 "marmstk1.wav" 0 0 0
;sine wave for the vibrato
f 2 0 128 10 1

i 1 0.5 0.5 0.01
i 1 + 0.5 0.561
i 1 + 0.5 0.9
e
</CsScore>
</CsoundSynthesizer>


Credits

Author: John ffitch (after Perry Cook)
University of Bath, Codemist Ltd.
Bath, UK

New in Csound version 3.47