csound-expression-opcodes-0.0.5.0: opcodes for the library csound-expression
Safe HaskellNone
LanguageHaskell2010

Csound.Typed.Opcode.PitchConverters

Synopsis

Functions.

cent :: SigOrD a => a -> a Source #

Calculates a factor to raise/lower a frequency by a given amount of cents.

 cent (x) 

csound doc: http://csound.com/docs/manual/cent.html

cpsmidinn :: SigOrD a => a -> a Source #

Converts a Midi note number value to cycles-per-second.

 cpsmidinn  (MidiNoteNumber)  (init- or control-rate args only)

csound doc: http://csound.com/docs/manual/cpsmidinn.html

cpsoct :: SigOrD a => a -> a Source #

Converts an octave-point-decimal value to cycles-per-second.

 cpsoct  (oct)  (no rate restriction)

csound doc: http://csound.com/docs/manual/cpsoct.html

cpspch :: SigOrD a => a -> a Source #

Converts a pitch-class value to cycles-per-second.

 cpspch  (pch)  (init- or control-rate args only)

csound doc: http://csound.com/docs/manual/cpspch.html

ftom :: D -> Sig Source #

Convert frequency to midi

Convert frequency to midi note number, taking global value of A4 into account.

imidi  ftom  ifreq
kmidi  ftom  kfreq

csound doc: http://csound.com/docs/manual/ftom.html

mtof :: D -> Sig Source #

Convert a midi to frequency

Convert a midi note number value to cycles per second, taking global value of A4 into account.

ifreq  mtof  imidi
kfreq  mtof  kmidi

csound doc: http://csound.com/docs/manual/mtof.html

mton :: Sig -> Str Source #

Convert midi note number to string note name

Convert midi note number to string note name, with an accuracy of 1 cent.

Snote  mton  kmidi
Snote  mton  imidi

csound doc: http://csound.com/docs/manual/mton.html

ntom :: Str -> D Source #

Convert note name to midi note number

Convert note name to midi note number. It allows note name to include microtones or a deviation in cents.

kmidi  ntom  Snote
imidi  ntom  Snote

csound doc: http://csound.com/docs/manual/ntom.html

octave :: SigOrD a => a -> a Source #

Calculates a factor to raise/lower a frequency by a given amount of octaves.

 octave (x)

csound doc: http://csound.com/docs/manual/octave.html

octcps :: SigOrD a => a -> a Source #

Converts a cycles-per-second value to octave-point-decimal.

 octcps  (cps)  (init- or control-rate args only)

csound doc: http://csound.com/docs/manual/octcps.html

octmidinn :: SigOrD a => a -> a Source #

Converts a Midi note number value to octave-point-decimal.

 octmidinn  (MidiNoteNumber)  (init- or control-rate args only)

csound doc: http://csound.com/docs/manual/octmidinn.html

octpch :: SigOrD a => a -> a Source #

Converts a pitch-class value to octave-point-decimal.

 octpch  (pch)  (init- or control-rate args only)

csound doc: http://csound.com/docs/manual/octpch.html

pchmidinn :: SigOrD a => a -> a Source #

Converts a Midi note number value to octave point pitch-class units.

 pchmidinn  (MidiNoteNumber)  (init- or control-rate args only)

csound doc: http://csound.com/docs/manual/pchmidinn.html

pchoct :: SigOrD a => a -> a Source #

Converts an octave-point-decimal value to pitch-class.

 pchoct  (oct)  (init- or control-rate args only)

csound doc: http://csound.com/docs/manual/pchoct.html

pchtom :: D -> Sig Source #

Convert pch to midi note number

Convert pch to midi note number. pch representation has the form Octave.pitchclass, pitchclass being a number between 00 and 12.

imidi  pchtom  ipch
kmidi  pchtom  kpch

csound doc: http://csound.com/docs/manual/pchtom.html

semitone :: SigOrD a => a -> a Source #

Calculates a factor to raise/lower a frequency by a given amount of semitones.

 semitone (x)

csound doc: http://csound.com/docs/manual/semitone.html

Tuning Opcodes.

cps2pch :: D -> D -> D Source #

Converts a pitch-class value into cycles-per-second (Hz) for equal divisions of the octave.

icps  cps2pch  ipch, iequal

csound doc: http://csound.com/docs/manual/cps2pch.html

cpstun :: Sig -> Sig -> Tab -> Sig Source #

Returns micro-tuning values at k-rate.

kcps  cpstun  ktrig, kindex, kfn

csound doc: http://csound.com/docs/manual/cpstun.html

cpstuni :: D -> Tab -> D Source #

Returns micro-tuning values at init-rate.

icps  cpstuni  index, ifn

csound doc: http://csound.com/docs/manual/cpstuni.html

cpsxpch :: D -> D -> D -> D -> D Source #

Converts a pitch-class value into cycles-per-second (Hz) for equal divisions of any interval.

Converts a pitch-class value into cycles-per-second (Hz) for equal divisions of any interval. There is a restriction of no more than 100 equal divisions.

icps  cpsxpch  ipch, iequal, irepeat, ibase

csound doc: http://csound.com/docs/manual/cpsxpch.html