Hi,

i wrote a very small patch today which changes the handling of layers, 
or to be more precious, where the samples are stored.
h2 0.9.4 allowed it only to save the samples in the top-level dir of the 
corresponding drumkit-dir.
A path to a sample was looking like this: 
~/.hydrogen/data/drumkits/mykit/snare.wav 
This was totally sufficient for drumkits with a small amount of samples, 
typically single-layered kits.

Since more and more multilayered kits hit the scene, samples are 
typically organized in subdirs.
For example there are subdirs for each instrument which include the 
samples for this very instrument.
When loading a sample from such a kit via the instrument editor, 
hydrogen copies it to the root of the
drumkit dir ( from ~/.hydrogen/data/drumkits/mykit/SNARE/snare.wav  to 
~/.hydrogen/data/drumkits/mykit/snare.wav  )
So you'll end up with all samples living in the top level after saving 
your drumkit.
This fact made it hard to build a drumkit.xml for great kits (like GSCW 
or NS7) with the instrument editor.

The problem was that the local_file_mgr saved only the filenames of the 
samples (in drumkit.xml), without directory informations. I've
changed that so that it saves the relative filename, outgoing from the 
root of the drumkit dir.

But because the whole soundlibrary saving is a little bit of a mess and 
much code is involved, i'm not sure if my changes we're sufficient
and i would like to ask you to try this patch before i commit..

A little bit more on the technical aspect: When hydrogen saves a 
soundlibrary, it just copies all involved samples to the desired drumkit 
dir + writing meta-info.
If the sample lives in another directory outsite the drumkit-dir, it got 
copied to the root of the drumkit dir. This function is unchanged, i 
just changed the behaviour for files which live in subdirs of the 
drumkit dir.

Btw. i suppose we should move the "save changes to instruments" function 
from the  drumkit prop's dialog to the right-click context menu in the 
soundlibrary browser.
So you could right-click on a soundlibrary item and choose "save", then 
h2 saves all changes to this kit (if it is loaded at the moment).

I hope that was not too confusing :-/
- Sebastian

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Hydrogen-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hydrogen-devel

Reply via email to