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

Unused samples are not cleaned up once deleted from instruments #1214

Open
notsmoothsteve opened this issue Mar 19, 2021 · 4 comments
Open

Comments

@notsmoothsteve
Copy link

Hydrogen version * :1.0.1
Operating system + version : Windows 10 2004 x64
Audio driver + version : N/A


H2 does not seem to clean up the samples for instruments/layers when those samples are no longer part of the drum kit. Two ways to reproduce the problem:

Method 1: Load an existing drum kit, Save As a different name (let's call it Temp), clear all instruments, save. Look in the directory where Temp's samples are stored, and all of the samples originally from the existing drum kit are still there.

Method 2: Load a sample into a layer. Save the drum kit. Oops - I have a better sample, so delete that sample and load a new one. Save the drum kit. Look in the directory where the kit's samples are stored, and both samples are there.

After either of these methods, if you then Save As a brand new drum kit, it only saves the samples that are actually needed, so it knows which ones aren't needed - it just didn't clean them up.

@mauser
Copy link
Member

mauser commented Apr 7, 2021

Hi!

in my opinion Hydrogen never had the concept of "owning" the samples which are in the drumkit folders. To Hydrogen, those files are external files which might be used to build a drumkit.

But i suppose that it would make sense to offer a "clean up" functionality (like most DAWs have it for their project directories..) for our drumkit directories.

@notsmoothsteve
Copy link
Author

To me, Hydrogen owns them because

  • they're in Hydrogen's directory (c:\users[me].hydrogen since I'm on Windows)
  • Hydrogen put them there after I loaded samples from wherever I had been keeping them

A cleanup function would be nice, but unless there's a reason why it would be bad for Hydrogen to clean up after itself, I still think it would be best for it to happen automatically. After all, the average user would probably never go poking around in there and realize that a cleanup was necessary in the first place. (Granted, the samples are probably a tiny fraction of the size of the user's storage, so it's not like they're going to run you out of disk space ... but cleanliness is supposedly a virtue.)

@theGreatWhiteShark
Copy link
Contributor

To me, Hydrogen owns them because

they're in Hydrogen's directory (c:\users[me].hydrogen since I'm on Windows)
Hydrogen put them there after I loaded samples from wherever I had been keeping them

That sounds legit.

I'm not that sure about the automatic cleanup though. E.g, if one creates a new drumkit via an editor, loads it in Hydrogen, and realizes that Hydrogen did delete some of her precious samples because there was a typo in the drumkit.xml file. The annoyance of loosing a sample is in my view way larger than the annoyance of having Hydrogen waste too much storage. But a manual option would be a good idea.

@notsmoothsteve
Copy link
Author

Fair enough - unanticipated data loss is definitely something to be avoided!

Maybe there could be a warning at some point (while saving an drumkit that the user has just edited, for instance) warning the user that there are unused samples, and offering to clean them up or suggesting that the user can do [insert menu path here] if they wish to clean them up. That would deal with my issue of the user never realizing there's junk that ought to be cleaned up, while also ensuring that cleanup is never initiated without the user's action/permission.

Anyway, obviously not a particularly high priority request :-) but it would be nice to have a proper way of handling it, rather than the clunky workaround I've been using (create/edit the drumkit under a temporary name, then when it's finished, copy it to a new name - which only copies the samples that are actually in use - then delete the temporary one).

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

No branches or pull requests

3 participants