Skip to Content

Beat Constructor

10 replies [Last post]
F_Sauce
Offline
Joined: 04/17/2010

Hei!

I have purchased Beat Constructor and Mr. Pavlov send with it an .xml file to use with Hydrogen. However, I am unable to load it. Are there to many sounds in the bank ? I am able to import it and all seems fine, but Hydrogen crash whenever I try to load the bank.

Anyone with any experience on this?

Cheers!

Thorgal
Offline
Joined: 04/17/2010

if you're using linux, open a shell, type 'top', locate the hydrogen process and keep an eye on it (you can speed up the refresh from 3s to 1s by typing 's' then '1' in top). Do this BEFORE you load your drumkit.

Now, load your drumkit and see if hydrogen blows your RAM ;)

I have the free version of NSKit7. When I load everything, hydrogen eats up 28% of my memory, that's a lot considering that I have 4G of RAM. Hydrogen could be expanded with a disk streaming module (have you tried something like LinuxSampler ?)

F_Sauce
Offline
Joined: 04/17/2010

Hei, and thanks for your reply!

I am unable to catch it as hydrogen crash instantly. However, my system has 4GB of memory as well, so I don't think it could be that.

I have no experience regarding your other suggestion, do you mean an interoperation? between those two programs? I have no experience with Linux Sampler yet but have it installed and have tried to run it a couple of times.

Cheers,

Olav

Thorgal
Offline
Joined: 04/17/2010

which hydrogen version are you using by the way ?
About linuxsampler, I was suggesting an alternative way to do your drumming. I haven't used it intensively myself but if I remember, you can edit your own "instruments" (saved into gig files) + samples are read from disk, not loaded all in RAM like hydrogen does. Again, I may not be exact on that one but that's what I gathered. I will definitely look into this myself. I plan on acquiring the full NS Kit (called NaturalDrum nowadays and that's A LOT of samples, about 20G ...).

F_Sauce
Offline
Joined: 04/17/2010

I use version 0.9.4-svn84 which is the latest pre-packaged from Packman. I use opensuse10.3 by the way.

I will try to remove some of the sounds and rebuild a custom Beat Constructor set, and see how it goes. I like Hydrogen so it would be nice to have it as my main drum sequencer, though, I intended to learn Linux Sampler as well. All other banks loads and plays fine so the problem must be with the Beat Constructor.

About NSkit7free, do you now where I could get a sample? For about a year ago I tried to download the free version but at that time Natural Studio was down.

Thorgal
Offline
Joined: 04/17/2010

mmmm ... good question. The free kit seems to be gone from public access. You can always ask at www.naturaldrum.com when they plan to make it public again. I know that they plan to start shipping the full kit this week. A downloadable version will happen at the end of march. But I don't know about the free smaller kit.

Thorgal
Offline
Joined: 04/17/2010

F_Sauce,

I am curious as to what hydrogen spits out before it crashes on you.
I am looking at the code, and I can see some unsafe stuff like this in Sample.cpp :

[code] ------------------------------------------------------------------
Sample* Sample::load_wave( const string& filename )
{
// file exists?
std::ifstream verify( filename.c_str() , std::ios::in | std::ios::binary );
if ( verify == NULL ) {
cerr << "[Sample::load] Load sample: File " + filename + " not found." << endl;
return NULL;
}

SF_INFO soundInfo;
SNDFILE* file = sf_open( filename.c_str(), SFM_READ, &soundInfo );
if ( !file ) {
cerr << "[Sample::load] Error loading file " << filename << endl;
}

// cout << "frames = " << soundInfo.frames << endl;
// cout << "samplerate = " << soundInfo.samplerate << endl;
// cout << "channels = " << soundInfo.channels << endl;

float *pTmpBuffer = new float[ soundInfo.frames * soundInfo.channels ];

//int res = sf_read_float( file, pTmpBuffer, soundInfo.frames * soundInfo.channels );
sf_read_float( file, pTmpBuffer, soundInfo.frames * soundInfo.channels );
sf_close( file );
[/code] --------------------------------------------------------------------

you can see the danger here : if the pointer 'file' does not exist, hydrogen sends an error message to the standard error (screen) but then it continues further with the pointer to file. This is definitely unsafe and prone to crash if the sound file was not found. The code should either throw an exception, return NULL, or load a default sample + give a fat warning and make sure 'file' exists in the rest of the function implementation.

F_Sauce
Offline
Joined: 04/17/2010

Hei Thorgal!

I'm now on thin ice, I couldn't quite follow you on your example. Not much knowledge with codes.

This is what I get when I open Hydrogen from a terminal, should have tried this before but it didn't struck me. It seems, among other things, that the .xml file has errors.

Thorgal
Offline
Joined: 04/17/2010

hehe, never mind the code ...

from your output, an immediate thought comes to mind : avoid filenames with spaces ... ;)

F_Sauce
Offline
Joined: 04/17/2010

Ok, I will change that.

Warbread
Offline
Joined: 04/17/2010

Hey all,

I bought the Beat Constructor sample library and I didn't get this .xml file. Where is it located? Could someone send me the .xml?