|
|
|
@ -564,11 +564,11 @@ bool Dexed::encodeVoice(uint8_t* encoded_data) |
|
|
|
|
// DEXED_OP_SCL_LEFT_DEPTH, // 9
|
|
|
|
|
// DEXED_OP_SCL_RGHT_DEPTH, // 10
|
|
|
|
|
memcpy(&encoded_data[op * 17], &data[op * 21], 11); |
|
|
|
|
encoded_data[(op * 17) + 11] = ((*(p_data + DEXED_OP_SCL_RGHT_CURVE + (op * 21)) & 0x0c) << 2) & (*(p_data + DEXED_OP_SCL_LEFT_CURVE + (op * 21)) & 0x03); |
|
|
|
|
encoded_data[(op * 17) + 12] = ((*(p_data + DEXED_OP_OSC_DETUNE + (op * 21)) & 0x78) << 3) & (*(p_data + DEXED_OP_OSC_RATE_SCALE + (op * 21)) & 0x07); |
|
|
|
|
encoded_data[(op * 17) + 13] = ((*(p_data + DEXED_OP_KEY_VEL_SENS + (op * 21)) & 0x1c) << 2) & (*(p_data + DEXED_OP_AMP_MOD_SENS + (op * 21)) & 0x03); |
|
|
|
|
encoded_data[(op * 17) + 11] = ((*(p_data + DEXED_OP_SCL_RGHT_CURVE + (op * 21)) & 0x0c) << 2) | (*(p_data + DEXED_OP_SCL_LEFT_CURVE + (op * 21)) & 0x03); |
|
|
|
|
encoded_data[(op * 17) + 12] = ((*(p_data + DEXED_OP_OSC_DETUNE + (op * 21)) & 0x0f) << 3) | (*(p_data + DEXED_OP_OSC_RATE_SCALE + (op * 21)) & 0x07); |
|
|
|
|
encoded_data[(op * 17) + 13] = ((*(p_data + DEXED_OP_KEY_VEL_SENS + (op * 21)) & 0x07) << 2) | (*(p_data + DEXED_OP_AMP_MOD_SENS + (op * 21)) & 0x03); |
|
|
|
|
encoded_data[(op * 17) + 14] = *(p_data + DEXED_OP_OUTPUT_LEV + (op * 21)); |
|
|
|
|
encoded_data[(op * 17) + 15] = ((*(p_data + DEXED_OP_FREQ_COARSE + (op * 21)) & 0x3e) << 1) & (*(p_data + DEXED_OP_OSC_MODE + (op * 21)) & 0x01); |
|
|
|
|
encoded_data[(op * 17) + 15] = ((*(p_data + DEXED_OP_FREQ_COARSE + (op * 21)) & 0x1f) << 1) | (*(p_data + DEXED_OP_OSC_MODE + (op * 21)) & 0x01); |
|
|
|
|
encoded_data[(op * 17) + 16] = *(p_data + DEXED_OP_FREQ_FINE + (op * 21)); |
|
|
|
|
} |
|
|
|
|
// DEXED_PITCH_EG_R1, // 0
|
|
|
|
@ -581,14 +581,15 @@ bool Dexed::encodeVoice(uint8_t* encoded_data) |
|
|
|
|
// DEXED_PITCH_EG_L4, // 7
|
|
|
|
|
memcpy(&encoded_data[102], &data[DEXED_VOICE_OFFSET], 8); |
|
|
|
|
encoded_data[110] = (*(p_data + DEXED_VOICE_OFFSET + DEXED_ALGORITHM) & 0x1f); |
|
|
|
|
encoded_data[111] = ((*(p_data + DEXED_VOICE_OFFSET + DEXED_OSC_KEY_SYNC) & 0x08) << 3) & (*(p_data + DEXED_VOICE_OFFSET + DEXED_FEEDBACK) & 0x07); |
|
|
|
|
encoded_data[111] = (((*(p_data + DEXED_VOICE_OFFSET + DEXED_OSC_KEY_SYNC) & 0x01) << 3) | ((*(p_data + DEXED_VOICE_OFFSET + DEXED_FEEDBACK)) & 0x07)); |
|
|
|
|
// DEXED_LFO_SPEED, // 11
|
|
|
|
|
// DEXED_LFO_DELAY, // 12
|
|
|
|
|
// DEXED_LFO_PITCH_MOD_DEP, // 13
|
|
|
|
|
// DEXED_LFO_AMP_MOD_DEP, // 14
|
|
|
|
|
memcpy(&encoded_data[112], &data[DEXED_VOICE_OFFSET + DEXED_LFO_SPEED], 4); |
|
|
|
|
encoded_data[116] = ((*(p_data + DEXED_VOICE_OFFSET + DEXED_LFO_PITCH_MOD_SENS) & 0x30) << 4) & ((*(p_data + DEXED_VOICE_OFFSET + DEXED_LFO_WAVE) & 0x0e) << 1) & (*(p_data + DEXED_VOICE_OFFSET + DEXED_LFO_SYNC) & 0x01); |
|
|
|
|
encoded_data[116] = (((*(p_data + DEXED_VOICE_OFFSET + DEXED_LFO_PITCH_MOD_SENS) & 0x07) << 4) | (((*(p_data + DEXED_VOICE_OFFSET + DEXED_LFO_WAVE)) & 0x07) << 1) | ((*(p_data + DEXED_VOICE_OFFSET + DEXED_LFO_SYNC)) & 0x01)); |
|
|
|
|
encoded_data[117] = *(p_data + DEXED_VOICE_OFFSET + DEXED_TRANSPOSE); |
|
|
|
|
memset(&encoded_data[118], 0, 10); |
|
|
|
|
memcpy(&encoded_data[118], &data[DEXED_VOICE_OFFSET + DEXED_NAME], 10); |
|
|
|
|
|
|
|
|
|
return (true); |
|
|
|
|