Monday, February 20, 2012

Cross synthesis & time stretching in CSound

The goals:
1. Cross-synthesise the two sounds using Csound’s pvcross opcode.
2. Time-stretch and pitch-shift one of the sounds using Csound’s pvoc opcode

To use any of CSounds phase vocoding opcodes we need to first analyse the files we want to use: its not hard, but you need to know to do it. Open the "Utilites" tab:

Then select your analysis type "PVANAL" is the one we want, after that set your input & output filenames, samplerate, num channels, and a frame size of perhaps 1024.. or there abouts.
Now hit "Run PVANAL" and it should print out the following in the console.
PV analysis output:
util pvanal:
audio sr = 44100, monaural
opening WAV infile adrien.wav
analysing 119879 sample frames (2.7 secs)
1024 infrsize, 256 infrInc
466 output frames estimated
pvanal: creating pvocex file
20
40
[snip]
460
480

484 1-chan blocks written to adrien.pvx
Ok so we've analysed the files needed, now to use them in the .csd file:
Helpful docs online: http://www.csounds.com/manual/html/pvcross.html


Some code like beside here generated some inresting results, but I don't know what the end goal should sound like...

Probably not really like this :(







Time stretching is a bit easier:

 


 Not sayin its fantastic but it works :)

No comments:

Post a Comment