bwp_hold

Note hold.

Examples

We can privately hand you one or more example plugins if you are interested.

Contact us

API

Module type: Utility

bwp_hold

typedef struct bwp_hold bwp_hold;

Hold object.

bwp_hold_init()

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.

bwp_hold_reset()

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().

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.

bwp_hold_set_hold()

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).

bwp_hold_set_note_on_passthrough()

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).

Default value: 0 (no passthrough).

bwp_hold_set_note_on_passthrough_with_off()

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).

Default value: 0 (no passthrough with off).

bwp_hold_get_queue()

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.

bwp_hold_is_valid()

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_note_track_is_valid.

C++ wrapper

BrickworksPro::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);

	bw_note_queue * getQueue();
...
}

Changelog

  • Version 1.0.0:
    • First release.