Skip to content

fmvoice

FM Singing Voice Synthesis.

Syntax

ares = fmvoice(kamp, kfreq, kvowel, ktilt, kvibamt, kvibrate[, ifn1, \
               ifn2, ifn3, ifn4, ivibfn])
ares fmvoice kamp, kfreq, kvowel, ktilt, kvibamt, kvibrate[, ifn1, \
             ifn2, ifn3, ifn4, ivibfn]

Initialization

ifn1, ifn2, ifn3, ifn4, ivibfn -- Optional waveform tables, usually sine waves. The first four are for the FM operators; the last is for vibrato.

Performance

kamp -- Amplitude of note.

kfreq -- Frequency of the note in Hz. It must be positive and finite.

kvowel -- Vowel selection, in the range 0–127. Each bank uses the same 32 vowel and phoneme entries with a different scale for their formant frequencies:

Selection Formant frequency scale
0–31 0.9
32–63 1.0
64–95 1.1
96–127 1.2

For example, 1, 33, 65, and 97 select the same entry at four scales. Values outside 0–127 are clamped, and fractional values select the integer below them; adjacent entries are not interpolated.

ktilt -- Timbre control, with a nominal range of 0–127. Larger values increase the shared FM modulator's level. The control maps to 100 gain steps; values below or above the range use the lowest or highest step.

kvibamt -- Depth of vibrato. With a vibrato table whose peak amplitude is 1, a value of 1 gives a peak frequency deviation of 10%. A value of 0 disables vibrato.

kvibrate -- Rate of vibrato in Hz.

Examples

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

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

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

instr 1

kfreq = 110
kvowel = p4     ; p4 = vowel (0 - 127, in four banks of 32)
ktilt  = p5
kvibamt = 0.005
kvibrate = 6

asig fmvoice .5, kfreq, kvowel, ktilt, kvibamt, kvibrate
outs asig, asig

endin
</CsInstruments>
<CsScore>
;  sine wave.
f 1 0 16384 10 1

i 1 0 1 1  0    ; tilt=0
i 1 1 1 >  .
i 1 2 1 >  .
i 1 3 1 >  .
i 1 4 1 >  .
i 1 5 1 >  .
i 1 6 1 >  .
i 1 7 1 12 .

i 1 10 1 1  90  ; tilt=90
i 1 11 1 >  .
i 1 12 1 >  .
i 1 13 1 >  .
i 1 14 1 >  .
i 1 15 1 >  .
i 1 16 1 >  .
i 1 17 1 12 .

; The same vowel entry in each bank, with tilt held at 90.
i 1 20 1 1  90  ; formant scale 0.9
i 1 22 1 33 90  ; formant scale 1.0
i 1 24 1 65 90  ; formant scale 1.1
i 1 26 1 97 90  ; formant scale 1.2

e
</CsScore>
</CsoundSynthesizer>
```

See Also

FM Synthesis

More information about frequency modulation on Wikipedia: http://en.wikipedia.org/wiki/Frequency_modulation_synthesis

Credits

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

New in Csound version 3.47