-
Notifications
You must be signed in to change notification settings - Fork 49
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 more than one MIDI In/Out #297
Open
s0600204
wants to merge
28
commits into
FrancescoCeruti:develop
Choose a base branch
from
s0600204:multi-midi
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Background only: the UI hasn't been altered yet
To permit eventual retention of patching within cues (instead of using {n}th device, which may change between file loads)
Whilst it gets populated, and the UI reacts to user input, changes made are not saved.
Which emits whenever any input patch receives a new message. This allows listeners to receive from all patched inputs easily, rather than having to connect to them all individually. (And have to track when new patches are added and handle when patches they're listening are removed.)
Sven if it doesn't match an available device
This is a bit of an odd solution, as whilst LiSP's configuration code detects whether a config (sub)key has been added or had its associated value changed, it doesn't pick up on key deletions. Thus, we null the stored device name, and just treat any device patches with a null'd name as if it doesn't exist. Another odd quirk with LiSP's Signal class in that it doesn't like to be connected to a slot belonging to a Qt5 widget, due to not being able to see the slot's method signature. Hopefully the use of PyQt5's pyqtSignal class instead doesn't cause any problems.
In the case that no patches are defined in `inputDevices` and `inputDevice` doesn't exist in the config, don't create a default input patch. Ditto for outputs.
1) So we don't throw an error about connecting to a non-existent port whilst, 2) If it becomes available later, it should connect automagically (assuming rtmidi and ALSA backends)
Really need a wider Preferences UI!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds the ability to connect to more than one MIDI input and output at a time, allowing for listening to messages coming from more than one Interface or Port, and different MIDI cues sending messages to different locations.
Currently, there is a limit of 16 inputs and 16 outputs, but this could be raised or removed (although there's probably a maximum number that ALSA or Jack can handle).
The interface to define MIDI inputs and outputs now looks like:
With it now possible to select which of the predefined outputs is to be used for a MIDI cue:
And which of the predefined inputs should be listened to for Cue and Layout Controls:
(The Preferences dialog could probably do with being a little wider, but that's out of scope for this PR.)