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

User-friendly interface for moppy #171

Open
VladimirTsibrov opened this issue Nov 6, 2022 · 1 comment
Open

User-friendly interface for moppy #171

VladimirTsibrov opened this issue Nov 6, 2022 · 1 comment

Comments

@VladimirTsibrov
Copy link

Hello!
I have a question about controlling the floppotron. Maybe you can help me?
Using MoppyControlGUI we can configure the mapping for specific midi file. But I'd like to create interface for my floppotron, that can be used by anyone without knowing anything about midi channels or mapping. I see it like this:

  1. I'm doing the mapping setup in MoppyControlGUI to get the best sounding melody. The result (data for the com port) is saved to a file.
  2. I create a set of such preprocessed files.
  3. The user simply selects a melody from a set of this files. This will happen in some program I need to write (not MoppyControlGUI) that will send data from the selected file to Arduino
    What do you think about this? Can you suggest any solutions?
@Sammy1Am
Copy link
Owner

Sammy1Am commented Nov 7, 2022

Hi there!
The most challenging part of any sort of custom formatted file is getting the timings right-- I've never quite wrapped my head around the best way to do that outside of MIDI. Rather than try to reinvent the timing wheel, I'd suggest sticking with MIDI files and figuring out some way to store your configuration somewhere that could be read at run-time. Two potential ideas:

  • You could create a custom file format *.mpy or something that contains the mapping scripts and a path to the MIDI file (or find a way to embed the MIDI file I guess). Opening the file would load the correct configuration and the specified (or included) MIDI. You could even probably do this with the existing MoppyControlGUI and just have it overwrite any scripts currently in the UI, or you could write your own wrapper over the top of MoppyLib that replaces MoppyControlGUI (that way you could reuse all the existing infrastructure but with your own easier-to-use UI).
  • You could use MIDI "System Exclusive" messages to embed the script configuration inside the MIDI file itself. This one would be a little bit trickier because you'd have to figure out how to serialize the scripts you need (or use templates) into a few bytes in the SysEx message. But then on playing the MIDI file, the first few messages would configure the player the same as the first suggestion above. This one's kinda neat because the MIDI file is still a MIDI file so other players could play it, but SysEx messages are more limiting than an arbitrary file format.

If you really want to replay raw COM data, there might already be programs out there to replay serial communications, but they would have to get the timing just right.

Let me know if that's helpful or if you decide one of those directions makes sense.

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

No branches or pull requests

2 participants