gsapi.GSPatternTransformers¶
gsapi.GSPatternTransformers.GSBasePatternTransformer module¶
-
class
gsapi.GSPatternTransformers.GSBasePatternTransformer.
GSBasePatternTransformer
[source]¶ Base class for defining a transform algorithm.
- such class needs to provide the following functions:
- configure: configure current transformer based on implementation
specific parameters passed in the dict argument - transformPattern: return a transformed version of GSPattern
gsapi.GSPatternTransformers.AgnosticDensity module¶
-
class
gsapi.GSPatternTransformers.AgnosticDensity.
AgnosticDensity
(mode='random', numSteps=32)[source]¶ Bases:
gsapi.GSPatternTransformers.GSBasePatternTransformer.GSBasePatternTransformer
Agnostic transformation algorithm.
Parameters: - numSteps – number of steps to consider
- mode – [‘random’,’syncopation’] : algorithm used
-
globalDensity
¶ float (0..2) the desired global density,
-
(0 = empty pattern, 1 = origin pattern, 2 = pattern with all events)
-
individualDensities
¶ dict[tag]=density : a per Tag density, densities should be in the same range as globalDensity
-
mode
¶ [‘random’,’syncopation’] : algorithm used
-
originPattern
¶ the origin pattern, e.g : the one given if all densities are equals to 1