composers

Abstract base class

class roqba.composers.abstract_composer.AbstractComposer(gateway, settings, behaviour, scale='DIATONIC')[source]
static assemble_real_scale(scale, min=0, max=128, tunings=None)[source]

extends the one-octave scale over the specified range.

Tunings should be in (<index>, <delta>) format, e.g. {1: -0.5 2: -1} would create the the start of a greek enharmonic scale for an underlying scale of [1, 1, 1,.....

choose_rhythm()[source]
generate()[source]
generate_real_scale(min=0, max=128)[source]

extends the one-octave scale over the specified range

report()[source]

utility function that prints info on harmonies and single voices

set_binaural_diffs(val=None, voice=None)[source]

“de-tunes” the specified voice by the specified interval (in hertz)

if no values are given, random values (in the configurated range) are set for each voice.

set_meter(meter)[source]

modifies composer-attributes for the specified meter.

calls reload_register method of the voices and creates and sets the new meter also for the drummer-instance

set_scale(name, min=0, max=128)[source]

sets the specified scale and generates a new real scale

Amadinda

class roqba.composers.amadinda.Composer(gateway, settings, behaviour, scale='DIATONIC')[source]
all_python_words()[source]
choose_rhythm()[source]
generate(state)[source]

main generating function, the next polyphonic step is produced here

any of the voices can change.

make_new_pattern()[source]
next_voice_note(voice, meter_pos)[source]
shift_pattern(seq1, seq2, offset)[source]

Baroq

class roqba.composers.baroq.Composer(gateway, settings, behaviour)[source]
acceptable_harm_for_length(harm, length)[source]

checks if the specified (interval-set) are “harmonic”

acceptable_harmony(chord)[source]

checks if a chord is “harmonic”

add_duration_in_msec(state)[source]

adds duration in milliseconds for each note in self.voices

apply_scale()[source]

sets the real note for the scale-bound notes in each voice

embellish(state)[source]

checks for embellishment markers of the single voices

  • starts a thread to handle the embellishment
static flatten_chord(chord)[source]

maps a specified code to the base octave

generate(state)[source]

main generating function, the next polyphonic step is produced here

any of the voices can change.

static get_deltas(chord)[source]

returns an array of the intervals between the specified notes

is_base_harmony(chord)[source]

checks if a chord is a the base tonality

(either major or minor) of the current context

ornament_handler(v, duration, note, note_delta, state)[source]

this method handles the sending of the ornament notes.

the ornament is chosen randomly if the ornament would be too fast, it returns without action

static scale_walker(scale, present_note, delta)[source]

walks the <scale> <delta> steps starting at <present_note>

sort_voices_by_importance(by='imp')[source]

sorts the voices according to their importance.

by: ‘imp’:
  • importance according to register
by: ‘dir’:
  • voices having a registered direction first
stream_analyzer()[source]

analyses the stream of notes.

searches for target-harmonies and sets a flag

Rendezvous

class roqba.composers.rendezvous.Composer(gateway, settings, behaviour, scale='HARMONIC')[source]
determine_rendezvous_transition(voice=None)[source]
generate(state)[source]

main generating function, the next polyphonic step is produced here.

next_voice_note(voice)[source]

return the next note for a voice if it is the correct tick

select_next_anchor_tick(sendout_offset=0)[source]

set the next send-out and and rendezvous ticks

select_next_harmony()[source]

select the next rendezvous’s harmony

roqba.composers.rendezvous.random() → x in the interval [0, 1).