AFAIK the Drumkit does only contribute the actual samples to a Song. All
parameters, like the volume of individual components, attack time etc,
is stored in the .h2song file. All the settings in the drumkit file are
just used as default values transferred to the .h2song file the moment
you change drumkits. But during loading only the .h2song file is read.

The latter is done in SongReader::readSong in
src/core/src/basics/song.cpp. It reads the name of the drumkit from the
.h2song file, uses it as a unique identifier to find the corresponding
drumkit folder, constructs the paths to the contained samples
(`sFilename`), and calls Sample::load() to load the samples into memory.

In principle one could remember the name of the last Drumkit (I think
this is already done) and only reload samples if it changed. But there
might be a number of nasty side effects since the Instruments belonging
to the last Song will not be properly destructed and build from scratch
anymore. Also I never had a look into the sample editor. Not quite sure
whether it might apply some stuff to the sample in memory without
storing the changes to their actual files.

But I might be off with this explanation. I never delved deep into this
part of the code.

Cheers,

Phil

On 1/30/20 10:37 PM, Przemysław Sitek wrote:
> I *think* that loading song requires loading drum kit which in turn triggers 
> loading samples, and reloading samples would take bulk of time. If that's the 
> case, maybe Hydrogen could check if new song uses the same drums/samples as 
> old one and skip reloading samples. Could anyone verify this?
>  
> Best Regards,
> Przemek
>
>> Wiadomość napisana przez Thijs van severen <thijsvanseve...@gmail.com> w 
>> dniu 27.01.2020, o godz. 18:20:
>>
>> Hi all !
>>
>> Any idea if it is possible to speed up the song loading in H2 ?
>>
>> I currently have a set of 10 elektro songs and ideally i would like be able 
>> to start the next song immediately after the previous one ends.
>> When we play a regular 'pop' set it doesnt matter that much, but with 
>> dance/elektro there are typically no gaps (or very short ones) between 
>> songs. The gaps kida kill it.
>>
>> I have not yet looked at the samples i have in my songs and i know that 
>> reducing the number of samples (and/or reducing sample length) will make a 
>> difference, but i was wondering what other factors could help speed up song 
>> loading.
>>
>> I'm also concidering storing my samples in a ramdisk, but i doubt if that 
>> will make huge difference since i already have them stord on ssd.
>>
>> Any ideas ?
>>
>> Grtz
>> Thijs
>>
>>
>> _______________________________________________
>> Hydrogen-devel mailing list
>> Hydrogen-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/hydrogen-devel
>
>
> _______________________________________________
> Hydrogen-devel mailing list
> Hydrogen-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/hydrogen-devel



_______________________________________________
Hydrogen-devel mailing list
Hydrogen-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hydrogen-devel

Reply via email to