#include <PowerQuantise.h>
Collaboration diagram for TSE3::Util::PowerQuantise:
Public Types | |
enum | Direction { nearest, backwards, forwards } |
enum | Length { quantiseOffTime, quantiseLength } |
Public Member Functions | |
PowerQuantise () | |
Pattern & | pattern () |
int | by () const |
void | setBy (int by) |
int | window () const |
void | setWindow (int window) |
bool | onlySelected () const |
void | setOnlySelected (bool s) |
bool | onlyNotes () const |
void | setOnlyNotes (bool n) |
bool | spreadCtrl () const |
void | setSpreadCtrl (bool s) |
Direction | direction () const |
void | setDirection (Direction d) |
Length | length () const |
void | setLength (Length l) |
int | lengthBy () const |
void | setLengthBy (int by) |
TSE3::Clock | humanise () const |
void | setHumanise (TSE3::Clock h) |
TSE3::Clock | lengthHumanise () const |
void | setLengthHumanise (TSE3::Clock h) |
void | go (TSE3::PhraseEdit *phraseEdit) |
This utility class provides you with more quantising capabilities than you ever dreamt possible.
The class is used by specifying the set of parameters to run the PowerQuantise with, and then providing a (tidied) PhraseEdit object containing the source MidiData to quantise. Once the PowerQuantiser is run, the PhraseEdit will contain tidied, (powerfully) quantised MidiData.
Some of the facilities provided by PowerQuantise are:
|
|
|
|
|
Creates a PowerQuantise object with a sensible default set-up. |
|
|
|
Returns the percentage by which events will be quantised towards a snap point. 100% will move the command exactly to the snap point. 50% will move it half way towards it. 110% will move the event just past the snap point. This is a way of preventing the quantised MidiData from sounding too mechanised.
|
|
Sets the percentage shift value.
|
|
This is a percentage value that controls which MIDI events get quantised. At 0% no events will be quantised. As the value increases, events near to (and then further away from) snaps points begin to get quantised. At 100% all MIDI events will be quantised.
|
|
Sets the window value.
|
|
If true, this parameter forces PowerQuantise to only alter selected events. (This uses the selected bit in a MidiCommand). If false, PowerQuantise alters all events (that pass other event filters).
|
|
Sets the onlySelected value.
|
|
If true, this parameter forces PowerQuantise to only alter note MIDI events. If false, PowerQuantise alters all events (that pass other event filters).
|
|
Sets the onlyNotes value.
|
|
This is a very powerful feature that prevents continuous MIDI controller events (pitch bend, pan, reverb, etc) being pulled toward snap points as most sequencers will do. This tends to remove the continuous nature of the pattern of these events. Enabling this feature spreads the controllers between their surrounding note events after the quantisation. This spread will follow the same pattern that they originally were positoned in. This means that pitch bend slides, for example, will sound pretty much as they did prior to the quantise.
|
|
Sets the spreadCtrl value.
|
|
This returns which snap point a MIDI event moves towards. This will normally be the nearest available snap point, but you can shoose to snap all events forwards or backwards.
|
|
Sets the direction value.
|
|
This returns what PowerQuantise does with MidiCommand_NoteOffs. You can choose to either snap the length of a MidiCommand_NoteOn to MidiCommand_NoteOff to the pattern, or quantise the actual time of the MidiCommand_NoteOff. You can also specify separate percentage shift and humanise values for note lengths.
|
|
Sets the length value.
|
|
Returns the percentage by which note lengths are moved towards their quantised value.
|
|
Sets the percentage shift value.
|
|
After an event is quantised, you can choose to have it moved by a random value (up to the a specified number of pulses which is returned by this function). This is an alternative way of preventing the quantised MidiData sounding 'mechanised' by introducing slight human-like errors. A value of zero will disable the humanise facility.
|
|
Sets the humanise value.
|
|
This is a separate value of humanise which applies to MidiCommand_NoteOff MIDI events.
|
|
Sets the length humanise value.
|
|
Do the PowerQuantise on the given PhraseEdit. |