From ftm
Jump to: navigation, search
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
 
This is a list of the currently supported Functions.  For a clear explanation of the differences between Functions and Methods, please refer to the help file of ftm.mess, under the patcher functions & methods.
 
This is a list of the currently supported Functions.  For a clear explanation of the differences between Functions and Methods, please refer to the help file of ftm.mess, under the patcher functions & methods.
  
sin <num: value> - standard math function
+
* sin <num: value> - standard math function
cos <num: value> - standard math function
+
* cos <num: value> - standard math function
tan <num: value> - standard math function
+
* tan <num: value> - standard math function
asin <num: value> - standard math function
+
* asin <num: value> - standard math function
acos <num: value> - standard math function
+
* acos <num: value> - standard math function
atan <num: value> - standard math function
+
* atan <num: value> - standard math function
sinh <num: value> - standard math function
+
* sinh <num: value> - standard math function
cosh <num: value> - standard math function
+
* cosh <num: value> - standard math function
tanh <num: value> - standard math function
+
* tanh <num: value> - standard math function
abs <num: value> - standard math function - get absolute value
+
* abs <num: value> - standard math function - get absolute value
log <num: value> - standard math function
+
* log <num: value> - standard math function
logabs <num: value> - standard math function - logarithm of absolute value
+
* logabs <num: value> - standard math function - logarithm of absolute value
log10 <num: value> - standard math function
+
* log10 <num: value> - standard math function
exp <num: value> - standard math function
+
* exp <num: value> - standard math function
sqrt <num: value> - standard math function
+
* sqrt <num: value> - standard math function
trunc <num: value> - standard math function - truncate to integer value
+
* trunc <num: value> - standard math function - truncate to integer value
round <num: value> - standard math function - round to integer value nearest to current value
+
* round <num: value> - standard math function - round to integer value nearest to current value
ceil <num: value> - standard math function - round to smallest integral value not less than current value
+
* ceil <num: value> - standard math function - round to smallest integral value not less than current value
floor <num: value> - standard math function - round to largest integral value not less than current value
+
* floor <num: value> - standard math function - round to largest integral value not less than current value
lin2db <num: value> - standard math function - convert linear amplitude value to value in decibel
+
* lin2db <num: value> - standard math function - convert linear amplitude value to value in decibel
db2lin <num: value> - standard math function - convert value in decibel to linear amplitude value
+
* db2lin <num: value> - standard math function - convert value in decibel to linear amplitude value
lin2cent <num: value> - standard math function - convert linear value to value in cent
+
* lin2cent <num: value> - standard math function - convert linear value to value in cent
cent2lin <num: value> - standard math function - convert value in cent to linear value
+
* cent2lin <num: value> - standard math function - convert value in cent to linear value
new <sym: class name> [<any: instantiation arguments> ...] - create object of given class
+
* new <sym: class name> [<any: instantiation arguments> ...] - create object of given class
int <num: arg> - convert to integer value
+
* int <num: arg> - convert to integer value
i alias for 'int'
+
* i alias for 'int'
float <num: arg> - convert to floating-point value
+
* float <num: arg> - convert to floating-point value
f alias for 'float'
+
* f alias for 'float'
symbol <sym: arg> - convert to symbol
+
* symbol <sym: arg> - convert to symbol
s alias for 'symbol'
+
* s alias for 'symbol'
list [<obj|any: list args>...] - convert objects to list
+
* list [<obj|any: list args>...] - convert objects to list
listhead [<any: list args> ...] - get list head
+
* listhead [<any: list args> ...] - get list head
listtail [<any: list args> ...] - get list tail
+
* listtail [<any: list args> ...] - get list tail
listlen [<any: list args> ...] - get list size
+
* listlen [<any: list args> ...] - get list size
listnth <num: index> [<any: args> >...] - get nth list element (indices starting from 1)
+
* listnth <num: index> [<any: args> >...] - get nth list element (indices starting from 1)
listelem <num: index> [<any: args> >...] - get list element
+
* listelem <num: index> [<any: args> >...] - get list element
listsub <num: index> <num: len> [<any: args> >...] - get sub-list
+
* listsub <num: index> <num: len> [<any: args> >...] - get sub-list
l alias for 'list'
+
* l alias for 'list'
lhead alias for 'listhead'
+
* lhead alias for 'listhead'
ltail alias for 'listtail'
+
* ltail alias for 'listtail'
llen alias for 'listlen'
+
* llen alias for 'listlen'
lnth alias for 'listnth'
+
* lnth alias for 'listnth'
lelem alias for 'listelem'
+
* lelem alias for 'listelem'
lsub alias for 'listsub'
+
* lsub alias for 'listsub'
unique - generate unique integer number
+
* unique - generate unique integer number
random [<num: min>] <num: max> - generate (float) random number (min <= x < max)
+
* random [<num: min>] <num: max> - generate (float) random number (min <= x < max)
clip <num: value> [<num: lower boundary>] <num: upper boundary> - clip value
+
* clip <num: value> [<num: lower boundary>] <num: upper boundary> - clip value
pow <num: base> <num: exponent> - power
+
* pow <num: base> <num: exponent> - power
mod <num: num> <num: denum> - float modulo function
+
* mod <num: num> <num: denum> - float modulo function
min [<num: arg> ...] - find minimum
+
* min [<num: arg> ...] - find minimum
max [<num: arg> ...] - find maximum
+
* max [<num: arg> ...] - find maximum
mag [<num: arg> ...] - magnitude (sqrt of sum of squares)
+
* mag [<num: arg> ...] - magnitude (sqrt of sum of squares)
arg <num: real part> <num: imaginary part> - argument angle
+
* arg <num: real part> <num: imaginary part> - argument angle
hz2midi <num: value in Hz> [<num: tuning frequency (for note # 69, def 440.)>] - convert to MIDI note number
+
* hz2midi <num: value in Hz> [<num: tuning frequency (for note # 69, def 440.)>] - convert to MIDI note number
midi2hz <num: MIDI note number> [<num: tuning frequency (for note # 69, def 440.)>] - convert to frequency in Hz
+
* midi2hz <num: MIDI note number> [<num: tuning frequency (for note # 69, def 440.)>] - convert to frequency in Hz
cat <any: item>... - concatenate to a single symbol
+
* cat <any: item>... - concatenate to a single symbol
basename <sym: filepath> - get filename part of filepath (last component)
+
* basename <sym: filepath> - get filename part of filepath (last component)
dirname <sym: filepath> - get directory part of filepath (or '.' if no path)
+
* dirname <sym: filepath> - get directory part of filepath (or '.' if no path)
extension <sym: filepath> - get extension part of filepath (after the last '.')
+
* extension <sym: filepath> - get extension part of filepath (after the last '.')
stripext <sym: filepath> - remove extension from filepath (including the '.')
+
* stripext <sym: filepath> - remove extension from filepath (including the '.')
not <num: linear value> - integer negation
+
* not <num: linear value> - integer negation
if <num: condition> <any: true value> <any: false value> - choose between two values (both conditional values are evaluated)
+
* if <num: condition> <any: true value> <any: false value> - choose between two values (both conditional values are evaluated)
case <num: index> [<any: value for index 1, 2 etc.> ...] - choose between multiple values (all conditional values are evaluated)
+
* case <num: index> [<any: value for index 1, 2 etc.> ...] - choose between multiple values (all conditional values are evaluated)
typeof <any: arg> - get class/type name of value or object
+
* typeof <any: arg> - get class/type name of value or object
classof <any: arg> - get class/type of value or object
+
* classof <any: arg> - get class/type of value or object
getid <obj: reference> - get object id
+
* getid <obj: reference> - get object id
getobj <symbol: id> - get object by id
+
* getobj <symbol: id> - get object by id
obj <symbol: id> - get object by id
+
* obj <symbol: id> - get object by id
class <sym: class name> - get class/type by name
+
* class <sym: class name> - get class/type by name
print print value or object
+
* print print value or object
aa <sym|any: arg> [<any: replacement if arg is #1, #2, etc> [<replacement if arg is 0>]] - replace abstraction argument by default value
+
* aa <sym|any: arg> [<any: replacement if arg is #1, #2, etc> [<replacement if arg is 0>]] - replace abstraction argument by default value
info <'classes'|'class'|'functions'> [<any: args>] [<mat: container>] - get info (post to console window or store into container if given)
+
* info <'classes'|'class'|'functions'> [<any: args>] [<mat: container>] - get info (post to console window or store into container if given)
checkversion <num: major version> [<num: minor version> [<num: release>]] - check whether the running FTM corresponds to given version and release
+
* checkversion <num: major version> [<num: minor version> [<num: release>]] - check whether the running FTM corresponds to given version and release
ftm <sym: FTM system function> <list: arguments>
+
* ftm <sym: FTM system function> <list: arguments>
FTM alias for 'ftm'
+
* FTM alias for 'ftm'
ftm version - get FTM version as symbol
+
* ftm version - get FTM version as symbol
ftm exprerrcheck <0|'none'|1|'loose'|2|'normal'|3|'strict'> - set expression evaluation error checking level
+
* ftm exprerrcheck <0|'none'|1|'loose'|2|'normal'|3|'strict'> - set expression evaluation error checking level
ftm exprerrcheck - get FTM expression evaluation error checking level
+
* ftm exprerrcheck - get FTM expression evaluation error checking level
ftm exterrors - post current errors of FTM externals
+
* ftm exterrors - post current errors of FTM externals
version - get FTM version as symbol (deprecated)
+
* version - get FTM version as symbol (deprecated)
 +
 
 +
[[Category:FTM Documentation]]  [[Category:Functions]]

Latest revision as of 09:36, 6 July 2010

This is a list of the currently supported Functions. For a clear explanation of the differences between Functions and Methods, please refer to the help file of ftm.mess, under the patcher functions & methods.

  • sin <num: value> - standard math function
  • cos <num: value> - standard math function
  • tan <num: value> - standard math function
  • asin <num: value> - standard math function
  • acos <num: value> - standard math function
  • atan <num: value> - standard math function
  • sinh <num: value> - standard math function
  • cosh <num: value> - standard math function
  • tanh <num: value> - standard math function
  • abs <num: value> - standard math function - get absolute value
  • log <num: value> - standard math function
  • logabs <num: value> - standard math function - logarithm of absolute value
  • log10 <num: value> - standard math function
  • exp <num: value> - standard math function
  • sqrt <num: value> - standard math function
  • trunc <num: value> - standard math function - truncate to integer value
  • round <num: value> - standard math function - round to integer value nearest to current value
  • ceil <num: value> - standard math function - round to smallest integral value not less than current value
  • floor <num: value> - standard math function - round to largest integral value not less than current value
  • lin2db <num: value> - standard math function - convert linear amplitude value to value in decibel
  • db2lin <num: value> - standard math function - convert value in decibel to linear amplitude value
  • lin2cent <num: value> - standard math function - convert linear value to value in cent
  • cent2lin <num: value> - standard math function - convert value in cent to linear value
  • new <sym: class name> [<any: instantiation arguments> ...] - create object of given class
  • int <num: arg> - convert to integer value
  • i alias for 'int'
  • float <num: arg> - convert to floating-point value
  • f alias for 'float'
  • symbol <sym: arg> - convert to symbol
  • s alias for 'symbol'
  • list [<obj|any: list args>...] - convert objects to list
  • listhead [<any: list args> ...] - get list head
  • listtail [<any: list args> ...] - get list tail
  • listlen [<any: list args> ...] - get list size
  • listnth <num: index> [<any: args> >...] - get nth list element (indices starting from 1)
  • listelem <num: index> [<any: args> >...] - get list element
  • listsub <num: index> <num: len> [<any: args> >...] - get sub-list
  • l alias for 'list'
  • lhead alias for 'listhead'
  • ltail alias for 'listtail'
  • llen alias for 'listlen'
  • lnth alias for 'listnth'
  • lelem alias for 'listelem'
  • lsub alias for 'listsub'
  • unique - generate unique integer number
  • random [<num: min>] <num: max> - generate (float) random number (min <= x < max)
  • clip <num: value> [<num: lower boundary>] <num: upper boundary> - clip value
  • pow <num: base> <num: exponent> - power
  • mod <num: num> <num: denum> - float modulo function
  • min [<num: arg> ...] - find minimum
  • max [<num: arg> ...] - find maximum
  • mag [<num: arg> ...] - magnitude (sqrt of sum of squares)
  • arg <num: real part> <num: imaginary part> - argument angle
  • hz2midi <num: value in Hz> [<num: tuning frequency (for note # 69, def 440.)>] - convert to MIDI note number
  • midi2hz <num: MIDI note number> [<num: tuning frequency (for note # 69, def 440.)>] - convert to frequency in Hz
  • cat <any: item>... - concatenate to a single symbol
  • basename <sym: filepath> - get filename part of filepath (last component)
  • dirname <sym: filepath> - get directory part of filepath (or '.' if no path)
  • extension <sym: filepath> - get extension part of filepath (after the last '.')
  • stripext <sym: filepath> - remove extension from filepath (including the '.')
  • not <num: linear value> - integer negation
  • if <num: condition> <any: true value> <any: false value> - choose between two values (both conditional values are evaluated)
  • case <num: index> [<any: value for index 1, 2 etc.> ...] - choose between multiple values (all conditional values are evaluated)
  • typeof <any: arg> - get class/type name of value or object
  • classof <any: arg> - get class/type of value or object
  • getid <obj: reference> - get object id
  • getobj <symbol: id> - get object by id
  • obj <symbol: id> - get object by id
  • class <sym: class name> - get class/type by name
  • print print value or object
  • aa <sym|any: arg> [<any: replacement if arg is #1, #2, etc> [<replacement if arg is 0>]] - replace abstraction argument by default value
  • info <'classes'|'class'|'functions'> [<any: args>] [<mat: container>] - get info (post to console window or store into container if given)
  • checkversion <num: major version> [<num: minor version> [<num: release>]] - check whether the running FTM corresponds to given version and release
  • ftm <sym: FTM system function> <list: arguments>
  • FTM alias for 'ftm'
  • ftm version - get FTM version as symbol
  • ftm exprerrcheck <0|'none'|1|'loose'|2|'normal'|3|'strict'> - set expression evaluation error checking level
  • ftm exprerrcheck - get FTM expression evaluation error checking level
  • ftm exterrors - post current errors of FTM externals
  • version - get FTM version as symbol (deprecated)