Subsections of Adding to Djazz
Adding to Djazz
To add functionality to Djazz, use the following method:
IN MODEL:
- Create your patcher. Use pattr objects for asynchronous input. You can include a pattrhub object to broadcast pattr messages for reusability’s sake, but this is not needed if the patcher is inside the model patcher (djazz.maxpat).
- Connect your patcher in the appropriate place inside djazz.maxpat. See the specific descriptions for examples.
IN CONTROL:
- Inside djazz.control, place a subpatcher, possibly containing other subpatchers, with pattr objects, so that the patcher/pattr hierarchy reflects the way in which you want your new functionality to be called.
- Create a translator subpatcher and connect the output of the control subpatcher to it. This translator subpatcher should convert the message passed into djazz.control (<control variable name> <control variable value>) to the message needed by the model (<model variable name> <model variable value>). The Max regexp and __ objects are good for this. You can use the Debug View button to open the lists of pattrs in the model and control to make sure things are being named properly.
- Parameter-enable the pattrs if you want to trigger them with external devices via Djazz’s parameter handler patcher. Alternatively, you could pattern-enable the pattrs in the view (following section). Only parameter-enable one set of pattrs: those in the control or those in the view.
- Connect the translator to the control output that goes to the model.
IN A VIEW:
- Create a bpatcher containing the graphic controls and views for your patcher. Attach pattr objects to the controls.
- Create a translator subpatcher and connect the output of the control subpatcher to it. This translator subpatcher should convert the message passed out of your bpatcher (<view variable name> <view variable value>) to the message needed by the control (<control variable name> <control variable value>). The Max regexp and __ objects are good for this.
- When placed in djazz.view, the pattrstorage system will handle the messaging; you don’t have to connect your bpatcher to an output.
IN A VIEW CONTROL:
- If necessary, add a subpatcher with pattrs, and a corresponding trnaslator, to djazz.view_control if you want to pass data from the model back into your view subpatcher.
Be sure to give all your pattrs initial values, and that these initial values are the same in the view, control, model, and possibly view control.
MIDI Effects
Effects that modify MIDI output should be placed inside the djazz.midi_out_effect_list abstraction inside the djazz.midi_out_track abstraction:
Audio Effects
Effects that modify audio output should be placed in one of two places, depending how they function. There are two places where audio can be modified:
If the object does not process audio data itself, but determines parameters to pass to the supervp player, so that it plays audio data back differently, it should be placed in the djazz.audio_beat_generator abstraction. This is how Djazz’s audio_transpose_pitch and audio_transpose_octave effects work:
If the object processes audio itself, it should be placed between an djazz.beat_player object and an audio.out object:
Audio Effects
The factor oracle player, which Djazz uses to improvise, can be modified or replaced by another algorithm. There are several levels of depth to which you can modify the improvisation functionality; read the API section on improvisation . Here is just an explanation for where to put a new improviser Max object or abstraction.
Replace the improviser.maxpat abstraction in djazz.beat_generator. Your new improviser object should conform to the same input and output messages as the improviser.maxpat (see the reference page ).