Jim's latest including the source file I (very) mildly modified* is at,
http://www.epicyclism.com/audio/WinWF2.zip
It seems to produce plausible output given the GL58 file linked on the previous page.
*A pre-processor define to suppress the MS warnings about insecure printf/sprintf, clearing up the use of strrchr, but only a bit, creating tolerance of both sorts of path separators, and replacing the long term literals "rd" and "wd" in file open modes with the appropriate "rb" and "wb". This code compiles on both Windows and Linux and produces identical output apart from the line endings. FWIW gcc is very grumpy about potentially out of bounds printf, sprintf usages which would be worth paying attention to because it will catch you out one day and this is the main reason C is 'problematic' in the wild.
On Linux I compiled with,Thanks, Paul. Sorry that I persistently seem to make the same bloopers like the "d". Partly my memory, partly because I adapt previous progs when writing news ones, and duly import old mistakes!
The point about printf family is new to me, and the gcc I use doesn't warn me that I've noticed. But that may mean I didn't recognise when it does! :-/
Shows that I've never taken any courses on computer programming at all, just hack and see.
paul@tristan:~/audio/audiomisc$ gcc -O3 -o WowAndFlutter LP_WowAndFlutter_with_vsz.c -lm
LP_WowAndFlutter_with_vsz.c: In function ‘output_veusz’:
LP_WowAndFlutter_with_vsz.c:241:3: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%lf",&number_rotations);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/stdio.h:867,
from LP_WowAndFlutter_with_vsz.c:3:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 13 and 1036 bytes into a destination of size 1024
return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
__bos (__s), __fmt, __va_arg_pack ());
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You have to make a 'Results' directory under the directory you are working in.Paul
i get the crashing too under Win10. It opens a terminal window and closes it again almost immediately
sorry to be a pita
PS C:\Users\paul\source\repos\AudioMisc\WowAndFlutter\working> dir
Directory: C:\Users\paul\source\repos\AudioMisc\WowAndFlutter\working
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 04/10/2019 16:31 Results
-a---- 02/10/2019 16:37 4346176 GL58 3kHz stereo.wav
-a---- 03/10/2019 16:38 853 PolarFooter
-a---- 02/10/2019 16:05 7582 TwoPolars.vsz
-a---- 03/10/2019 16:50 180736 WowAndFlutter.exe
PS C:\Users\paul\source\repos\AudioMisc\WowAndFlutter\working>
PS C:\Users\paul\source\repos\AudioMisc\WowAndFlutter\working> .\WowAndFlutter '.\GL58 3kHz stereo.wav'
LP_WowAndFlutter Ver 0.20 2nd Oct 2019
=========================================
This lets you carry out Wow and Flutter analysis.
Please read the Help inside the application before first use.
This version outputs Veusz files (Polar).
Application directory = C:\Users\paul\source\repos\AudioMisc\WowAndFlutter\working
Output into directory = C:\Users\paul\source\repos\AudioMisc\WowAndFlutter\working/Results
Input from file = .\GL58 3kHz stereo.wav
Input file leafname = GL58 3kHz stereo.wav
ChunkID = RIFF
Chunk Size = 4346168
Format = WAVE
Subchunk1ID = fmt
Subchunk1Size = 16 [should be 16 for LPCM]
AudioFormat = 1 [should be 1 for LPCM]
Number of Channels = 2
Sample Rate = 44100 Samples per sec
Byte Rate = 176400 Bytes per sec
Block Align = 4
Bits per sample = 16
Bytes per sample = 2
Subchunk2ID = data
Subchunk2Size = 4346132 [Number of Data payload bytes]
WAV data start located OK
Sample pairs per sec = 44100
Duration = 24.6379 sec
sample interval = 22.676 microsec
block size = 441000 Duration = 10.00 sec
Enter start time of section to transform [seconds]
=> 10
Requested start time 10.00
Start sample pair 441000 = At Byte 1764000
reading from .\GL58 3kHz stereo.wav
Loading 16bit payload
Block size read = 1764000
Left dc = 0.0000 rms = 0.1129
Right dc = 0.0000 rms = 0.1129
Apply 200Hz highpass filter.
delta = 0.0281
Left 5 to 440998 has 29737 cycles
Right 5 to 440998 has 29737 cycles
Frequencies 2973.7472 Hz Left 2973.7472 Right
Left chosen
Found f0_counter = 2973.7472
Now examine chunks
Ended with i = 902
Now doing spectrum of variations - please wait...
Saving rate v time to C:\Users\paul\source\repos\AudioMisc\WowAndFlutter\working/Results/ratepercentVtime.csv
Enter number of rotations for polar plot [Max = 5.0]
=> 5
Footer at C:\Users\paul\source\repos\AudioMisc\WowAndFlutter\working/PolarFooter
388 values offscale for histogram plot.
Histogram left + right raw count 1294
weighted count 1518
Limit raw of 1234 at +/- 233 [ 0.466 percent]
Limit weighted 1446 at +/- 220 [ 0.440 percent]
Done!
PS C:\Users\paul\source\repos\AudioMisc\WowAndFlutter\working>
On Linux I compiled with,
Code:paul@tristan:~/audio/audiomisc$ gcc -O3 -o WowAndFlutter LP_WowAndFlutter_with_vsz.c -lm
and without asking for warnings I get stuff like,
Code:LP_WowAndFlutter_with_vsz.c: In function ‘output_veusz’: LP_WowAndFlutter_with_vsz.c:241:3: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result] scanf("%lf",&number_rotations); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The purpose of that is that if the string doesn't convert you will carry on and use the uninitialized contents of 'number_rotations' regardless.
...
GL58 file is 24.6 seconds long so should be OK. Have made stereo in Audacity then saved as wav. Header viewed in hex editor has 'd' 'a' 't' 'a' starting at offset 24h so maybe this is the problem?
At some point I'll add more to the Veusz output files and try and remember to fix my usual bloopers wrt trapping input, etc. But it will probably be a week or two as I'll now focus back on what I'm writing.
That's with the Analogue Productions disc? It has a distinctive wobble on one rotation (lower left on this plot) that is visible on most plots. It puts the minutiae of TT wobble into some perspective.Jim
One final request as my old brain seems to be failing me in taking your 'apps' csv file and modifying it to enable me to make a plot similar to this
A second output of a veusz plot similar to this.
I think there is a use for the both your normal plot showing the speed changes in detail and the more overview one above.