wgbowedbar
Prev | Orchestra Opcodes and Operators | Next

## wgbowedbar

wgbowedbar — A physical model of a bowed bar.

## Description

A physical model of a bowed bar, belonging to the Perry Cook family of waveguide instruments.

## Syntax

    ares wgbowedbar kamp, kfreq, kpos, kbowpres, kgain [, iconst] [, itvel] \
          [, ibowpos] [, ilow]

## Initialization

iconst (optional, default=0) -- an integration constant. Default is zero.

itvel (optional, default=0) -- either 0 or 1. When ktvel = 0, the bow velocity follows an ADSR style trajectory. When ktvel = 1, the value of the bow velocity decays in an exponentially.

ibowpos (optional, default=0) -- the position on the bow, which affects the bow velocity trajectory.

ilow (optional, default=0) -- lowest frequency required

## Performance

kamp -- amplitude of signal

kfreq -- frequency of signal

kpos -- position of the bow on the bar, in the range 0 to 1

kbowpres -- pressure of the bow (as in wgbowed)

kgain -- gain of filter. A value of about 0.809 is suggested.

## Examples

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

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

    ; Initialize the global variables.
    sr = 44100
    kr = 4410
    ksmps = 10
    nchnls = 1

      instr 1
    ; pos      =         [0, 1]
    ; bowpress =         [1, 10]
    ; gain     =         [0.8, 1]
    ; intr     =         [0,1]
    ; trackvel =         [0, 1]
    ; bowpos   =         [0, 1]

      kb      line 0.5, p3, 0.1
      kp      line 0.6, p3, 0.7
      kc      line 1, p3, 1

      a1      wgbowedbar p4, cpspch(p5), kb, kp, 0.995, p6, 0

              out a1
              endin

    </CsInstruments>
    <CsScore>

      i1      0  3 32000 7.00 0
      e

    </CsScore>
    </CsoundSynthesizer>

## Credits

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

New in Csound version 4.07

Prev | Up | Next
wgbow | Home | wgbrass