Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatic adding and linking of mixer strips to tracks #6407

Draft
wants to merge 25 commits into
base: master
Choose a base branch
from

Conversation

spechtstatt
Copy link
Contributor

@spechtstatt spechtstatt commented May 15, 2022

A very first draft of an automatic mixer strip management as proposed by @unfa in #1215 which allows an automatic linking of tracks to fx mixer strips.

  • automatic adding and linking mixer strip if adding an instrument
  • linking existing mixer strips to existing tracks

See "Task List" below for the current state and existing bugs.

MixerAutoLinkTrackFeature_03c

Related Issues/PRs:

@spechtstatt spechtstatt force-pushed the feature/auto-fx-mixer branch from 3b015f6 to 199deb3 Compare May 20, 2022 18:21
@spechtstatt
Copy link
Contributor Author

spechtstatt commented May 20, 2022

Task list

  • rebase
  • make buildable again
  • refactor naming
  • Bug fix some issues with track naming and track delete
  • Bug Setting an fx mixer colour before linking makes the FX mixer's colour permanent unless the track's colour is changed (not reset, changed).
  • Make sorting work - there should be a manual and an automatic possibility
  • Bug Moving of channels may be broken / strange
    • this was mainly because of missing text color updates and a false index check
  • test patterneditor handling
  • possibility for pattern editor options:
    • separate line as for song tracks
    • do nothing
    • assign all new to the first track in pattern editor (this way it can be better controlled than using the last track)
  • button for enabling/disabling the functionality in the mixer - using a global config switch (functionality is available, layout and image needs to be changed though)
  • Provide linking possibilities from track
    (but limit it to new fx lines for now)
  • make text/color changes work also from the mixer line side
  • add a batch function for adding tracks with master line to their own linked line
  • Bug all the settings are kept if disabled but when enabling the link settings have to be checked again
  • Auto link context menu entry should be hidden if the mode is completely disabled
  • Provide two-way linking - style changes can be done either from the fx channel or the track
  • Prepare additional settings
  • fix button layout

Possible options structure

  • Link
    • Name and color
    • Color only
  • Sort
    • Linked channels -> pattern editor
    • Pattern editor -> linked channels
    • Automatic (switchable)
  • Pattern editor
    • Separate channel
    • Use first track channel
    • Disabled

@LmmsBot
Copy link

LmmsBot commented May 20, 2022

🤖 Hey, I'm @LmmsBot from github.com/lmms/bot and I made downloads for this pull request, click me to make them magically appear! 🎩

Windows

Linux

macOS

🤖
{"platform_name_to_artifacts": {"Windows": [{"artifact": {"title": {"title": "32-bit", "platform_name": "Windows"}, "link": {"link": "https://output.circle-artifacts.com/output/job/eb797dfa-6c97-4993-ba49-6c21a6bdcf27/artifacts/0/lmms-1.3.0-alpha.1.240+g3bff810fc-mingw-win32.exe"}}, "build_link": "https://circleci.com/gh/LMMS/lmms/17805?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/7086d0cf-d1b0-4a5a-a163-05f9deddca4a/artifacts/0/lmms-1.3.0-alpha.1.240+g3bff810fc-mingw-win64.exe"}}, "build_link": "https://circleci.com/gh/LMMS/lmms/17804?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/vdfrq538awt7lvdk/artifacts/build/lmms-1.3.0-alpha-msvc2017-win32.exe"}}, "build_link": "https://ci.appveyor.com/project/Lukas-W/lmms/builds/44193685"}, {"artifact": {"title": {"title": "64-bit", "platform_name": "Windows"}, "link": {"link": "https://ci.appveyor.com/api/buildjobs/9knplb9j6fl9eftu/artifacts/build/lmms-1.3.0-alpha-msvc2017-win64.exe"}}, "build_link": "https://ci.appveyor.com/project/Lukas-W/lmms/builds/44193685"}], "Linux": [{"artifact": {"title": {"title": "(AppImage)", "platform_name": "Linux"}, "link": {"link": "https://output.circle-artifacts.com/output/job/207364ec-6281-4f9f-80e4-a55a5803e9ca/artifacts/0/lmms-1.3.0-alpha.1.240+g3bff810fc-linux-x86_64.AppImage"}}, "build_link": "https://circleci.com/gh/LMMS/lmms/17801?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/55737401-b513-4337-99cb-aae4b855fa05/artifacts/0/lmms-1.3.0-alpha.1.240+g3bff810fc-mac10.14.dmg"}}, "build_link": "https://circleci.com/gh/LMMS/lmms/17802?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link"}]}, "commit_sha": "477a4337f4dd0f45fc611a5dd53119e3506ca034"}

@spechtstatt
Copy link
Contributor Author

spechtstatt commented May 21, 2022

It would also be possible in the course of this PR to provide some additional information directly inside the mixer as it is proposed by #1214 because this PR is collecting this information anyway.

Like e.g.

  • count of connections to the mixer channel or
  • information about the area (pattern vs. song).

Auto linked channels are currently identified by changing the text color to green.

Copy link
Contributor

@sakertooth sakertooth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few changes and a quick review from me. I had some questions as to what certain lines were doing, especially the (void) track and (void) channel ones.

src/core/Mixer.cpp Outdated Show resolved Hide resolved
src/core/Mixer.cpp Outdated Show resolved Hide resolved
src/core/Mixer.cpp Outdated Show resolved Hide resolved
src/gui/MixerView.cpp Outdated Show resolved Hide resolved
src/gui/MixerView.cpp Outdated Show resolved Hide resolved
src/gui/MixerView.cpp Outdated Show resolved Hide resolved
src/core/Mixer.cpp Outdated Show resolved Hide resolved
src/gui/MixerView.cpp Outdated Show resolved Hide resolved
src/gui/widgets/MixerLine.cpp Outdated Show resolved Hide resolved
src/gui/widgets/MixerLine.cpp Outdated Show resolved Hide resolved
src/gui/MixerView.cpp Outdated Show resolved Hide resolved
@spechtstatt spechtstatt changed the title Automatic FX-mixer strip management #1215 Automatic mixer strip management #1215 May 21, 2022
@Monospace-V
Copy link
Contributor

Monospace-V commented May 22, 2022

I noticed a few things, could you clarify these?

  • Setting an fx mixer colour before linking makes the FX mixer's colour permanent unless the track's colour is changed (not reset, changed). This is a bug.
  • Could we get a direct "Assign and link to new Mixer channel" option, so we don't have to do it twice? It seems useful. Also an "Link to Mixer channel" in the context menu of track itself?
  • After linking, colours are linked but can be edited only from the track's context menu. However, some of us color-code multiple channels consecutively in the mixer itself based on the instrument type, and it could get annoying having to search. Can this be made two-way, being able to change colour from the mixer too? Similar thing with mixer channel name- being able to edit it through mixer too.
  • I understand this PR's scope is limited to addition of the option and linking of colour and names, right?
  • Upon right click on a Mixer channel, the "Move left/right" seems to be broken. I can still move them with Alt-left/Alt-right, but this behaviour acts strange (exchanging of Mixer channel names?, not entirely clear what's happening). There are a lot of weird issues, this isn;t difficult to reproduce. Also experiment with move left/right after adding a new instrument while auto-track-link is on. This is a bug.

Thanks!

@spechtstatt
Copy link
Contributor Author

spechtstatt commented May 22, 2022

I noticed a few things, could you clarify these?

Yes, of course - thank you for your thoughts and remarks.

  • Setting an fx mixer colour before linking makes the FX mixer's colour permanent unless the track's colour is changed (not reset, changed). This is a bug.

I will look into this - I have added your point to my task list above

  • Could we get a direct "Assign and link to new Mixer channel" option, so we don't have to do it twice? It seems useful. Also an "Link to Mixer channel" in the context menu of track itself?

I think this is a good idea - we should only consider that it may not be used very often because of the automatic adding and assigning of mixer channels - so maybe it is enough to provide only the second option?

  • After linking, colours are linked but can be edited only from the track's context menu. However, some of us color-code multiple channels consecutively in the mixer itself based on the instrument type, and it could get annoying having to search. Can this be made two-way, being able to change colour from the mixer too? Similar thing with mixer channel name- being able to edit it through mixer too.

I was somehow focused on the idea that the track should control the mixer line (@unfa's original suggestion was to disable the auto link if the mixer name changes) but because it is in fact a management of a 1:1 relationship there is no real reason to not enable this from both sides - so, yes I think this is also a good idea.

  • I understand this PR's scope is limited to addition of the option and linking of colour and names, right?

Principally yes (beside sorting according to the track list) - I was just thinking to display some information on the mixer lines because it is collected anyway (as I mentiond above) - like if the line is used at all, how many tracks are linked or if this is linked to a pattern or a song track.

  • Upon right click on a Mixer channel, the "Move left/right" seems to be broken. I can still move them with Alt-left/Alt-right, but this behaviour acts strange (exchanging of Mixer channel names?, not entirely clear what's happening). There are a lot of weird issues, this isn;t difficult to reproduce. Also experiment with move left/right after adding a new instrument while auto-track-link is on. This is a bug.

I have the whole sorting issue not really finished yet and just prepared the lock of the move operations and concentrated on the auto link updating. So it is very plausible that there are still flaws but thank you for giving me more detailed feedback about this.

Thanks!

@spechtstatt
Copy link
Contributor Author

spechtstatt commented May 26, 2022

I was thinking that with this functionality enabled it maybe makes sense to always auto link channels by default when assigning them and if they are free.

Because the link would anyway automatically removed if more than one gets assigned. And it could automatically link again if there would be only one instrument left.

And it would use the track text/color by default because it is initiated from there.

@allejok96
Copy link
Contributor

Tested and worked good.

Makes sense to link by default when an FX is created via the menu. Currently LMMS copies the name. That's halfway there :)

Don't do this for assignment to empty FX from the menu, because you might have a template with a "sidechain" FX and you start by assigning one instrument and it does this linking thing and changes the name and color and you be like hey what's going on how do I rename it back instead of just ignoring it and continuing to assign like you should.

Likewise I'm skeptical to auto re-link an FX when it becomes only one instrument again, because deleting that instrument may delete the FX without the user realizing it, and effects and stuff may get lost.

Suggestion on toggle button for auto-creating mixer channels for new tracks:
bild

If there will be more than one option, we could go for a cogwheel button with a menu instead, like on tracks.

Agreeing with Monospace that it would be nice if the ability to set color went both ways. I'd actually like it if you could change the color of an FX channel and it would color multiple tracks in the song editor. But that may be out of context.

It doesn't feel that important to be able to change name of linked channels from the mixer tho.

Marking options grey in the context menu instead of just leaving them out feels better. I know there are lots of things left to be polished. Just mentioning it.

@spechtstatt
Copy link
Contributor Author

@allejok96: also thought about multiple tracks linked to a fx line but I found not really a good solution for it regarding the naming.

But maybe it is a solution to link only the color as you suggested.

If there would be a good way to bring both approaches together - of course it could behave different depending on the count of linked tracks (1 = link name & color, n= link only color) but I am not sure if this is a good idea especially if the count changes only temporary during reorganizing.

Regarding multiple options I would probably add a sort button there because I think it is better to have it not in an automatic fashion. And also an options button where you can set up e.g. if and how the pattern editor should be auto linked and which sorting should be applied when pressing the sort button.

If the sorting is manual I will add the move menu entries again and yes you are absolutely right: it is normally better to grey them out instead of hiding them (don't know why I did it this way 😵)

@spechtstatt spechtstatt changed the title Automatic mixer strip management #1215 Automatic sync of track and mixer styles Jun 11, 2022
@spechtstatt spechtstatt changed the title Automatic sync of track and mixer styles Automatic adding and linking of mixer strips to tracks Jun 13, 2022
@spechtstatt spechtstatt force-pushed the feature/auto-fx-mixer branch from 3a6c15c to 888d4e0 Compare June 23, 2022 18:49
@spechtstatt spechtstatt force-pushed the feature/auto-fx-mixer branch from 804dded to b6e6e7a Compare July 16, 2022 10:22
@spechtstatt
Copy link
Contributor Author

Because I got the impression that there are different needs regarding the auto linking it is now possible to define different settings like:

  • linking one track to one channel vs. linking multiple tracks to one channel
  • linking name and color vs linking only the color
  • enable the automatic deletion of auto linked channels if there is no track assigned vs. disabling the automatic deletion of auto linked channels
  • add channels automatically for the pattern editor like the song editor vs. assigning always the first channel of the pattern editor to all subsequent added pattern tracks (if you want to use only one mixer channel for the pattern editor)
  • enable and disable the automatic sorting and also if the song tracks should ordered first or the pattern editor tracks.

I am not sure if this is the right approach or if it would be better to define two or three named sets of settings which correspond to different ways of working - but maybe this is unrealistic.

Another way would be to reduce the options and split them - e.g. while the sorting currently considers only auto track linked tracks it could be extracted by allowing sorting of all (normal and linked) assigned tracks. (If there are multiple assigned tracks the last would determine the sort order).

But anyway: with the settings it should now be possible to play around with the various approaches.

@spechtstatt
Copy link
Contributor Author

Still some issues with the pattern editor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants