GenerIter.processor package¶
Submodules¶
GenerIter.processor.Basic module¶
Generator class for some basic Process-based algorithms for rhythmic generation.
-
class
GenerIter.processor.Basic.
Basic
[source]¶ Bases:
GenerIter.process.Process
-
beatsbassdrone
()[source]¶ This is a developmental prototype variant of the algorithm01 in the original DJProcessor code.
As the name suggests, it expects to find categories in the sample inventory mapped into the Beats, Bass and Drone voices. Otherise this algorithm will fail.
Warning
This is example code used during early development, and should really only be used for reference and study.
-
groove
()[source]¶ The Basic.groove algorithm is used to form a rhythmic backbone to a composition. This algorithm attempts to make sensible alignment choices for the samples in use. It is considered a production algorithm.
The number of voices can be 3 or more. In this example we are using 4, which we can think of as A, B, C and D corresponding to their declaration position in the configuration list.
Segments A and B are randomly selected from their inventory categories. These are then length-aligned. That is, whichever is the shorter of the two is padded with exactly the right amount of silence to make the frame lengths of both segments equal. These are then overlayed to form a composite rhythmic unit referred to as AB.
The basic rhythmic beat is created by replicating a sequence of these AB segments end-to-end until the track size limit is surpassed. This is the groove_base.
The cycle parameter specifies the number of these AB components tahe represent a higher level repetition unit called the cycle (obviously).
Subsequent voices are also length-aligned (or curtailed) to match the size of the AB unit. A new segment, groove_layer is created, into which the later voices C, D, etc. are injected in a cyclic sequence, aligned precisely to the groove_base cycles and beats.
Finally, the groove_base is overlayed with the groove_layer to create a composite whole track which is output as an audio file.
- Parameters
tracks (int) – number of times the process is to run.
voices (list) – list of voice categories to select and use in the track
cycle (int) – length of a repeat cycle in terms of groove_base beats
Example:
{ "Basic" : { "groove" : { "tracks" : 50, "cycle" : 4, "voices" : [ "Bass", "Beat", "Percussion", "Pad" ] } } }
- Raises
-
voices
()[source]¶ This developmental prototype algorithm uses the same algorithm as voices3, but allows the user to designate the 3 or more voices to be used in the compose file.
Warning
This is example code used during early development, and should really only be used for reference and study.
-
voices3
()[source]¶ This developmental prototype algorithm uses the same algorithm as beatsbassdrone, but allows the user to designate the 3 voices to be used in the compose file.
The number of voices allowed is hard-coded to 3 only.
Warning
This is example code used during early development, and should really only be used for reference and study.
-
GenerIter.processor.Mix module¶
Generator class for some Process-based mixing algorithms.
Copyright 2020 Thomas Jackson Park & Jeremy Pavier
-
class
GenerIter.processor.Mix.
Mix
[source]¶ Bases:
GenerIter.process.Process
GenerIter.processor.Solo module¶
Generator class for some Process-based soloing algorithms.
Copyright 2020 Thomas Jackson Park & Jeremy Pavier
-
class
GenerIter.processor.Solo.
Solo
[source]¶ Bases:
GenerIter.process.Process
-
SOLOMAP
= [{'upper': 10000, 'variation': (800, 2400), 'fades': 100, 'back_silence': 4000}, {'upper': 60000, 'variation': (8000, 24000), 'fades': 3000, 'front_silence': 20000, 'back_silence': 40000}, {'upper': 60000, 'variation': (20000, 36000), 'fades': 3000, 'front_silence': 60000, 'back_silence': 40000}, {'upper': 10000, 'variation': (200, 800), 'fades': 10, 'front_silence': 60000, 'back_silence': 40000, 'reps': (5, 30)}]¶
-