ProxyPreset:
Filter:
Classes (extension) | Libraries > JITLib

ProxyPreset : Object
ExtensionExtension

store and morph between settings of JITLib Proxies.

Description

ProxyPreset is the base class for a number of Preset classes for JITLib proxies: It can handle proxies that keep their settings in environments, such as TaskProxies and PatternProxies, and proxies that use nodeMaps, like NodeProxy.

Settings are lists of key - value pairs, like [[key1, val1], [key2, val2], ... [keyN, valN]]. One can switch between these settings, or - if the parameter values in the list are single numbers, one can interpolate and morph between them.

Its subclasses using named proxies are: TdefPreset for Tdef, PdefPreset for Pdef, and NdefPreset for Ndef. Finally, there are also gui classes for all of them: ProxyPresetGui, TdefPresetGui, PdefPresetGui, and NdefPresetGui.

Class Methods

ProxyPreset.new(proxy, namesToStore, settings, specs, morphFuncs)

make a new anonymous ProxyPreset

Arguments:

proxy

a TaskProxy or PatternProxy

namesToStore

which paramNames to store in presets. if none given, inferred from the current proxy settings.

settings

provide preset settings for the proxy

specs

provide preset specs for the proxy, mainly for randomizing and morphing. if none given here, and object has a halo of specs, those in halo will be used.

morphFuncs

special functions to provide for morphing between non-numerical settings. not used yet.

Inherited class methods

Instance Methods

instance variables

.proxy

the proxy for which preset contains settings

.namesToStore

the param names for which values will be stored in the settings

.settings

settings stored for the proxy

.currSet

the name of the current setting

.targSet

the name of the target setting used in morphing

.specs

a dict for specs to use for numerical parameter interpolation. by default this is synced with the proxy's Halo specs.

.morphVal

.morphVal = value

the current morph/blend value.

.morphTask

a taskproxy that can crossfade between different settings.

.morphFuncs

.morphFuncs = value

special functions to provide for morphing between non-numerical settings. not used yet.

Methods - settings

instance methods

.useHalo

use the proxy's Halo for syncing specs and namesToStore.

.checkSpecsMissing(autoFill: false, dialog: false)

check if there are specs for all namesToStore. if not, posts an invitation to add the missing ones, or a

.specsDialog(keys, specDict)

From extension in /home/stefan/.local/share/SuperCollider/downloaded-quarks/JITLibExtensions/classes/scide_scqt/GUI/extProxyPresetDialogs.sc

open a dialog window to add specs.

.addSet(name, values, toDisk: false)

add a setting by name. if no values are given, take current setting of proxy.

.removeSet(name)

remove a setting by name

.addSettings(list)

add a list of named settings

.removeSettings(names)

remove a list of settings by their names

.postSettings

From extension in /home/stefan/.local/share/SuperCollider/downloaded-quarks/JITLibExtensions/classes/scide_scqt/GUI/extProxyPresetDialogs.sc

post current settings as compilestring.

.getSetNames

get the names of all currently stored settings.

.setCurr(name)

set the current setting by name within stored settings.

.setTarg(name, setCurr: true)

set the target setting by name within stored settings.

.getSet(name)

get a stored setting by name.

.setProxy(name)

set the proxy's current settings to the setting given by name.

.getFromProxy(except)

get the proxy's current settings as [[key1, val1], ... [keyN, valN]]

.currFromProxy

get the proxy's current settings and store them as \curr.

.stepCurr(incr: 1)

.stepTarg(incr: 1)

step the current and target setting by increment.

Methods - randomizing settings

Note that randomizing settings only fully works for numerical settings!

.randSet(rand: 0.25, startSet, except, seed)

create a rand setting, based on an existing one

Arguments:

rand

how muct to randomize (0.0 to 1.0)

startSet

which set to randomize - if nil, uses currSet

except

which keys not to randomize

seed

a seed number for the random generator

.setRand(rand, startSet, except, seed)

same as randSet, but sets proxy to the random setting.

.someRand(rand: 0.1, ratio: 0.5, seed)

like randSet, but ratio sets how many of the params will be randomized.

Methods - morphing and crossfading

Note that morphing and crossfading only fully works for numerical settings!

.blend(blend: 0.5, name1, name2, mapped: true)

blend between two sets given by name. the mapped flag sets whether to blend between mapped or unmapped values; the result is again unmapped.

.morph(blend, name1, name2, mapped: true)

morph between two settings with a given blend factor.

Arguments:

blend

the blend factor

name1

the name of setting 1

name2

the name of setting 2

mapped

a flag whether to interpolate between mapped values of the params.

.xfadeTo(target, dur, doneFunc)

crossfade to a target setting in the given duration.

.blendSets(blend: 0.5, set1, set2)

the lower-level way to do a straight blend between two sets.

.mapSet(set)

.unmapSet(set)

utilities to convert single settings between mapped and unmapped values. used when blending in mapped mode.

Methods - storage

.storeToDisk

.storeToDisk = value

get and whether to store settings to disk automatically. default = true.

.storePath

.storePath = value

the path where to store and read settings to and from disk.

.loadSettings(path, clear: false)

load settings from disk at given path.

.writeSettings(path, overwrite: false)

write settings to disk. By default, they go next to the source code file where the Preset was created, and by default, a backup of the previous stored settings is made.

.setPath(name)

set storage name

.presetPath(name)

path where to store presets. currently, this is next to the source code file where the Preset was created.

.storeDialog(name, loc)

From extension in /home/stefan/.local/share/SuperCollider/downloaded-quarks/JITLibExtensions/classes/scide_scqt/GUI/extProxyPresetDialogs.sc

open a dialog window for entering a storage name. Intended for use with ProxyPresetGui.

.deleteDialog(loc)

From extension in /home/stefan/.local/share/SuperCollider/downloaded-quarks/JITLibExtensions/classes/scide_scqt/GUI/extProxyPresetDialogs.sc

open a dialog window for deleting existing settings by name(s). Intended for use with ProxyPresetGui.

Inherited instance methods

Undocumented instance methods

.getCurr

.getCurrUni

.getSetNorm(name)

.setRelFrom(name, values)

.settingsString

Examples