Csound Csound-dev Csound-tekno Search About

[Csnd-dev] Bizarr pitching error

Date2015-12-19 14:26
FromPeter Burgess
Subject[Csnd-dev] Bizarr pitching error
AttachmentsAppCode.cpp  TESTSYNTHCSD.csd  
Hi here, I am facing a very strange issue with a couple of my instruments in my c++ app.

The main instrument with which I know it happens is this jungle kick-bass instrument, which has worked fine for several weeks, until just the other day. Now it plays as if it is drastically pitch shifted up. I have heard a few others doing it but haven't yet established which ones. All other instruments playing at the same time as the off one's play as normal.

It started happening after I moved some instruments around in the string they're stored in, added a side-chain compression bus for most of the basses (but not the jungle bass) and fiddled around with the output sample rate and resolution. As my app is outputting wav files and then playing them back in SDL Mixer, I suspected that it might be a sample rate issue, but I have set all the sample rates and resolutions back to their original formats, as well as some others, to try to fix it and nothing changes

I have examined the pitches being sent to the jungle bass in the c++ app, and they all look normal.

I have copied the instrument exactly to it's own csd file and tried it out with a score consisting of the same range of frequencies that my app was sending, and it plays as I would expect. I have also checked to see if i'm sending frequencies in Hz, and converting them using cpsmidinn accidently, and I'm not.

I have also listened to the .wav file generated in a normal audio player, and it plays the same weird pitched up version, so it's not SDL Mixer.

Boy am I out of ideas! I have no idea now what the problem is. Has anyone else ever come across similar issues? I am still working with 6.05, but as I said, it's worked fine for ages and worked in standalone csound, so I don't think it's to do with the version. I've attached the csd and some relavent exerts from my orchestra string and c++ code, encase someone can spot an error somewhere.