InfluxBase:
Filter:
Influx/Classes (extension) | Influx

InfluxBase
ExtensionExtension

base class for metacontrol by influence.

Description

InfluxBase is the base class for the Influx family. It passes on incoming values under the same name, (puts them into outValDict - maybe remove this step?), and spreads them as they are to multiple destinations by means of the named actions in its action, a MFunc.

InfluxMix can accept influences from multiple sources and decides on param values based on the influences. Different sources can have different trust values, which will determine the strength of their influence.

InfluxSpread can distribute incoming values to multiple destinations, with optional rescaling, and optional mapping to other parameter names.

Influx can entangle or disentangle inValues to outValues by means of a matrix of weights which determine how strongly a given input param will affect a given output param.

First example:

Class Methods

.new

make a new InfluxBase.

Arguments:

inNames

input names to use. if inNames is a, number, e.g. 4, inNames will be from the list x, y, z, w, v, u, etc.

outNames

output names to use. In InfluxBase, this is usally the same as inNames, subclasses differ.

inValDict

an optional dict of input values.

Instance Methods

Instance Variables

.inNames

the input names

.outNames

the output names

.inValDict

the dict of input values

.outValDict

the dict of output values

.action

a FuncChain, where actions can be put that run when new output values are calculated. This is used for attaching e.g. Ndefs to be played with Influx.

.shape

.smallDim

.bigDim

shape is the shape of the weights, [inNames.size, outNames.size] smallDim is the smaller of the two, bigDim the greater.

Instance methods

.postv

pretty-post values

.set

set input values of Influx

Arguments:

... keyValPairs

key1, val1, ... keyN, valN

.calcOutVals

calculate new output values and do the action.

.doAction

perform the action(s), e.g. after a set call.

Interface to actions

.add

add a function to action by name

.remove

remove a function from action by name

.addFunc

add an anonymous function to action

.removeFunc

remove an anonymous function from action

.attach

attach an object - typically a JITLib proxy - and set its params from the Influx outputs.

Arguments:

object

the object

funcName

a name to use in the FuncChain

paramNames

paramNames to set - if none given, gets them from the object.

specs

specs to use for mapping. If none given, those stored in the object's Halo are used.

.detach

remove an object from action by name

Examples