Replies: 2 comments
-
A simple clipping compensation is now implemented. This simple algorithm is different from the one proposed in the original post of this forum thread. But even the simple algorithm does feel quite natural when playing the pad with hard strikes. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The Teensy 4.0 and ESP32 both have ADC with 12 bits resolution where the number of usable bits is approx. 9. This gives a theoretical maximum dynamic of 54 dB (see also this thread). To get the required sensitivity it is necessary to clip the loudest parts of the signal. This sounds bad but maybe there are possibilities to cure the clipping. One approach could be to low-pass filter the signal. Here is a result of a quick test I did:

The blue trace is the original signal which is not clipped. The red signal is the same signal where some hard clipping was applied. The yellow trace is a low-pass filtered version of the red signal.
If the filter delay of the low-pass filter is compensated and the cut-off frequency and gain of the low-pass filter is properly adjusted, the resulting yellow trace can approximate the original signal pretty good.
More investigations and testing will follow...
Edit: The corresponding code is marked with the discussions_clipping_compensation Git tag.
Beta Was this translation helpful? Give feedback.
All reactions