how can I calculate pitch deviation in a large collection of audio files? I am making a software model of an existing digital synthesiser and I have made audio recordings of single notes with particular parameter settings. I made a program in C++ which sends a MIDI sysex message to change the parameter in question, then triggers a MIDI noteon and noteoff message. The sound is recorded to a wav file. So I have several collections of 100 wav files for each parameter (the parameters in question have 100 steps).

One of the (easier) parameters I am looking at is LFO depth. The LFO is applied to the oscillator pitch. So I have 100 wav files with a square wave LFO modulating the oscillator pitch between a base pitch and another pitch that goes between base pitch (zero modulation) and base pitch+1 octave. I would like to write a script to work out precisely how many semitones/cents modulation occurs in each wav file. So I would like to end up with 100 numbers that I can use to map to modulation depth in my software model.

Can anyone recommend a tool/and or libraries for doing this task?
Use a very slow LFO to get very long segments of uniform pitch (this will allow you to use long analysis windows and counter 'border' effects), and use the simplest possible waveform for the oscillator to prevent octave errors in pitch detection. Aubio provides an implementation of the YIN algorithm which is fairly accurate.

I personally doubt there's anything fancy going on here - it is very likely that the relationship between the LFO modulation depth and the pitch deviation in cents is linear.