Open aMyTimed opened 2 months ago
That would be lovely ngl
I have problems thinking in my head how the saving would exactly detect which .json file the original song came from unless given some extra special properties, but saving changes to a selected file would be very convenient so you don't gotta fill your downloads with 20 .jsons of the same song :p
With the web's File System Access API, developers can open files and save changes to them without creating a new file.
Here's how it works:
Proposed Behavior
What I think would be great for BeepBox is for users to be able to open and edit files, then CTRL+S to write changes to the file they opened. BeepBox would keep track of if a certain file is opened, and would create a save dialog if the user does not have a
.json
file open.CTRL+Shift+S could be used a
Save As
keyboard shortcut which would open a dialog to save in a new file instead of an existing one.This would create a distinction between
Open
,Import
,Save
andExport
:Open
would make BeepBox use the File System Access API, and show a file picker, then store a file handle, and save changes to that file on CTRL+SImport
would work exactly as before, but could potentially use a CTRL+I insteadExport
would work exactly as before, but could potentially use a CTRL+E insteadSave
would use the stored File System Access API file handle to save changes to the same file the user openedWhat problem does this solve?
When I'm using BeepBox, I have to export to multiple formats each time I update my tracks (
.json
and.wav
) in order to both keep the source file of the track, and also the actual audio file. With this solution, I could instead just CTRL+S each time I make a change, and export to audio when I need.This would also make BeepBox behave more like most software, which typically have
Save
andExport
as distinct features.