|
|
@ -83,6 +83,8 @@ Dexed::Dexed(int rate) |
|
|
|
|
|
|
|
|
|
|
|
sustain = false; |
|
|
|
sustain = false; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
velocity_level = (100.0 / 127.0); |
|
|
|
|
|
|
|
|
|
|
|
setEngineType(DEXED_ENGINE); |
|
|
|
setEngineType(DEXED_ENGINE); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -168,7 +170,7 @@ void Dexed::keydown(int16_t pitch, uint8_t velo) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
pitch += data[144] - TRANSPOSE_FIX; |
|
|
|
pitch += data[144] - TRANSPOSE_FIX; |
|
|
|
velo = (((float)velo) * velocity_level + 0.5); // 100/127
|
|
|
|
velo = float(velo) * velocity_level + 0.5; // 100/127
|
|
|
|
|
|
|
|
|
|
|
|
int previousKeyDown = lastKeyDown; |
|
|
|
int previousKeyDown = lastKeyDown; |
|
|
|
lastKeyDown = pitch; |
|
|
|
lastKeyDown = pitch; |
|
|
@ -733,3 +735,8 @@ void Dexed::setVelocityLevel(uint8_t velocity_level) |
|
|
|
{ |
|
|
|
{ |
|
|
|
velocity_level = float(velocity_level) / 127.0; |
|
|
|
velocity_level = float(velocity_level) / 127.0; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
float Dexed::getVelocityLevel(void) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
return (velocity_level); |
|
|
|
|
|
|
|
} |
|
|
|