lmms
lmms copied to clipboard
Global Groove Quantization
This supersedes #3296, so there may be some contextual conversations there of importance.
This is an effort coded by @teknopaul but due to merge conflicts has been taken over by @Sawuare / @PhysSong to make it into the 1.3.0 milestone.
This pull request illustrates "groove quantizing" the same "swing" feature that Hydrogen drum machine has. Currently, there is one global swing amount that affects all instruments in a song. The ability to disable groove per track would be useful.
TODO:
- [ ] Complete the
TODO
s andFIXME
s in the code. - [x] Move enable/disable groove per instrument track from the TrackOperationsWidget to the InstrumentMiscView.
- [x] Move groove near tempo and time signature controls.
- [x] Use an
AutomatableSlider
instead of aKnob
for changing groove amount. - [ ] Style the groove slider like the master volume and pitch sliders.
- [ ] Refactor.
- [ ] Fix coding conventions.
- [ ] Update the factory templates.
- [ ] Move groove settings out of the tuning tab
Closes #1091.
I'm going to do some refactoring to reduce code duplication. @Sawuare Is it fine for you to push my work once done?
@PhysSong Absolutely. :)
The groove slider code is duplicated in these 3 groove types: Hydrogen swing, Half swing, and Groove experiments. I tried to refactor the code into Groove view to make the groove types mentioned above use the same slider (so that changing the groove type does not reset the slider), but failed. @PhysSong, are you interested in refactoring it?
I want to consolidate them, too. I'm also going to refactor whole widgets' code. And next, I'm going to look into core functions.
I think we should change class hierarchy a lot to make the code better.
GrooveView
should be the base class for views for individual grooves, not the view in the song editor. It will reduce code duplication and make it easy to manage views for grooves.
I'm going to create new classes, GrooveManager
and GrooveManagerView
. The new view will play a role which was done by GrooveView
.
I think it might be better to allow creating grooves as external plugins. To do this, I'll remove uses of hard-coded list in GrooveFactory::create
to allow adding new grooves flexibly.
If anyone have some ideas, please let me know.
I think the groove settings should be saved in dataFile.head()
, with the tempo and time sig settings.
Like this:
<head bpm="140" timesig_denominator="4" timesig_numerator="4" mastervol="100" masterpitch="0">
<groove type="hydrogen" amount="127"/>
</head>
So, how's progress on this feature?
@Sawuare Do you want to work on this more, or should I?
@PhysSong I think it would be best to refactor the code first, so you go ahead.
: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:
Linux
- Linux (AppImage):
lmms-1.3.0-alpha.1.215+g193c30f88-linux-x86_64.AppImage
(build link
)
Windows
- Windows 32-bit:
lmms-1.3.0-alpha.1.215+g193c30f88-mingw-win32.exe
(build link
) - Windows 64-bit:
lmms-1.3.0-alpha.1.215+g193c30f88-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
) - 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
)
macOS
:robot:
{"platform_name_to_artifacts": {"Linux": [{"artifact": {"title": {"title": "(AppImage)", "platform_name": "Linux"}, "link": {"link": "https://output.circle-artifacts.com/output/job/d6b42ac6-2ba6-4dc9-be34-6f00758f2cce/artifacts/0/lmms-1.3.0-alpha.1.215+g193c30f88-linux-x86_64.AppImage"}}, "build_link": "https://circleci.com/gh/LMMS/lmms/17260?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link"}], "Windows": [{"artifact": {"title": {"title": "32-bit", "platform_name": "Windows"}, "link": {"link": "https://output.circle-artifacts.com/output/job/264c4a6f-2ee8-45e6-a2f0-7710b65f2443/artifacts/0/lmms-1.3.0-alpha.1.215+g193c30f88-mingw-win32.exe"}}, "build_link": "https://circleci.com/gh/LMMS/lmms/17256?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/4872c59c-a8cd-435f-ba2e-db49d4a17672/artifacts/0/lmms-1.3.0-alpha.1.215+g193c30f88-mingw-win64.exe"}}, "build_link": "https://circleci.com/gh/LMMS/lmms/17257?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/cfsbhc89kdru5qp2/artifacts/build/lmms-1.3.0-alpha-msvc2017-win32.exe"}}, "build_link": "https://ci.appveyor.com/project/Lukas-W/lmms/builds/43900197"}, {"artifact": {"title": {"title": "64-bit", "platform_name": "Windows"}, "link": {"link": "https://ci.appveyor.com/api/buildjobs/t8tj3glwd3qw4jgy/artifacts/build/lmms-1.3.0-alpha-msvc2017-win64.exe"}}, "build_link": "https://ci.appveyor.com/project/Lukas-W/lmms/builds/43900197"}, {"artifact": {"title": {"title": "32-bit", "platform_name": "Windows"}, "link": {"link": "https://ci.appveyor.com/api/buildjobs/yv5sgni4gbarlvaa/artifacts/build/lmms-1.3.0-alpha-msvc2017-win32.exe"}}, "build_link": "https://ci.appveyor.com/project/Lukas-W/lmms/builds/43900198"}, {"artifact": {"title": {"title": "64-bit", "platform_name": "Windows"}, "link": {"link": "https://ci.appveyor.com/api/buildjobs/614xit5o0jckhvar/artifacts/build/lmms-1.3.0-alpha-msvc2017-win64.exe"}}, "build_link": "https://ci.appveyor.com/project/Lukas-W/lmms/builds/43900198"}], "macOS": [{"artifact": {"title": {"title": "", "platform_name": "macOS"}, "link": {"link": "https://output.circle-artifacts.com/output/job/5cdb317b-2331-4982-af50-604b7f3f3605/artifacts/0/lmms-1.3.0-alpha.1.215+g193c30f88-mac10.14.dmg"}}, "build_link": "https://circleci.com/gh/LMMS/lmms/17258?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link"}]}, "commit_sha": "193c30f888a1db2cad7f699eb37a00d4e416234d"}
@Sawuare Please feel free to add commits before I do, I need some time to design classes and the hierachy.
Hi guys Is this still work in progress, or should I abandon all hope? :)