Problems with arrays and buffers


~drumsd = Array.new;
~foldersd = PathName.new("/home/ubuntu/supercollider/Audiophob/md");

~foldersd.entries;


(
~foldersd.entries.do({
	arg path;
	~drumsd = ~drumksd.add(Buffer.read(s, path.fullPath));
});
)

sd$ ls -l
total 572
-rw-r–r-- 1 ubuntu ubuntu 314064 jan 18 14:36 104227__minorr__hhat-paiste-302-14-open-p.wav
-rw-r–r-- 1 ubuntu ubuntu 27064 jan 18 14:36 116973__cbeeching__hat-light.wav
-rw-r–r-- 1 ubuntu ubuntu 65580 jan 18 14:36 124101__connersaw8__crash.wav
-rw-r–r-- 1 ubuntu ubuntu 2613 jan 18 14:36 124382__cubix__8bit-snare.wav
-rw-r–r-- 1 ubuntu ubuntu 74616 jan 18 14:36 15590__lewis__sabmute.wav
-rw-r–r-- 1 ubuntu ubuntu 7116 jan 18 14:36 16336__sstokes__ss-ht-crunchtime.wav
-rw-r–r-- 1 ubuntu ubuntu 17092 jan 18 14:36 25671__walter-odington__garage-city-snare-snappy.wav
-rw-r–r-- 1 ubuntu ubuntu 57830 jan 18 14:36 29800__stomachache__3.wav

~drumsd[0].play;

works

~drumsd[1].play;

from [1] on, I get ‘nil’

No idea what’s going wrong

Edit: I see a typo, sorry.

Some samples I hear clearly in other apps, but are almost silent in SC it seems though. Other samples sounds normal. From the same drumkit samplecollection (Hydrogen drumkit in Ubuntu)

Looks like a typo? You have ~drumsksd instead of ~drumsd in one place? ``

Yes, saw it. Thanks.

Now I wonder why some wav files sound a lot more quiet in SC then in other apps where the volume is normal.

I’ve this with the snare samples. Kinda strange.

SC’s buffer .play method scales the amplitude by 1, which is full volume. So your example code should not be softer.

But Events by default use an amplitude of -20 dB = 0.1 (because presumably you will be playing them with other things – the lower amplitude is to avoid overloading the output). You can specify a different amp in the event but it’s generally not recommended to work at 0 dBFS (again, to avoid distortion at the output).

So, can you give more detail about how you’re using the samples in SC (where you observe the reduced volume)?

Which other apps play the samples louder?

hjh

Like the default Video app in Ubuntu, but I’m pretty sure I’ve this only in SC.

I’m now testing with a Behringer UCA222 USB soundcard and now the volume of the samples seems to be ok.

The other card is a M-audio Audiophile 24/96.

I’ve also noticed that SC gives me just 2 audio in- and outputs on this machine (both soundcards), while on my laptop, with the same USB interface, it gives me 8.

(Working on Ubuntu with JACK and Cadence as JACK control app)

The number of hardware channels is not determined automatically – it’s set in the server’s options object.

http://doc.sccode.org/Classes/ServerOptions.html#-numInputBusChannels

http://doc.sccode.org/Classes/ServerOptions.html#-numOutputBusChannels

hjh