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

Create Midi Integration for Tauri Desktop app #685

Merged
merged 6 commits into from Aug 31, 2023

Conversation

daslyfe
Copy link
Collaborator

@daslyfe daslyfe commented Aug 30, 2023

The timing is more stable/less jittery than the webmidi implementation. Thanks @vasilymilovidov for providing a POC to reference.

@felixroos
Copy link
Collaborator

great stuff, the timing seems rock solid!
i see a problem with using desktopbridge in the midi package. The midi package shouldn't depend on tauri / desktop stuff, as it has to work independently.
We can safely add @tauri-apps/api as a dependency to the website instead.
Then we can decide in Repl.jsx to either import @strudel.cycles/midi or the desktopbridge based on the outcome of isTauri(). Both @strudel.cycles/midi and the desktopbridge can then just define Pattern.prototype.midi and only the relevant one will be used.

edit: I've now tried that approach and it seems to work

@felixroos
Copy link
Collaborator

one more little nice to have idea: The tauri app already logs the available midi devices to the terminal, maybe there is a way to also log those to the repl console, similar to how it happens with web midi, so you'd see the correct names also when using the desktop app regularly without terminal

@daslyfe
Copy link
Collaborator Author

daslyfe commented Aug 31, 2023

edit: I've now tried that approach and it seems to work

Cool, I agree with this approach and the changes you made. I think it makes sense.

one more little nice to have idea: The tauri app already logs the available midi devices to >the terminal, maybe there is a way to also log those to the repl console, similar to how it > happens with web midi, so you'd see the correct names also when using the desktop > > app regularly without terminal

I think this is a good idea, I was planning to see if this can be done (I think it should be, I know that Tauri can communicate in both directions) and make a followup PR.

@felixroos felixroos merged commit a3b55aa into tidalcycles:main Aug 31, 2023
1 check passed
@daslyfe daslyfe deleted the desktop_midi_bridge branch January 21, 2024 22:21
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.

None yet

2 participants