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

PianoKeyboard Remapping #2505

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

Conversation

feedbackex
Copy link

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

@tresf
Copy link
Member

tresf commented Jan 8, 2016

@feedbackex what will it take to add Apple support?

@feedbackex
Copy link
Author

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

@feedbackex
Copy link
Author

But now apple work in classic mode whether combobox selection.

@tresf
Copy link
Member

tresf commented Jan 8, 2016

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

@feedbackex
Copy link
Author

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 added a commit to feedbackex/lmms that referenced this pull request Jan 8, 2016
@feedbackex
Copy link
Author

I have filled getAppleKey function and add apple support.

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

feedbackex added a commit to feedbackex/lmms that referenced this pull request Jan 8, 2016
feedbackex added a commit to feedbackex/lmms that referenced this pull request Jan 8, 2016
@@ -157,6 +157,8 @@ protected slots:
void updatePosition(const MidiTime & t );
void updatePositionAccompany(const MidiTime & t );

void octaveChanged();
Copy link
Member

Choose a reason for hiding this comment

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

Indentation here is inconsistent with the rest of this file.

@tresf
Copy link
Member

tresf commented Jan 18, 2016

@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.

feedbackex added a commit to feedbackex/lmms that referenced this pull request Jan 21, 2016
@feedbackex feedbackex force-pushed the piano-keybaord-mapping branch from 6ae6371 to ded39c7 Compare January 21, 2016 08:31
@feedbackex
Copy link
Author

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 ?

@tresf
Copy link
Member

tresf commented Jan 21, 2016

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.

@BaraMGB
Copy link
Contributor

BaraMGB commented Jan 24, 2016

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?

@grejppi
Copy link
Contributor

grejppi commented Jan 24, 2016

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?

@@ -3872,6 +3908,8 @@ void PianoRoll::updateSemiToneMarkerMenu()

emit semiToneMarkerMenuScaleSetEnabled( ! scale.isEmpty() );
emit semiToneMarkerMenuChordSetEnabled( ! chord.isEmpty() );

PianoKeyboard::setScaleType( m_scaleModel.currentText() );
Copy link
Contributor

Choose a reason for hiding this comment

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

Ouch! currentText() is not reliable because translations will break it. Use value() instead.

@BaraMGB:

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?

@feedbackex
Copy link
Author

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 ?

@PhysSong
Copy link
Member

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 PhysSong marked this pull request as draft January 31, 2022 02:37
@FyiurAmron
Copy link
Contributor

FyiurAmron commented Jul 9, 2024

@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?

@Rossmaxx
Copy link
Contributor

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

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.

8 participants