lmms icon indicating copy to clipboard operation
lmms copied to clipboard

Global Groove Quantization

Open tresf opened this issue 6 years ago • 14 comments

groove misc

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 TODOs and FIXMEs 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 a Knob 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.

tresf avatar Mar 09 '18 16:03 tresf

I'm going to do some refactoring to reduce code duplication. @Sawuare Is it fine for you to push my work once done?

PhysSong avatar Mar 15 '18 01:03 PhysSong

@PhysSong Absolutely. :)

Sawuare avatar Mar 15 '18 11:03 Sawuare

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?

Sawuare avatar Mar 31 '18 10:03 Sawuare

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.

PhysSong avatar Mar 31 '18 11:03 PhysSong

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.

PhysSong avatar Apr 27 '18 01:04 PhysSong

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>

Sawuare avatar May 25 '18 11:05 Sawuare

So, how's progress on this feature?

Astavie avatar Aug 19 '19 11:08 Astavie

@Sawuare Do you want to work on this more, or should I?

PhysSong avatar Nov 07 '19 05:11 PhysSong

@PhysSong I think it would be best to refactor the code first, so you go ahead.

Sawuare avatar Nov 07 '19 05:11 Sawuare

: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

Windows

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"}

LmmsBot avatar Nov 19 '19 06:11 LmmsBot

@Sawuare Please feel free to add commits before I do, I need some time to design classes and the hierachy.

PhysSong avatar Nov 21 '19 01:11 PhysSong

Hi guys Is this still work in progress, or should I abandon all hope? :)

Gps2010 avatar Mar 05 '24 17:03 Gps2010