Cabbage Logo
Back to Cabbage Site

Esr = 1

This seems to be a strange parsing error. I want to use the duration of a single audio sample in instrument code so I use this line:

iSampDur = 1/sr

This seems to change the sample (sr) rate to 1. Printed to the console is:

sample rate overrides: esr = 1.0000, ekr = 0.0156, ksmps = 64

Printing sr from the Csound orchestra confirms this.

?

Hmm, can you try adding some white spaces? For example:

iSampDur = 1 / sr

I’ll take a look…

[edit] confirmed bug, I’m looking for a fix now…

Fixed. I’m just running off a new build now…

Great!
On the subject of sample rates, would it be possible to add more options? Perhaps 8000 11025 16000 22050 32000 … 176400 192000 352800 384000?

AFAIK, Cabbage will display all sample rates supported by the card you are using. Or in the case of OSX, those supported by CoreAudio. I may be wrong, but I somehow always assumed this to be the case?

[edit] latest builds are available here

This doesn’t seem to be the case here. I seem to always be limited to 44100, 48000, 88200 or 96000. I’m checking this now on an RME Fireface UC which can do 32000 - 192000. I’ll have a check on Windows…

Thanks Iain. I’ll look into it.