~hp/chimaera_firmware

fd0f0ba9c9b457612974df63f88ad057c0a8deca — Hanspeter Portner 8 years ago f0b540f
update static groups attributes.
2 files changed, 41 insertions(+), 38 deletions(-)

M config/config.c
M scsynth/scsynth.c
M config/config.c => config/config.c +38 -35
@@ 240,45 240,48 @@ Config config = {
		}
	},

	.scsynth_groups = {
		[0] = {
			.name = {'g', 'r', 'o', 'u', 'p', '0', '\0'},
			.sid = 1000,
			.group = 0,
			.out = 0, 
			.arg = 0,
			.alloc = 1,
			.gate = 1,
			.add_action = SCSYNTH_ADD_TO_HEAD,
			.is_group = 0
		},
		[1] = {
			.name = {'g', 'r', 'o', 'u', 'p', '1', '\0'},
			.sid = 1000,
			.group = 1,
			.out = 1, 
			.arg = 0,
			.alloc = 1,
			.gate = 1,
			.add_action = SCSYNTH_ADD_TO_HEAD,
			.is_group = 0
#define SYNTH_DEF(C, N) \
		{ \
			.name = {'s', 'y', 'n', 't', 'h', '_', C, '\0'}, \
			.sid = 200, \
			.group = 100 + N, \
			.out = N, \
			.arg = 0, \
			.alloc = 1, \
			.gate = 1, \
			.add_action = SCSYNTH_ADD_TO_HEAD, \
			.is_group = 0 \
		}
	.scsynth_groups = {
		[0] = SYNTH_DEF('0', 0),
		[1] = SYNTH_DEF('1', 1),
		[2] = SYNTH_DEF('2', 2),
		[3] = SYNTH_DEF('3', 3),
		[4] = SYNTH_DEF('4', 4),
		[5] = SYNTH_DEF('5', 5),
		[6] = SYNTH_DEF('6', 6),
		[7] = SYNTH_DEF('7', 7)
	},

	.oscmidi_groups = {
		[0] = {
			.mapping = OSC_MIDI_MAPPING_CONTROL_CHANGE,
			.control = 0x07,
			.offset = MIDI_BOT,
			.range = MIDI_RANGE
		},
		[1] = {
			.mapping = OSC_MIDI_MAPPING_CONTROL_CHANGE,
			.control = 0x07,
			.offset = MIDI_BOT,
			.range = MIDI_RANGE
#undef SYNTH_DEF

#define MIDI_DEF \
		{ \
			.mapping = OSC_MIDI_MAPPING_CONTROL_CHANGE, \
			.control = 0x07, \
			.offset = MIDI_BOT, \
			.range = MIDI_RANGE \
		}
	.oscmidi_groups = {
		[0] = MIDI_DEF,
		[1] = MIDI_DEF,
		[2] = MIDI_DEF,
		[3] = MIDI_DEF,
		[4] = MIDI_DEF,
		[5] = MIDI_DEF,
		[6] = MIDI_DEF,
		[7] = MIDI_DEF
	}
#undef MIDI_DEF
};

uint16_t

M scsynth/scsynth.c => scsynth/scsynth.c +3 -3
@@ 46,7 46,7 @@ static const char *set_fmt [2] = {
	[1] = "iiiffff"	// derivatives
};

static const char *default_fmt = "group%02i";
static const char *default_fmt = "synth_%i";

static OSC_Timetag tt;



@@ 260,8 260,8 @@ _scsynth_reset(const char *path, const char *fmt, uint_fast8_t argc, osc_data_t 
	{
		SCSynth_Group *group = &scsynth_groups[i];
		sprintf(group->name, default_fmt, i);
		group->sid = 1000;
		group->group = i;
		group->sid = 200;
		group->group = 100 + i;
		group->out = i;
		group->arg = 0;
		group->alloc = 1;