Skip to content
Discussion options

You must be logged in to vote

Yes, it's a bitmask, LSB is the scale root and is always set. See Ian Ring's website for all the scales. I used a 32 bit mask so we can hopefully support micro-tunings later, but I only tested with 12 tone scales.

In t_scale, notes is the bitmask of note positions, and tones is the number of tones in the tuning system (i.e. 12 tone equal temperament). In t_keyboard, split is the difference between the 2 rows of pads and repeat is the number of degrees in the scale (set automatically when the keyboard map is generated).

For a chromatic scale:

// 12 bits set.
#define NOTES_CHROMATIC 4095

static t_keyboard g_kbd;
static t_scale g_scale;

scale_init(&g_scale, NOTES_CHROMATIC, 12);
keyboard_init

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@bangcorrupt
Comment options

Answer selected by enorrmann
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants