prop

Files: prop.h, prop.c

Simple rhythmic notation gate generator
Creates a gate using a simple rhythmic notation system called prop. When it reaches the end of the prop string, it will loop back to the beginning.
Prop has a few basic rules:
1. A '+' denotes a on. A '-' denotes an off (rest). They each have an equal duration of a quarter note.
2. On and off values can be strung together to create equally spaced gates: +-+--
3. When notes are enclosed in parantheses '()' following a positive integer N, their duration is reduced N times: ++2(+-)
4. When notes are enclosed in brackets '[]' following a positive integer N, their duration is scaled by a factor of N: ++2[++]
5. Parenthesis and brackets can be nested: +- 2[3(+2(++)+)]2(++)

Functions

sp_prop_create(sp_prop **prop)
sp_prop_init(sp_data *sp, sp_prop *prop, const char *str)
sp_prop_compute(sp_data *sp, sp_prop *prop, SPFLOAT *dummy, SPFLOAT *out)
sp_prop_destroy(sp_prop **prop)

Mandatory Parameters

str: Prop string to be parsed.
(Recommended value: N/A)

Optional Parameters

bpm: Beats per minute of the prop string.
(Default value: 60)

Outputs

out: Gate output.

Other Functions:

sp_prop_reset(sp_data *sp, sp_prop *prop)
Resets prop back to starting position.