lmms icon indicating copy to clipboard operation
lmms copied to clipboard

PianoKeyboard Remapping

Open feedbackex opened this issue 9 years ago • 15 comments

PC Keyboard Mapping according to music theory.

  • There is 2 mode: 1) Classic Old Mode 2) New Mode
  • Default is Old Mode
  • Switch method: Scale Combo box; if No scale mode was selected Classic Mode else New Mode.

  • Two new PianoRoll combobox to select octave and scaling note.
  • Currently Supported Scale Modes: Major, Minor, Lydian
  • Easily extendable for scale modes with just adding scaleNote array and one else if statement in getScaledNoteByIndex function.
  • Windows, Linux and OS X supported.

c 5 major scale g 7 minor scale a 6 minor scale

feedbackex avatar Jan 08 '16 01:01 feedbackex

@feedbackex what will it take to add Apple support?

tresf avatar Jan 08 '16 16:01 tresf

Just will fill PianoKeyboard::getAppleKey(int key) function and will remove comments from //if (PianoKeyboard::isThereScale()) //return PianoKeyboard::getAppleKey(k); from PianoView::getKeyFromKeyEvent

feedbackex avatar Jan 08 '16 18:01 feedbackex

But now apple work in classic mode whether combobox selection.

feedbackex avatar Jan 08 '16 18:01 feedbackex

@feedbackex do you need help with determining this code? We'd prefer it to be included with the feature.

tresf avatar Jan 08 '16 18:01 tresf

I guess, It's too hard to reduce math formule like Linux or Windows. So that I must write case for each key. It is needed only time. I hope, I will write it whenever I have time today.

feedbackex avatar Jan 08 '16 19:01 feedbackex

I have filled getAppleKey function and add apple support.

Note: I don't have Mac so I can not check it.

feedbackex avatar Jan 08 '16 21:01 feedbackex

@feedbackex Thanks kindly for the Apple additions. If we cannot get sufficient testing for Apple, we can merge as-is and patch if problems occur.

I've noted a few minor formatting issues. Once they are done, I would like you to squash your commits and then we will be ready for a merge.

Project maintainers (you know who you are)... I'd like a bit of feedback about merging this prior to 1.2 or not.

tresf avatar Jan 18 '16 03:01 tresf

Hi @tresf , I have fixed formatting issue and squash to one commit.

I don't understand last line your comment; Project maintainers (you know who you are)... I'd like a bit of feedback about merging this prior to 1.2 or not.

What did you mean, exactly ?

feedbackex avatar Jan 21 '16 08:01 feedbackex

I have fixed formatting issue and squash to one commit.

Thanks, top notch.

What did you mean, exactly ?

This means I would like feedback from other C++ developers that help manage the codebase prior to merging.

tresf avatar Jan 21 '16 14:01 tresf

I selected scale: DUR. But all keys play note C. In different Rows different Cs (C3,C4,C5) but only C. If I choose an other note only this note will be played. Perhaps I have done something wrong?

BaraMGB avatar Jan 24 '16 13:01 BaraMGB

I had some time today so I tried this out for a bit.

First impressions: this is inspiring! Being able to press random keys on the keyboard without worrying about clashing notes feels wonderful.

So, I would say this is a welcome feature, but there's still work to be done in how it's presented to the user, and some things that affect existing features. The latter might be worth a discussion of its own, but for now, I'm writing it all here (in a very unstructured way) before I forget it all.


First of all, the boxes for the root key and octave are small and therefore kind of tricky to use. Why are there two choices for 5? I'd also expect the octave setting to affect the No scale option.

The selection of different scales is tied to the existing combo box in the piano roll. Now it has two functions with inconsistent behaviour:

  1. You select a scale, and it immediately changes the behaviour of the keyboard.
  2. You select a scale, but explicitly have to tell LMMS to mark it in the piano roll.

I'd say 1. is better for the user; less work involved to do a simple task.

Now the scale setting affects the whole project, yet it can only be edited in the piano roll. There is a lot of wasted potential in the main tool bar, maybe move it all there? Or a new specific tab for project properties in the side bar?

grejppi avatar Jan 24 '16 14:01 grejppi

Sorry for latency,

I have fixed double 'C' and '5' issues.

I have fixed translation issue.

I'd also expect the octave setting to affect the No scale option. That situation is not possible because of No scale keys is gotten with old way.

Now the scale setting affects the whole project, yet it can only be edited in the piano roll. There is a lot of wasted potential in the main tool bar, maybe move it all there? Or a new specific tab for project properties in the side bar?

To move main tool bar will be more sense, I can move it. But I need to know header and cpp files those I must to work on. Can you help me about that ?

feedbackex avatar Feb 05 '16 12:02 feedbackex

I'm not sure the OP @feedbackex is still active or not, but I think it'll be quite easy to revive this if there are demands for this feature. Any opinions?

PhysSong avatar Nov 29 '20 06:11 PhysSong

@PhysSong this (or at least part of it, the possibility to easily change the octave used for computer keyboard playing) has been requested in some places TBH, and, while switching the base note+scale is mostly a gimmick (abeit reasonably useful, as it's similar to real-life transpose function), switching the keyboard octave is IMVHO a must-have. It's one of the things I really miss in LMMS ATM. I'd say this could and should be revived and merged, especially since it's like, 80% or 90% done already?

FyiurAmron avatar Jul 09 '24 18:07 FyiurAmron

@FyiurAmron Phys too seems to have gone afk. If you would like to revive this, hit me up on discord and I'll help.

Rossmaxx avatar Jul 10 '24 04:07 Rossmaxx