Skip to content

Comments

Add MIDI control option for Mute Myself function#2334

Merged
softins merged 1 commit intojamulussoftware:masterfrom
henkdegroot:midi-mute-myself
Feb 6, 2022
Merged

Add MIDI control option for Mute Myself function#2334
softins merged 1 commit intojamulussoftware:masterfrom
henkdegroot:midi-mute-myself

Conversation

@henkdegroot
Copy link
Contributor

@henkdegroot henkdegroot commented Feb 2, 2022

Short description of changes

This change add an option to allow the Mute Myself checkbox to be controlled via MIDI. The character to use in the --ctrlmidich option for this is: o. Followed by the CC#. For instance use: o87 to enable/disable the Mute Myself using CC# 87.

Context: Fixes an issue?

New feature/option discussed in #2322

Does this change need documentation? What needs to be documented and how?

Letter o (for own) needs to be added to the --ctrlmidich option details.

Status of this Pull Request

Ready for review

What is missing until this pull request can be merged?

Tested on Windows and Linux using JACK.

Checklist

  • I've verified that this Pull Request follows the general code principles
  • I tested my code and it does what I want
  • My code follows the style guide
  • I waited some time after this Pull Request was opened and all GitHub checks completed without errors.
  • I've filled all the content above

@henkdegroot henkdegroot changed the title Add control option for Mute Myself when using midi Add MIDI control option for Mute Myself function Feb 2, 2022
@ann0see ann0see requested a review from ignotus666 February 2, 2022 21:32
@ann0see ann0see added this to the Release 3.9.0 milestone Feb 2, 2022
// in case of a headless client the buttons are not displayed so we need
// to send the controller information directly to the server
#ifdef HEADLESS
// FIXME: no idea what to do here.
Copy link
Collaborator

@pljones pljones Feb 2, 2022

Choose a reason for hiding this comment

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

Basically, follow the path.

What the emit does is handled somewhere - that method ends up back in the client code and should be what's called here.

There should really be no client.cpp code that's dependent upon the state of #ifdef HEADLESS - the client should work the same regardless.

Currently it goes to src/clientdlg.h line 150 to check the toggle the box in the dialog, which then triggers the dialog to emit the change, which the client handles.

This does ensure the UI is consistent with the client state, but it's not the right way to do it.

Copy link
Collaborator

@pljones pljones left a comment

Choose a reason for hiding this comment

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

Looks like it's consistent with the existing way of working.

I've not tested it myself (as I can't get Jack working on Windows since Windows 7 came out).

@ignotus666
Copy link
Member

I can't get this to work. Tried the .deb from @henkdegroot's repo and also compiling his branch from source. Tested on Linux Mint 20.2 with JACK. This is my command:

jamulus --ctrlmidich "0;o3;m2*8;s10*8;f30*8"

Maybe I'm doing something obvious wrong? The other commands work as normal.

@henkdegroot
Copy link
Contributor Author

Maybe I'm doing something obvious wrong?

If you took the one from my repo (autobuild), then the option might be the letter u instead of o.
The assets created in this PR should be fine. I had only tested with midi channel 1, but now repeated a test with channel set to 0 and also use the o3 (well in my case o2...due to a different CC number used) at the beginning like in your command and that still works. Are you sure the CC you are transmitting is number 3?

@ignotus666
Copy link
Member

Just to be sure - I'm testing the build from here. Still won't work :( Tried 'u', 'o', other MIDI CC values, altering the order of the ctrlmidich parameters...

I'm using MIDImonitor in parallel to make sure the right MIDI messages are sent. All the other parameters work...

@henkdegroot
Copy link
Contributor Author

I'm testing the build from here.

Okay that should be the correct one and use the letter o. I have tested with Ubuntu 20 and also on Windows 10 and Windows 11.

Now reading your command a bit more careful and I notice it cannot be correct like this.

jamulus --ctrlmidich "0;o3;m2*8;s10*8;f30*8"

As for o you are using CC # 3. However for m you start with CC # 2 (* 8), so CC # 2,3,4,5,6,7,8,9 are used for the "client mute".
Think to code handles the "client mute" first and does not care there is another assignment to the same CC value.

@ignotus666
Copy link
Member

Argh, you're absolutely right! Sorry for being such an ass :) I set the values properly so they didn't overlap and now it's working. Nice work!

Copy link
Member

@softins softins left a comment

Choose a reason for hiding this comment

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

Looks good to me, and tidily done.

@pljones
Copy link
Collaborator

pljones commented Feb 3, 2022

Just to note, this is now to wait until 3.9.0 - reminder NOT to merge :)

@softins
Copy link
Member

softins commented Feb 5, 2022

Just to note, this is now to wait until 3.9.0 - reminder NOT to merge :)

Just wondering, as we are making a few other small changes to the code, and this one is small, benign and useful to some, whether we could justify putting it in before 3.8.2rc1? It doesn't need any app translation.

@ignotus666
Copy link
Member

It would need documenting on the website though to be useful to anyone who hasn't followed this PR. I could do EN and ES, I don't know if the others (NL and FR at least) would mind doing a quick update - @jujudusud, @henkdegroot ?

@henkdegroot
Copy link
Contributor Author

Don't mind doing that minor update at all.
It is just the command line option and the tips and tricks.

@jujudusud
Copy link
Member

@ignotus666 , actually skiing the french alps. :-)
Can't do anything until february 14th.

@ignotus666
Copy link
Member

I can do this on Monday; possibly tomorrow, but can't promise anything. Shall we go ahead and let FR catch up later? Or is the release imminent already? Either way, I suppose there's no harm in letting this feature go in now.

@hoffie
Copy link
Member

hoffie commented Feb 5, 2022

I think it's ok to merge and I'm not worried about translations. As far as I understand, this is a feature extension, so the lack of translation simply means that the extension (new feature) is harder to use. But that can be fixed in a later (website translation) iteration, IMO.

CHANGELOG: Client: Added MIDI control option for Mute Myself function

@henkdegroot
Copy link
Contributor Author

According to the timelines, it should still fit when FR is done shortly after 14th of Feb:

Scheduled feature freeze / Start of translation process: 2022-01-27
Targeted translation completion date: 2022-02-06
Approximate release date: 2022-02-20
Current state: Translations (beta)

@softins softins modified the milestones: Release 3.9.0, Release 3.8.2 Feb 6, 2022
@softins softins merged commit ebb1e9f into jamulussoftware:master Feb 6, 2022
@henkdegroot henkdegroot deleted the midi-mute-myself branch February 9, 2022 11:35
softins added a commit to softins/jamulus that referenced this pull request Feb 9, 2022
@iFriendGit
Copy link

Sorry if dumb q: does it work with the non-jack windooze version?

@henkdegroot
Copy link
Contributor Author

Unfortunately not, but you can install the version with JACK support. You just need to install jack2 as well

@henkdegroot
Copy link
Contributor Author

@iFriendGit
Copy link

Thank you very much, @henkdegroot ! Very kind!

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