Mallets - Modalbar, proof of concept

I've attacked Mallets again. The instruments in Stk ModalBar (first nine instruments in Mallets) have settings for each resonator, there's four of them in each instrument, that can be manipulated individually. I've rewired the plugin to use these but had to scrap the instruments from Tubular Bells and below to pull it off because Mallets have been created to use Control Change messages which aren't implemented for the individual voices. Tubular Bells can be reimplemented like I did in an earlier attempt. The ones below Tubular Bells, Uniform Bar to Tibetan Bowl, should in my opinion be recognized as the abominations they are and be removed.
TODO:
- [ ] Replace rand()
- [ ] Remove the per preset volume modifier (m_scalers)
- [ ] Automating frequency (or the Fixed/Relative switch) leads to unpleasant results, noise and floating point errors, at fast frequencies. Setting the frequency models lowest relative values to non zero doesn't help to relieve this. A steep high pass filter first in the effect chain relieves this. They should probably be nonzero non the less. The frequency setting should perhaps be interpolated before calling stk.
- [ ] Move the original presets to the lmms preset system
- [ ] Rand:
- [ ] The rand function nudges the values of hardness and position to give a bit of a 'feel' to the sound. The value could be represented on the knob as a semicircle outside of the present value, showing the values covered with rand included.
- [ ] Hardness, Position and Rand should be on the same line.
- [ ] Proper artwork
- [ ] Coding conventions
Test project: testmallets.mmp.zip
Edit: This is a proof of concept. Please test the functionality of these changes. I haven't been to particular about coding conventions and artwork. Also, the variables for the separate resonators should perhaps be arrays like in 3osc.
:robot: Hey, I'm @LmmsBot from github.com/lmms/bot and I made downloads for this pull request, click me to make them magically appear! :tophat:
Windows
- Windows 32-bit:
lmms-1.3.0-alpha.1.243+ga636e3e38-mingw-win32.exe(build link) - Windows 64-bit:
lmms-1.3.0-alpha.1.243+ga636e3e38-mingw-win64.exe(build link) - Windows 32-bit:
lmms-1.3.0-alpha-msvc2017-win32.exe(build link) - Windows 64-bit:
lmms-1.3.0-alpha-msvc2017-win64.exe(build link)
Linux
- Linux (AppImage):
lmms-1.3.0-alpha.1.243+ga636e3e38-linux-x86_64.AppImage(build link)
macOS
:robot:
{"platform_name_to_artifacts": {"Windows": [{"artifact": {"title": {"title": "32-bit", "platform_name": "Windows"}, "link": {"link": "https://output.circle-artifacts.com/output/job/56c4613e-670b-47f0-ac78-fcbc119feb76/artifacts/0/lmms-1.3.0-alpha.1.243+ga636e3e38-mingw-win32.exe"}}, "build_link": "https://circleci.com/gh/LMMS/lmms/17828?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link"}, {"artifact": {"title": {"title": "64-bit", "platform_name": "Windows"}, "link": {"link": "https://output.circle-artifacts.com/output/job/7ae8200b-ad37-41cf-b4ea-d90779698ee3/artifacts/0/lmms-1.3.0-alpha.1.243+ga636e3e38-mingw-win64.exe"}}, "build_link": "https://circleci.com/gh/LMMS/lmms/17829?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link"}, {"artifact": {"title": {"title": "32-bit", "platform_name": "Windows"}, "link": {"link": "https://ci.appveyor.com/api/buildjobs/yv7k2cxx9xid0w3r/artifacts/build/lmms-1.3.0-alpha-msvc2017-win32.exe"}}, "build_link": "https://ci.appveyor.com/project/Lukas-W/lmms/builds/44306093"}, {"artifact": {"title": {"title": "64-bit", "platform_name": "Windows"}, "link": {"link": "https://ci.appveyor.com/api/buildjobs/2fuib8j4af64pxv6/artifacts/build/lmms-1.3.0-alpha-msvc2017-win64.exe"}}, "build_link": "https://ci.appveyor.com/project/Lukas-W/lmms/builds/44306093"}], "Linux": [{"artifact": {"title": {"title": "(AppImage)", "platform_name": "Linux"}, "link": {"link": "https://output.circle-artifacts.com/output/job/177e13ef-bb67-4504-a017-00aa7baa1c28/artifacts/0/lmms-1.3.0-alpha.1.243+ga636e3e38-linux-x86_64.AppImage"}}, "build_link": "https://circleci.com/gh/LMMS/lmms/17827?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link"}], "macOS": [{"artifact": {"title": {"title": "", "platform_name": "macOS"}, "link": {"link": "https://output.circle-artifacts.com/output/job/c2890238-5bcf-453d-ac0c-8340e43d5483/artifacts/0/lmms-1.3.0-alpha.1.243+ga636e3e38-mac10.14.dmg"}}, "build_link": "https://circleci.com/gh/LMMS/lmms/17830?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link"}]}, "commit_sha": "e7d38fba6b9c3395de59b9975a7a6690e5f7b37d"}
PS. This PR includes some tests I did which affects backward compatibility and some should probably be reverted but for a test of basic functionality of accessing the individual resonators this PR should work well. No artwork, just a black background at this point. Also included is the random function from PR #6466.
Found some issues. The resonances doesn't cover the full range and the position and hardness knobs seem to be acting up.
Fixed!
The preset system should probably be changed. You start with a sound, tweak it, and now the name and volume scaler will stick with the new sound for ever and ever. Not a good solution. It should probably be saved as lmms presets. The original presets need to be there though for backward compatibility and for easier sound tweaking.
I loved this one but it's a bit too hard to achieve through stk. At least via ModalBar. Closing for now.