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

Change to InputEventMIDI event to include connection_index property #82157

Closed
wants to merge 5 commits into from

Conversation

ramdor
Copy link
Contributor

@ramdor ramdor commented Sep 22, 2023

Added connection_index to the InputEventMIDI so that each MIDI message can be associated with a specific opened MIDI device.

Added connection_index to the InputEventMIDI so that each MIDI message can be associated with a specific opened MIDI device.
@ramdor ramdor requested review from a team as code owners September 22, 2023 23:23
@Calinou Calinou added this to the 4.x milestone Sep 22, 2023
@Calinou
Copy link
Member

Calinou commented Sep 22, 2023

Does this close godotengine/godot-proposals#7733?

@ramdor
Copy link
Contributor Author

ramdor commented Sep 22, 2023

@Calinou yes. The connection index is direcly related to the count through the midi devices that are opened.

clang-format applied
Quick fix for the compile error which I wasnt able to test locally easily. Hopefully this will now pass.
drivers/alsamidi/midi_driver_alsamidi.h Outdated Show resolved Hide resolved
drivers/alsamidi/midi_driver_alsamidi.h Outdated Show resolved Hide resolved
drivers/alsamidi/midi_driver_alsamidi.cpp Outdated Show resolved Hide resolved
drivers/alsamidi/midi_driver_alsamidi.cpp Outdated Show resolved Hide resolved
core/os/midi_driver.h Outdated Show resolved Hide resolved
core/os/midi_driver.cpp Outdated Show resolved Hide resolved
core/input/input_event.h Outdated Show resolved Hide resolved
core/input/input_event.cpp Outdated Show resolved Hide resolved
@akien-mga
Copy link
Member

Shouldn't this be stored in the existing InputEvent.device property instead of adding a new parameter everywhere?

@ramdor
Copy link
Contributor Author

ramdor commented Sep 25, 2023

I can make all the changes and swap it to use InputEvent.device np, removing the need for the extra parameter and fix the documentation.

Uses InputEvent.device instead, removing the need for a new property in InputEventMIDI. Updated to snake_case.
@ramdor
Copy link
Contributor Author

ramdor commented Sep 25, 2023

thanks for the review, and for the advice on using the InputEvent device instead. I have made the tweaks and submitted the changes. Cheers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide MIDI device property in InputEventMIDI class
4 participants