Abstraction Reference
Hmmmm…
Hmmmm…
Returns the number of keys in a dict
When using a dict to mimic an array, use this to retrieve the length of the array.
number of keys in dict
symbol
dict name
flowchart TB; AudioIn1((Audio\nIn L)) AudioIn2((Audio\nIn R)) MidiIn((MIDI In)) TapIn((Tap\nIn)) PattrIn((Pattr\nIn)) DataIn((File\nData\nIn)) PresetIn((Presets In)) Master[Master Control] Audio[Djazz Audio] Midi[Djazz MIDI] PattrStorage[PattrStorage] click Master "./../components/master_control.html" "Master Control" click Audio "audio.html" "Master Control" click Midi "midi.html" "Master Control" AudioOut1(((Audio\nOut 1L))) AudioOut2(((Audio\nOut 1R))) AudioOut3(((Audio\nOut 2L))) AudioOut4(((Audio\nOut 2R))) AudioOut5(((Audio\nOut 3L))) AudioOut6(((Audio\nOut 3R))) MidiOut(((MIDI Out))) PattrOut(((Pattr Out))) AudioIn1--->Audio AudioIn2--->Audio TapIn-->Master PattrIn-->Master PattrIn-->Audio PattrIn-->Midi DataIn-->Audio DataIn-->Midi DataIn-->Master Master-->Audio Master-->Midi MidiIn-->Midi Audio-->AudioOut1 Audio-->AudioOut2 Audio-->AudioOut3 Audio-->AudioOut4 Audio-->AudioOut5 Audio-->AudioOut6 Midi-->MidiOut PresetIn-->PattrStorage PattrStorage-->PattrOut
signal Audio signal is sent to djazz_audio_in
signal Audio signal is sent to djazz_audio_in
list (int pitch, int velocity, int channel) sent to djazz_midi_in
bang All active tracks MIDI and audio tracks will play their data located at the current beat in tempo when a bang is received. Any armed recording tracks will record any input during this beat in tempo.
list (symbol argument-name anything argument-value) See the section on pattrs
symbol The name of a Max dict that has been loaded with a JSON file. These are either song files or score files.
anything This is only used to send the “clientwindow” message to the pattrstorage object, which is useful for debugging. Any preset-related messages could be sent, but they should actually be sent to djazz_control.
Audio signal
Audio signal
Audio signal
Audio signal
Audio signal
Audio signal
A MIDI note is sent out as a list (int pitch, int velocity, int channel)
None
### MESSAGES
-See asynchronous messages.
-See
Page not found: /3_api/1_abstraction_references/components/master_control
for details about the following:/master_control
Page not found: /3_api/1_abstraction_references/components/master_control#loop-section-active
0/1Page not found: /3_api/1_abstraction_references/components/master_control
list (int int) start-beat end-beat master::start_beat intSets the entry at the given index
When using a dict to mimic an array, use this as the assignment operator [] or set.
list
left inlet: (int anything) index, entry
symbol
right inlet: dict name
Takes a label representing the current musical state, and returns another label to be used by the improvisation algorithm.
The input label can be passed to it by anything–the master control, other generators, or the same generator in which this analyzer resides.
Currently only passes the chord label for the next beat, passed by the master control, directly through without modification.
So for now this object exists more as a placeholder. This is where real-time music analysis code should go.
label + new symbol
symbol
a label representing the current musical state to be used by the improvisation algorithm.
djazz.listener_control
djazz.listeners_router
djazz.beat_generator
djazz.midi.midi_beat_generator
djazz.audio.beat_generator
Converts an antescofo file into a Max dict (which can then be saved as a JSON file).
Dict format:
tracks
int
beat
int
notes
int: note data
int: note data
int
…
tracks dict name
symbol
full path to antescofo file
clear
clears the Max dict
Uses antescofo to infer the current tempo based on time between input messages.
Loads the file antescofo_djazz.txt, which must be in the Max search path (currently in data/antescofo_scores).
tempo inferred from time between inputs
bang
left inlet: bangs will cause inferred tempo to be output. Initial tempo must be set and bangs must not deviate far from current tempo. Two bangs must occur before tempo is inferred.
initial_tempo
left inlet: ( + float) tempo to set antescofo’s tempo inference mechanism. Initial input tempo must be close to this.
Upon receipt of a beat number, label, and tempo, sends data about the next beat to read to the beat reader.
Pattr messages (must be passed via an external pattrhub/pattrstorage):
transpose_pitch (int) -255 - +255
transpose_octave (int) -255 - +255
next_beat (int) 0-255
end_beat (int) 0-255
speed_active (int) 0/1
speed_numerator (int) 1-255
speed_denominator (int) 1-255
loop_length (int) 1-8
loop_section_active (int) 0/1
loop_section_beats (list: int int)
improvise (int) 0/1
pitch_range (int) 0-11
max_continuity (int) 0-255
(int int int int) 1. beat generator number, 2. track number, 3. start time in ms, 4. end time in ms
symbol
right inlet: label for analyzer
beat
left inlet: (+ int) incoming beat number
label
left inlet: (+ symbol) incoming beat label
tempo
left inlet: (+ float) current tempo
factor_oracle
left inlet: (+ symbol) dict name
beat_dict_name
left inlet: (+ symbol) dict name
djazz.beat_generator
djazz.audio.audio_out
Plays back a beat of audio at a time from a buffer, where beats are passed in in a dict.
Uses supervp to playback in tempo and with pitch transposition.
audio out 1
audio out 2
list
left inlet: (int float int int) 1. pitch transposition, 2. tempo, 3. start time, 4. end time
audio_buffer_offset_in_ms
middle inlet: (+ int) adjusts the latency of the audio output. Default is 170 ms.
crossfade_time_in_ms
middle inlet: (+ int) adjusts the crossfade time between beats.
audio_buffer_name
right inlet: (+ symbol) audio buffer to play from
djazz.audio.beat_generator
djazz.audio.supervp_player
Reads the note data at the given beat data and sends it out to the beat player.
(int int int) 1. track number, 2. start time in ms 3. end time in ms
beat count
list
left inlet: (symbol int float) 1. beat dict name, 2. pitch transposition, 3. tempo
symbol
right inlet: beat list dict name
Controls which other audio generator(s) a generator will listen to
Pattr messages (must be passed via an external pattrhub/pattrstorage):
include_master (int) 0/1
listener_1 (int 1-3) which player listener 1 is listening to
listener_2 (int 1-3) which player listener 2 is listening to
listener_3 (int 1-3) which player listener 3 is listening to
label received from player being listened to
list
right inlet: (int symbol) listener number and label passed from listener
label
left inlet: (symbol) the label passed from the master control. Will be passed through if include_master is set to 1
djazz.analyzer
Records an audio buffer and a beat list, given the appropriate input.
sends every time a new repetition is added to beat list
sets the size of the buffer when recording is started/stopped, with/without clearing it, respectively
signal
left inlet: audio in 1
signal
in1: audio in 2
audio_buffer_name
right inlet: (+ symbol) name of audio buffer to record to
audio_score_dict_name
right inlet: (+ symbol) name of audio score (+ beat list) to write to
beat
right inlet: (+ int) starts writing a new beat when received
initial_tempo
right inlet: (+ float) bpm by which to calculate next beat and note durations
loop_section_beats
right inlet: (+ list: int int) start beat, end beat
will begin a new repetition whenever end beat is reached, restarting at start beat
djazz.audio
Wraps the supervp player for audio playback
audio out 1
audio out 2
position in audio file
list
left inlet: float float float int:1. start time in ms, 2. end time in ms, 3. duration in ms, 4. transposition (in semitones)
int
in1: crossfade time between beats in ms
symbol
right inlet: buffer name to play from
Adjusts message being sent to djaz.audio.beat_player so that the audio will be transposed up the desired number of octaves.
Pattr messages (must be passed via an external pattrhub/pattrstorage):
octaves (int) -255 to 255
(symbol int float) 1. beat dict name, 2. pitch transposition, 3. tempo
list
left inlet: (+ list: symbol int float) 1. beat dict name, 2. pitch transposition 3. tempo
Adjusts message being sent to djaz.audio.beat_player so that the audio will be transposed up the desired number of semitones.
Pattr messages (must be passed via an external pattrhub/pattrstorage):
semitones (int) -255 to 255
symbol int float; 1. beat dict name, 2. pitchtransposition, 3. tempo
list
left inlet: (+ list: symbol int float) 1. beat dict name, 2. pitch transposition, 3. tempo
Handles all the audio portion of djazz.
audio out 1 left
audio out 1 right
audio out 2 left
audio out 2 right
audio out 3 left
audio out 3 right
signal
left inlet: audio in 1
signal
in1: audio in 2
-
audio_buffer_name
in2: (+ symbol) name of audio buffer to record to and play from
record_active
in2: (+ 0/1) 1 arms the audio buffer to record; will not start recording until a beat number is received. 0 turns off record state.
initial_tempo
in2: (+ float) bpm by which to calculate next beat and note durations
loop_section_beats
in2: (+ list: int int) start beat, end beat
will begin a new repetition whenever end beat is reached, restarting at start beat
max_repetitions
in2: (+ int) will stop recording when this number is reached
in
right inlet: (+ symbol) folder name audio data to load for audio in subpatcher
out
right inlet: (+ symbol) folder name audio data to load for audio out subpatcher
djazz.audio.record
djazz.audio.supervp_player
Passes audio signal through. Control with djazz.view.audio_track.
Pattr messages (must be passed via an external pattrhub/pattrstorage):
volume (int) 0-127
active (int) 0/1
solo (int) 0/1
mute (int) 0/1
audio signal 1/L
audio signal 2/R
signal
left inlet: audio signal 1/L
right inlet: audio signal 2/R
djazz.view.audio_out_track
djazz.solo_bank
When active, will output beats in the polyrhythm given by numerator/denominator. Incoming beats will not be output, except for those that fall in phase with the output beats.
bang
depends on polyrhythm state
left inlet: When effect off (active = 0), passed directly through. When effect on (active = 1), triggers a new polyrhythm, or is ignored if a polyrhythm is in course.
active
left inlet: (+ 0/1) turns effect off or on
numerator
left inlet: (+ int) number of evenly spaced bangs to output in the space of denominator beats at the given tempo
denominator
left inlet: (+ int) number of beats to output numerator evenly spaced bangs over
Inputs bangs and outputs a beat number, based on loop, step, start, and end parameters.
Will not output when end beat is reached or after.
next beat
bang when loop occurs
bang when end is reached
bang
left inlet: bang for next beat
next_beat
right inlet: (+ int) sets the next beat to play when next bang is received
end
right inlet: (+ int) sets the end beat; when reached, no more output will occur
step
right inlet: (+ int) how many beats to advance upon receiving a bang; default is 1