The Alternative Csound Reference Manual
Previous |  | Next

# voice

voice -- An emulation of a human voice.

## Description

An emulation of a human voice.

## Syntax

ar voice kamp, kfreq, kphoneme, kform, kvibf, kvamp, ifn, ivfn

## Initialization

ifn, ivfn -- two table numbers containing the carrier waveform and the vibrato waveform. The files impuls20.aiff, ahh.aiff, eee.aiff, or ooo.aiff are suitable for the first of these, and a sine wave for the second. These files are available from ftp://ftp.cs.bath.ac.uk/pub/dream/documentation/sounds/modelling/.

## Performance

kamp -- Amplitude of note.

kfreq -- Frequency of note played. It can be varied in performance.

kphoneme -- an integer in the range 0 to 16, which select the formants for the sounds:

- "eee", "ihh", "ehh", "aaa",

- "ahh", "aww", "ohh", "uhh",

- "uuu", "ooo", "rrr", "lll",

- "mmm", "nnn", "nng", "ngg".

At present the phonemes

- "fff", "sss", "thh", "shh",

- "xxx", "hee", "hoo", "hah",

- "bbb", "ddd", "jjj", "ggg",

- "vvv", "zzz", "thz", "zhh"

are not available (!)

kform -- Gain on the phoneme. values 0.0 to 1.2 recommended.

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

kvamp -- amplitude of the vibrato

## Examples

Here is an example of the voice opcode. It uses the files voice.orc, voice.sco, and impuls20.aiff.

Example 1. Example of the voice opcode.

    /* voice.orc */
    ; Initialize the global variables.
    sr = 22050
    kr = 2205
    ksmps = 10
    nchnls = 1

    ; Instrument #1.
    instr 1
      kamp = 3
      kfreq = 0.8
      kphoneme = 6
      kform = 0.488
      kvibf = 0.04
      kvamp = 1
      ifn = 1
      ivfn = 2

      av voice kamp, kfreq, kphoneme, kform, kvibf, kvamp, ifn, ivfn

      ; It tends to get loud, so clip voice's amplitude at 30,000.
      a1 clip av, 2, 30000
      out a1
    endin
    /* voice.orc */

    /* voice.sco */
    ; Table #1, an audio file for the carrier waveform.
    f 1 0 256 1 "impuls20.aiff" 0 0 0
    ; Table #2, a sine wave for the vibrato waveform.
    f 2 0 256 10 1

    ; Play Instrument #1 for a half-second.
    i 1 0 0.5
    e
    /* voice.sco */

## Credits

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

Example written by Kevin Conder.

New in Csound version 3.47

Previous | Home | Next
vlowres | Up | vpvoc