ampdb/dbamp/cpsoct/cpspch/octcps/octpch/pchcps/pchoct
boost/cpsmidi/pchmidi/midipch
scorefile commands -- return notation and amplitude format conversions
USAGE:
frequency = cpsoct(linoct)
frequency = cpspch(octpch)
frequency = cpsmidi(midinote)
linoct = octcps(frequency)
linoct = octpch(frequency)
octpc = pchcps(frequency)
octpc = pchmidi(midinote)
frequency = pchoct(linoct)
amp = ampdb(decibel)
decibel = dbamp(amp)
amp = boost(decibel)
midinote = midipch(octpch)
These are functions which convert values between linear
octaves, octave.pitch-class, cycles per second, and MIDI note
number. There are also two amplitude conversion routines.
cpsoct(oct)
- convert linear octaves to cycles per second.
cpspch(pch)
- convert octave.pitch-class to cycles per second.
cpsmidi(midinote)
- convert MIDI note # to cycles per second.
octcps(cps)
- convert cycles per second to linear octaves.
octpch(pch)
- convert octave.pitch-class to linear octaves.
pchcps(cps)
convert cycles per second to octave.pitch-class.
pchmidi(midinote)
convert MIDI note # to octave.pitch-class.
pchoct(oct)
- convert linear octaves to octave.pitch-class.
ampdb(db)
- convert amp in decibels to a real amplitude.
dbamp(amp)
- convert real amplitude to an amp in decibels.
boost(db)
- converts an amplitude in decibels to an amplitude multiplier.
It simply returns 10 ** (db/20).
midipch(pch)
- convert octave.pitch-class to MIDI note #.
See also the
cpspch,
pchcps,
cpsmidi,
midipch and
pchmidi,
scorefile commands for more information about these representations.
For performing these conversion on a pfield_handle or
table_handle data stream, see the
makeconverter
scorefile command.