I've been working on a totally new sampling and triggering algorithm for some time. This new algorithm will work only on STM32F205, STM32F446 and GD32F405 based MegaDrum.
Here is the beta version of the firmware:
This totally new algorithm is activated by enabling both 'Alt Sampling Alg' and 'Inputs Priority' in Misc Settings (either in the module directly or via MDMFX).
The main goal of this algorithm is to improve triggering for pads/cymbals with long vibration/aftertriggering.
I have one such bad mesh pad (dual piezo/piezo pad) and one bad cymbal (Yamaha style [but not Yamaha] 3way piezo/switch/switch cymbal) with which I've been testing this algorithm during development.
The good starting points for these bad pad and cymbal are:
For the bad mesh bad:
Retrigger: 1-10
DynLevel: 4
DynTime: 24
MinScan: 50-60 (this is because first half wave is quite long on the mesh pad)
If the precision rectifier is present:
Pos Level: 1
Pos Low: 15
Pos High: 28
For the bad cymbal:
Retrigger: 1-10
DynLevel: 4
DynTime: 24
Miscan: 15-20
Gains and HighLevels can be set to the same values as with the standard algorithm. Threshold for piezos likely can be set lower.
Not everything is implemented in this new algorithm, e.g. ProgramChange and CutOff in 'Function' are not implemented yet. XTalk suppression may be a bit off.
If MegaDrum is with a TFT LCD (tested with 320x240 LCDs) the following additional functionality is implemented:
The third page of the menu (Samples Graph page) is used to display a waveform (or two waveforms if a piezo/piezo dual pad) of the last triggered hit.
You can select 4 types of the displayed waveform(s).
0 - pure levels as registered before Gain adjustment and normalization. For dual piezo/piezo pads signals for both zones will be overlayed with different colors.
1 - same as 0 but split between head (in the top) and rim (in the bottom)
2 - normalized against HighLevel levels after Gain adjustment. For dual piezo/piezo pads signals for both zones will be overlayed with different colors.
3 - same as 2 but split between head (in the top) and rim (in the bottom)
4-7 - same as above but with slower refresh rate (full clear of the samples graph)
0-3 types may cause samples graph corruption for very fast rolls.
In addition it will show:
Sampled time period and number of samples taken (will depend on MinScan mostly)
Position of the signal peak both as a number and as '*' symbol in the waveform graph. Can be useful for Positional sensing fine tuning.
I implemented support for Roland 3way cymbals but I have not tested it.
If 'Inputs Priority' is not activated, this beta firmware should work exactly the same as the latest official firmware version.
Any feedback is welcome if you have time and willing to test.