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

Support note filtering inside MIDI input instrument settings #6210

Closed
spechtstatt opened this issue Nov 5, 2021 · 27 comments
Closed

Support note filtering inside MIDI input instrument settings #6210

spechtstatt opened this issue Nov 5, 2021 · 27 comments

Comments

@spechtstatt
Copy link
Contributor

spechtstatt commented Nov 5, 2021

Currently the MIDI input dialog does only allow to set a MIDI channel (and specify a velocity). Especially for Drum Pads it would be helpful to define also a specific note. The only workaround I know currently is using different MIDI channels (and of course using a soundfont instead) - but this is suboptimal.

Additionally it would be nice to have also an Auto Detect feature as it is available in the controller MIDI connection setup.

The UI would look as follows (as I have it already implemented based on the state of the current master):

image

And because some people may want to assign a note range which would allow e.g. the splitting of a keyboard, the UI switches to this view:

image

Just let me know if this makes generally sense and that this is not a kind of duplicate of an existing functionality or plan - I would then try to go down the required clone-pull request route.

@allejok96
Copy link
Contributor

See #2185

@spechtstatt
Copy link
Contributor Author

spechtstatt commented Nov 5, 2021

Found in the moment you posted :-)

But as far as I see: it was never implemented, or?

Correct myself: it was - but not integrated yet.

Nevermind: I looked at the #2185 implementation and maybe my solution is slightly more advanced because of the auto detection support. I also tried to make the single note use case the default because I regarded this more likely to be used e.g. for the drum pattern editor (or drum sample tracks in general).

Any thoughts on this?

@allejok96
Copy link
Contributor

Will this work when playing notes with the keyboard and placing them with the mouse? Or is it MIDI input only?

@spechtstatt
Copy link
Contributor Author

MIDI Input only - MidiPort.cpp

@spechtstatt
Copy link
Contributor Author

(Computer) keyboard support would be interesting though - I have played around with an android midi controller / drum pad application but a keyboard would be a nice low level poor man's or woman's drum pad :-)

@allejok96
Copy link
Contributor

I think LMMS needs this feature, but the way it is implemented here feels more like a hack. First of all it should work for all input methods, not rely on MIDI. Second, the setup process is a bit sketchy (even with auto detect).

On the other hand, the perfect solution may never come, so maybe we should just settle for this for the moment?

@spechtstatt
Copy link
Contributor Author

spechtstatt commented Nov 5, 2021

OK - I see - keyboard input is separately handled inside handleKeyPress of Piano.cpp.

Not sure - but what I can try is to add a public method inside the MdiPort model to either provide the logic (Solution 1) or - alternatively - call the whole logic including the m_midiEventProcessor of MdiPort and do not use m_midiEvProc inside Piano.cpp at all (Solution 2).

But I don't know if (2) is a good idea (I mean it looks a little bit cleaner to me because the instrument track has anyway the MdiPort reference) - but it may be that m_midiEvProc inside Piano.cpp needs to be used.

@spechtstatt
Copy link
Contributor Author

(And by the way: can it be that the init/reset value stuff in the context menu of the LcdSpinBox is somehow not working as expected? It seems to show always the current value for the reset entry)

@spechtstatt
Copy link
Contributor Author

Some related forum topics:

"live playing with pc keyboard"

https://lmms.io/forum/viewtopic.php?t=27428

"Mapping Drum pads"

https://lmms.io/forum/viewtopic.php?t=4760

@RiedleroD
Copy link
Contributor

RiedleroD commented Nov 6, 2021

Regarding the keyboard input: would it be beneficial if there would be a popup window where you could map certain keys to certain midi channels + maybe some control keys to switch between mappings and perhaps octaves as well? I feel like this should be discussed in a separate PR/issue though.

@sdasda7777
Copy link

Regarding the keyboard input: would it be beneficial if there would be a popup window where you could map certain keys to certain midi channels + maybe some control keys to switch between mappings and perhaps octaves as well? I feel like this should be discussed in a separate PR/issue though.

I believe this was discussed on Discord some time ago, but it didn't really seem like there was that much interest for it. There are, however, standalone utilities that can do stuff like that.

@spechtstatt
Copy link
Contributor Author

I think also that it would be nice to have some sort of common overview about the mappings and be able to edit them all together. I don't know other commercial DAWs but I saw that they provide e.g. a drum rack (maybe someone with more knowledge could give some hints/links on how other DAWs handle this?).

But this is my first C++ (nearly), Qt, Linux development - so maybe I will be able to add such extended UI functionality if I have improved my skill level but this will take some time.

In the meantime the missing possibility of applying such a note mapping at all (in a more or less easy way) is a more serious drawback in my view.

The use case I would see with this solution is that one could prepare the tracks inside the BB Editor name them "Kick", "HiHat" and so on, assign e.g. channel 10 and the note and then just exchange the samples inside the instrument detail view directly without the need to repeat the assignment.

I could also imagine that it may then be helpful to somehow save and load a whole BB "setup" (which may be anyway more or less the "drum rack" of the commercial DAWs). Similar to the existing preset mechanism. I have not looked at it but maybe it would not be that difficult (famous last words maybe :-)) because it would be more or less the loading/saving of a preset "list".

What I also don't know is the current state of future plans regarding a new single window UI, the BB Editor itself and the larger refactoring state/progress. So my question would also be if it is a good moment to do some deeper UI changes at all?

@qnebra
Copy link

qnebra commented Nov 6, 2021

I think turning current "B&B Editor" into sort of multisampler drum machine thing would be really nice. My thinking is that, for example, in 'track name' area there is dropdown menu with "Trigger Note" section, in which we select which note on midi controller plays it.

B&B Track - like current BB track in Song Editor - here it will be assigned midi controller to entire BB track
|
| - instruments, samples, synths inside B&B track - like current B&B, with grid and all of those stuff - but with trigger note which plays by default A4 note

@allejok96
Copy link
Contributor

My understanding of things:

  1. Focus is on the refactor right now. Shouldn't be a problem for you, but you may have to fix some merge conflicts later whenever some dev gets time to test your code.
  2. The BB editor as is a trainwreck. It should probably be completely reworked or merged into song editor. Don't place your effort there.
  3. If you can make a UI for this feature - great! A complete UI resesign is probably years away. We must first decouple Qt from the core to be able to switch UI later. Though UI design in Qt can be a bit tedious, probably why nobody is doing this.

@spechtstatt
Copy link
Contributor Author

ok - I will try to find a way to include the keyboard and the mouse input of the piano roll into the filtering/auto detection as you (@allejok96) have suggested (Maybe also visualizing the valid/invalid keys somehow in the piano roll? Could also be helpful).

BB editor is nice when you start as a beginner - but if you try to apply some manual swing the automatic note/beat pattern matching gets lost and you end up either opening the piano roll directly or do it as a normal track skipping the BB Editor. If there would be a swing setting possibility without "destroying" the pattern view it may be a different story - but I am far from being a sophisticated musician or in any way an expert on music production.

But anyway: I will clone, apply to the branch whatever solution I am able to achieve and wait for some feedback.

@spechtstatt
Copy link
Contributor Author

spechtstatt commented Nov 6, 2021

For the BB Editor/Swing discussions: #2636, #1091

And there seems to be already an implemented groove/swing functionality: #4232

@allejok96
Copy link
Contributor

Sorry I didn't realize this earlier but this feature does already exist. It was just added in #5868. You can select a note range at the top of the piano in the instrument window. So the backend stuff is in place. All we need is a more user friendly way to apply this to a bunch of tracks, giving each track a note range of a single note (and pair them to the same midi input).

@spechtstatt
Copy link
Contributor Author

No problem - well that's both great and sad for me :-)

I remember I was reading through the issue but it was not clear for me that it would be usable this way.

@spechtstatt
Copy link
Contributor Author

If you say "select a note range" you don't mean interactively, do you?

@spechtstatt
Copy link
Contributor Author

spechtstatt commented Nov 6, 2021

now I found it - can be modified by the microtuner settings dialog - it is really basically the needed functionality:

image

@allejok96
Copy link
Contributor

Scroll all the way to the end of the piano, there you have an arrow (when microtuner is turned off)

@spechtstatt
Copy link
Contributor Author

spechtstatt commented Nov 6, 2021

ah yes - thank you - somehow logical but not easy to find if you are not aware of it - but a really nice visual representation.

image

Maybe there is just some kind of label missing which indicates the available range?

One possible improvement I can think of is using a double click (or something similar) to select just a single note range.

I have not really an idea how to achieve a mass assignment for multiple tracks because (as far as I am aware of) there is no possibility to select multiple tracks to apply a single operation on them - of course for the BB Editor it would be different, because I could imagine to just apply this to all tracks there.

@spechtstatt
Copy link
Contributor Author

By the way @RiedleroD: I am not sure, but I think what you were mentioning is provided by the Microtuner functionality (including the scala file support).

@spechtstatt
Copy link
Contributor Author

I think there are in fact two different issues.

First one is that the keyboard range setting may not be obvious enough.

Second one is how key (range) assignments could be managed in a more convenient way.

I have an idea for the first one but I think I will open a separate issue for this and link it here.

@spechtstatt
Copy link
Contributor Author

Nevertheless I will close the issue because key filtering is already possible.

@pauloricca
Copy link

now I found it - can be modified by the microtuner settings dialog - it is really basically the needed functionality:

image

ah yes - thank you - somehow logical but not easy to find if you are not aware of it - but a really nice visual representation.

image

Maybe there is just some kind of label missing which indicates the available range?

One possible improvement I can think of is using a double click (or something similar) to select just a single note range.

I have not really an idea how to achieve a mass assignment for multiple tracks because (as far as I am aware of) there is no possibility to select multiple tracks to apply a single operation on them - of course for the BB Editor it would be different, because I could imagine to just apply this to all tracks there.

Hey everyone, I can't fint this note limiting, is this something that's on the current release? How do we get to it?

@zonkmachine
Copy link
Member

Hey everyone, I can't fint this note limiting, is this something that's on the current release? How do we get to it?

It's on the master (development) branch.
Menu -> View -> Microtuner or <Ctrl> + 8

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

No branches or pull requests

7 participants