Permalink
Browse files

Merge pull request #50 from samdoshi/orca-ops

Orca + JF tweaks
  • Loading branch information...
tehn committed Oct 11, 2016
2 parents 89a0945 + 55d3486 commit 220ea9d98de47b5a46507050266379d6599e3110
Showing with 48 additions and 43 deletions.
  1. +11 −10 src/ops/constants.c
  2. +8 −8 src/ops/constants.h
  3. +25 −20 src/ops/hardware.c
  4. +4 −5 src/ops/op.c
View
@@ -20,6 +20,7 @@ const tele_op_t op_WW_MUTE3 = MAKE_CONSTANT_OP(WW.MUTE3, WW_MUTE3, "WW.MUTE3");
const tele_op_t op_WW_MUTE4 = MAKE_CONSTANT_OP(WW.MUTE4, WW_MUTE4, "WW.MUTE4");
const tele_op_t op_WW_MUTEA = MAKE_CONSTANT_OP(WW.MUTEA, WW_MUTEA, "WW.MUTEA");
const tele_op_t op_WW_MUTEB = MAKE_CONSTANT_OP(WW.MUTEB, WW_MUTEB, "WW.MUTEB");
const tele_op_t op_MP_PRESET =
MAKE_CONSTANT_OP(MP.PRESET, MP_PRESET, "MP.PRESET");
const tele_op_t op_MP_RESET = MAKE_CONSTANT_OP(MP.RESET, MP_RESET, "MP.RESET");
@@ -32,6 +33,7 @@ const tele_op_t op_MP_FREEZE =
const tele_op_t op_MP_UNFREEZE =
MAKE_CONSTANT_OP(MP.UNFREEZE, MP_UNFREEZE, "MP.UNFREEZE");
const tele_op_t op_MP_STOP = MAKE_CONSTANT_OP(MP.STOP, MP_STOP, "MP.STOP");
const tele_op_t op_ES_PRESET =
MAKE_CONSTANT_OP(ES.PRESET, ES_PRESET, "ES.PRESET");
const tele_op_t op_ES_MODE = MAKE_CONSTANT_OP(ES.MODE, ES_MODE, "ES.MODE");
@@ -44,15 +46,14 @@ const tele_op_t op_ES_STOP = MAKE_CONSTANT_OP(ES.STOP, ES_STOP, "ES.STOP");
const tele_op_t op_ES_TRIPLE =
MAKE_CONSTANT_OP(ES.TRIPLE, ES_TRIPLE, "ES.TRIPLE");
const tele_op_t op_ES_MAGIC = MAKE_CONSTANT_OP(ES.MAGIC, ES_MAGIC, "ES.MAGIC");
const tele_op_t op_ORCA_TRACK = MAKE_CONSTANT_OP(OR.TRK, ORCA_TRACK, "OR.TRK");
const tele_op_t op_ORCA_CLOCK = MAKE_CONSTANT_OP(OR.CLK, ORCA_CLOCK, "OR.CLK");
const tele_op_t op_ORCA_DIVISOR =
MAKE_CONSTANT_OP(OR.DIV, ORCA_DIVISOR, "OR.DIV");
const tele_op_t op_ORCA_TRK = MAKE_CONSTANT_OP(OR.TRK, ORCA_TRACK, "OR.TRK");
const tele_op_t op_ORCA_CLK = MAKE_CONSTANT_OP(OR.CLK, ORCA_CLOCK, "OR.CLK");
const tele_op_t op_ORCA_DIV = MAKE_CONSTANT_OP(OR.DIV, ORCA_DIVISOR, "OR.DIV");
const tele_op_t op_ORCA_PHASE =
MAKE_CONSTANT_OP(OR.PHASE, ORCA_PHASE, "OR.PHASE");
const tele_op_t op_ORCA_RESET = MAKE_CONSTANT_OP(OR.RST, ORCA_RESET, "OR.RST");
const tele_op_t op_ORCA_WEIGHT =
MAKE_CONSTANT_OP(OR.WGT, ORCA_WEIGHT, "OR.WGT");
const tele_op_t op_ORCA_RST = MAKE_CONSTANT_OP(OR.RST, ORCA_RESET, "OR.RST");
const tele_op_t op_ORCA_WGT = MAKE_CONSTANT_OP(OR.WGT, ORCA_WEIGHT, "OR.WGT");
const tele_op_t op_ORCA_MUTE = MAKE_CONSTANT_OP(OR.MUTE, ORCA_MUTE, "OR.MUTE");
const tele_op_t op_ORCA_SCALE =
MAKE_CONSTANT_OP(OR.SCALE, ORCA_SCALE, "OR.SCALE");
@@ -61,11 +62,11 @@ const tele_op_t op_ORCA_PRESET =
MAKE_CONSTANT_OP(OR.PRESET, ORCA_PRESET, "OR.PRESET");
const tele_op_t op_ORCA_RELOAD =
MAKE_CONSTANT_OP(OR.RELOAD, ORCA_RELOAD, "OR.RELOAD");
const tele_op_t op_ORCA_ROTATES =
const tele_op_t op_ORCA_ROTS =
MAKE_CONSTANT_OP(OR.ROTS, ORCA_ROTATES, "OR.ROTS");
const tele_op_t op_ORCA_ROTATEW =
const tele_op_t op_ORCA_ROTW =
MAKE_CONSTANT_OP(OR.ROTW, ORCA_ROTATEW, "OR.ROTW");
const tele_op_t op_ORCA_GRESET =
const tele_op_t op_ORCA_GRST =
MAKE_CONSTANT_OP(OR.GRST, ORCA_GRESET, "OR.GRST");
const tele_op_t op_ORCA_CVA = MAKE_CONSTANT_OP(OR.CVA, ORCA_CVA, "OR.CVA");
const tele_op_t op_ORCA_CVB = MAKE_CONSTANT_OP(OR.CVB, ORCA_CVB, "OR.CVB");
View
@@ -34,20 +34,20 @@ extern const tele_op_t op_ES_TRANS;
extern const tele_op_t op_ES_STOP;
extern const tele_op_t op_ES_TRIPLE;
extern const tele_op_t op_ES_MAGIC;
extern const tele_op_t op_ORCA_TRACK;
extern const tele_op_t op_ORCA_CLOCK;
extern const tele_op_t op_ORCA_DIVISOR;
extern const tele_op_t op_ORCA_TRK;
extern const tele_op_t op_ORCA_CLK;
extern const tele_op_t op_ORCA_DIV;
extern const tele_op_t op_ORCA_PHASE;
extern const tele_op_t op_ORCA_RESET;
extern const tele_op_t op_ORCA_WEIGHT;
extern const tele_op_t op_ORCA_RST;
extern const tele_op_t op_ORCA_WGT;
extern const tele_op_t op_ORCA_MUTE;
extern const tele_op_t op_ORCA_SCALE;
extern const tele_op_t op_ORCA_BANK;
extern const tele_op_t op_ORCA_PRESET;
extern const tele_op_t op_ORCA_RELOAD;
extern const tele_op_t op_ORCA_ROTATES;
extern const tele_op_t op_ORCA_ROTATEW;
extern const tele_op_t op_ORCA_GRESET;
extern const tele_op_t op_ORCA_ROTS;
extern const tele_op_t op_ORCA_ROTW;
extern const tele_op_t op_ORCA_GRST;
extern const tele_op_t op_ORCA_CVA;
extern const tele_op_t op_ORCA_CVB;
View
@@ -513,66 +513,70 @@ static void op_STATE_get(const void *NOTUSED(data), scene_state_t *NOTUSED(ss),
}
static void op_JF_TR_get(const void *data, scene_state_t *ss, exec_state_t *es,
command_state_t *cs) {
static void op_JF_TR_get(const void *NOTUSED(data), scene_state_t *NOTUSED(ss),
exec_state_t *NOTUSED(es), command_state_t *cs) {
int16_t a = cs_pop(cs);
int16_t b = cs_pop(cs);
uint8_t d[] = { JF_TR, a, b };
tele_ii_tx(JF_ADDR, d, 3);
}
static void op_JF_RMODE_get(const void *data, scene_state_t *ss,
exec_state_t *es, command_state_t *cs) {
static void op_JF_RMODE_get(const void *NOTUSED(data),
scene_state_t *NOTUSED(ss),
exec_state_t *NOTUSED(es), command_state_t *cs) {
int16_t a = cs_pop(cs);
uint8_t d[] = { JF_RMODE, a };
tele_ii_tx(JF_ADDR, d, 2);
}
static void op_JF_RUN_get(const void *data, scene_state_t *ss, exec_state_t *es,
command_state_t *cs) {
static void op_JF_RUN_get(const void *NOTUSED(data), scene_state_t *NOTUSED(ss),
exec_state_t *NOTUSED(es), command_state_t *cs) {
int16_t a = cs_pop(cs);
uint8_t d[] = { JF_RUN, a >> 8, a & 0xff };
tele_ii_tx(JF_ADDR, d, 3);
}
static void op_JF_SHIFT_get(const void *data, scene_state_t *ss,
exec_state_t *es, command_state_t *cs) {
static void op_JF_SHIFT_get(const void *NOTUSED(data),
scene_state_t *NOTUSED(ss),
exec_state_t *NOTUSED(es), command_state_t *cs) {
int16_t a = cs_pop(cs);
uint8_t d[] = { JF_SHIFT, a >> 8, a & 0xff };
tele_ii_tx(JF_ADDR, d, 3);
}
static void op_JF_VTR_get(const void *data, scene_state_t *ss, exec_state_t *es,
command_state_t *cs) {
static void op_JF_VTR_get(const void *NOTUSED(data), scene_state_t *NOTUSED(ss),
exec_state_t *NOTUSED(es), command_state_t *cs) {
int16_t a = cs_pop(cs);
int16_t b = cs_pop(cs);
uint8_t d[] = { JF_VTR, a >> 8, a & 0xff, b };
tele_ii_tx(JF_ADDR, d, 4);
}
static void op_JF_MODE_get(const void *data, scene_state_t *ss,
exec_state_t *es, command_state_t *cs) {
static void op_JF_MODE_get(const void *NOTUSED(data),
scene_state_t *NOTUSED(ss),
exec_state_t *NOTUSED(es), command_state_t *cs) {
int16_t a = cs_pop(cs);
uint8_t d[] = { JF_MODE, a };
tele_ii_tx(JF_ADDR, d, 2);
}
static void op_JF_TICK_get(const void *data, scene_state_t *ss,
exec_state_t *es, command_state_t *cs) {
static void op_JF_TICK_get(const void *NOTUSED(data),
scene_state_t *NOTUSED(ss),
exec_state_t *NOTUSED(es), command_state_t *cs) {
int16_t a = cs_pop(cs);
uint8_t d[] = { JF_TICK, a };
tele_ii_tx(JF_ADDR, d, 2);
}
static void op_JF_VOX_get(const void *data, scene_state_t *ss, exec_state_t *es,
command_state_t *cs) {
static void op_JF_VOX_get(const void *NOTUSED(data), scene_state_t *NOTUSED(ss),
exec_state_t *NOTUSED(es), command_state_t *cs) {
int16_t a = cs_pop(cs);
int16_t b = cs_pop(cs);
int16_t c = cs_pop(cs);
@@ -581,17 +585,18 @@ static void op_JF_VOX_get(const void *data, scene_state_t *ss, exec_state_t *es,
tele_ii_tx(JF_ADDR, d, 6);
}
static void op_JF_NOTE_get(const void *data, scene_state_t *ss,
exec_state_t *es, command_state_t *cs) {
static void op_JF_NOTE_get(const void *NOTUSED(data),
scene_state_t *NOTUSED(ss),
exec_state_t *NOTUSED(es), command_state_t *cs) {
int16_t a = cs_pop(cs);
int16_t b = cs_pop(cs);
uint8_t d[] = { JF_NOTE, a >> 8, a & 0xff, b >> 8, b & 0xff };
tele_ii_tx(JF_ADDR, d, 5);
}
static void op_JF_GOD_get(const void *data, scene_state_t *ss, exec_state_t *es,
command_state_t *cs) {
static void op_JF_GOD_get(const void *NOTUSED(data), scene_state_t *NOTUSED(ss),
exec_state_t *NOTUSED(es), command_state_t *cs) {
int16_t a = cs_pop(cs);
uint8_t d[] = { JF_TICK, a };
View
@@ -65,11 +65,10 @@ const tele_op_t *tele_ops[OPS] = {
&op_MP_RESET, &op_MP_SYNC, &op_MP_MUTE, &op_MP_UNMUTE, &op_MP_FREEZE,
&op_MP_UNFREEZE, &op_MP_STOP, &op_ES_PRESET, &op_ES_MODE, &op_ES_CLOCK,
&op_ES_RESET, &op_ES_PATTERN, &op_ES_TRANS, &op_ES_STOP, &op_ES_TRIPLE,
&op_ES_MAGIC, &op_ORCA_TRACK, &op_ORCA_CLOCK, &op_ORCA_DIVISOR,
&op_ORCA_PHASE, &op_ORCA_RESET, &op_ORCA_WEIGHT, &op_ORCA_MUTE,
&op_ORCA_SCALE, &op_ORCA_BANK, &op_ORCA_PRESET, &op_ORCA_RELOAD,
&op_ORCA_ROTATES, &op_ORCA_ROTATEW, &op_ORCA_GRESET, &op_ORCA_CVA,
&op_ORCA_CVB,
&op_ES_MAGIC, &op_ORCA_TRK, &op_ORCA_CLK, &op_ORCA_DIV, &op_ORCA_PHASE,
&op_ORCA_RST, &op_ORCA_WGT, &op_ORCA_MUTE, &op_ORCA_SCALE, &op_ORCA_BANK,
&op_ORCA_PRESET, &op_ORCA_RELOAD, &op_ORCA_ROTS, &op_ORCA_ROTW,
&op_ORCA_GRST, &op_ORCA_CVA, &op_ORCA_CVB,
};
/////////////////////////////////////////////////////////////////

0 comments on commit 220ea9d

Please sign in to comment.