Note hold.
Version: 1.1.0
License: proprietary license
Requires:
We can privately hand you one or more example plugins if you are interested.
Module type: Utility
typedef struct bwp_hold bwp_hold;
Hold object.
static inline void bwp_hold_init(
bwp_hold * BW_RESTRICT hold);
Initializes option values in hold.
Call this on hold before other functions in this API.
static inline void bwp_hold_reset(
bwp_hold * BW_RESTRICT hold);
Resets hold to its initial state.
This must be called at least once before calling bwp_hold_process().
static inline void bwp_hold_process(
bwp_hold * BW_RESTRICT hold,
const bw_note_queue * BW_RESTRICT queue);
Lets hold process events in the input queue.
static inline void bwp_hold_set_hold(
bwp_hold * BW_RESTRICT hold,
char value);
Sets whether hold should actually hold notes (value non-0) or not (0, bypass).
Default value: 0 (don't hold notes).
static inline void bwp_hold_set_note_on_passthrough(
bwp_hold * BW_RESTRICT hold,
char value);
Sets whether note on events should be emitted in the output queue even when notes are already being held (value non-0) or not (0) in hold.
Default value: 0 (no passthrough).
static inline void bwp_hold_set_note_on_passthrough_with_off(
bwp_hold * BW_RESTRICT hold,
char value);
Sets whether note off events should be emitted in the output queue before passthrough note on events (value non-0) or not (0) in hold.
Default value: 0 (no passthrough with off).
static inline void bwp_hold_set_latch(
bwp_hold * BW_RESTRICT hold,
char value);
Sets whether hold should emit note offs for all currently held notes when a note is pressed while all other notes were released (value non-0) or not (0).
It is assumed that always the same queue is given to bwp_hold_process() when enabled.
Default value: 0 (disabled).
static inline bw_note_queue * bwp_hold_get_queue(
bwp_hold * BW_RESTRICT hold);
Returns a pointer to hold's internal output note queue, which has to be cleared by the user of this API.
static inline char bwp_hold_is_valid(
bwp_hold * BW_RESTRICT hold);
Tries to determine whether hold is valid and returns non-0 if it seems to be the case and 0 if it is certainly not. False positives are possible, false negatives are not.
hold must at least point to a readable memory block of size greater than or equal to that of bwp_hold.
class Hold {
public:
Hold();
void reset();
void process(
const bw_note_queue * BW_RESTRICT queue);
void setHold(
char value);
void setNoteOnPassthrough(
char value);
void setNoteOnPassthroughWithOff(
char value);
void setLatch(
char value);
bw_note_queue * getQueue();
...
}
bwp_hold_is_valid().bwp_hold_set_on_passthrough*.