MIDIApps icon indicating copy to clipboard operation
MIDIApps copied to clipboard

Allowing "copy" out of DetailsWindowController

Open coffeeshopped opened this issue 1 year ago • 2 comments

Hi, I know this pull request is sloppy but I created it just to ask if this feature might be a welcome addition:

I added a very simple way to copy sysex data out of the DetailsWindowController. I've wanted this for a long time in situations where I have a sysex file (e.g. a full synth backup) and I just want to pull a selection of the sysex messages out of it.

This change turns on multiple selection in the table view in DetailsWindowController, and adds a simple copy method. The data is copied to the clip board as a string in the typical hex format, as that seems to be readily paste-able to Hex Fiend, which is where I put the data to create the custom .syx file I want.

I could clean it up more if it's of any interest.

coffeeshopped avatar Feb 19 '24 17:02 coffeeshopped

Thank you, not a bad idea! At first glance this seems pretty simple and straightforward.

Things I'll check on:

  • Ideally if you select multiple messages, we would show all the data in the hex dump below
  • Let's see if we already have code to format each message's data as hex (perhaps expertDataForDisplay() is already the right thing?)
  • Look at what HexFiend's view puts on the pasteboard if you copy from the data in the hex dump, and try to do the same thing

krevis avatar Feb 20 '24 01:02 krevis

(Even better, we might as well add a way to export the selected sysex messages as .syx or .mid. Would just need to add a menu item or button somewhere.)

krevis avatar Feb 20 '24 01:02 krevis