Skip to content

Commit

Permalink
adjust pressure sensitivity for POCO X3
Browse files Browse the repository at this point in the history
  • Loading branch information
bokontep committed Apr 11, 2021
1 parent 64f8820 commit 8084532
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion app/src/main/java/org/bokontep/wavesynth/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -963,7 +963,13 @@ public boolean onTouchEvent(MotionEvent event) {
int waveform2 = (this.osc2Wave + (wi * this.osc2WaveControl) / factor) % 256;
engine.selectWaveform(0, 0, midinote, waveform1);
engine.selectWaveform(0, 1, midinote, waveform2);
int tmp = ((int) (127.0 * event.getPressure(i) * 4));
float pressure = event.getPressure();
if(pressure<0.25f)
{
pressure = 0.25f;
}

int tmp = ((int) (127.0 * pressure * 4));
vel = tmp > 127 ? 127 : tmp;
scopetext = scopetext + " " + midinote;
if (vel >= 0) {
Expand Down

0 comments on commit 8084532

Please sign in to comment.