Cabbage Logo
Back to Cabbage Site

Midi pitch issue

Hi All, new to the forum, beginner to Csound and Cabbage.

Have started a couple of little experiments, but very strangely, when I hit midi note 60 (C3 on Cabbage GUI) I actually get a sharper pitch somewhere between Db and D (about midi note 61.5).

Have made a simple subtractive synth and now playing around with a sampler using table_i, with the same result. Any idea what i’m doing wrong here?

subtractive test.csd (12.1 KB)

tab_i.csd (1.1 KB)

Could it be a sample rate mismatch? 48 kHz playback of 44.1 kHz or something similar.

C3 is about 130.81 Hz. If you were off by 48/44.1, then you would hear 142.38 Hz.

Thanks Bryan. Yes this occurred to me when I first noticed it with table_i.

But the same issue is happening (with identical pitch error) when I use poscil to generate a basic sine wave.

:thinking:

Hi @Rudy_Rocker, I think @Bryan_T is right, it sounds like a mismatch between your orchestra’s sample rate, and your host. Your best bet is to remove the sr=... from your code. When you remove this from your code, Cabbage will use the host/system SR. This should resolve your problem :+1:

Thanks @Bryan_T and @rorywalsh. Found sample rate in Cabbage settings and it was on 48000. Much appreciated.

Great. As I said, the best thing is to remove the sr assignment entirely, that way you will never have issues with tuning as Csound will be compiled with the sample rate as the host, be it Cabbage itself, or a DAW :slight_smile: