Turntable speed stabilty

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
As Pano said, I was thinking use the second channel as a guide for grabbing your frames. Should be easy to get a few msec 1V blip every rev. Thinking of doing this real time is getting ahead of ourselves for now. Or adding the marker to the plot is trivial since I can read both channels, or in fact use the marker to rotate the plot to 0.
OK I get it now - that should work, as should mixing a large enough blip (or mute) into both channels.

I can work with any of that in my SW too.

LD
 
Member
Joined 2014
Paid Member
Not sure I understand the upside of realtime, beyond being fun to do, but here's my 2p worth:

I can see cases in certain turntables where being able to tweak something and see a change within a few seconds on a screen would be helpful. For example adjusting tension on a belt or in the case of one of my turntables, adjusting tension on the motor spring, but the savings in time are small given you will have to keep moving the needle to stay on the right test track for many records! But when you are tuning a specific thing there may be easier ways. In my case mk1 eyeball* and a stethescope might find the sweet spot faster.

*you can see the belt oscillate if its wrong.
 
I am in the process to modify my SME 20 table into an air bearing one. It may take a month to finish the project since I need to have some parts done. Once it is finished, it will be very interesting to see how belt driving system comparing to direct driving system. The bearing will be completely frictionless.
 
In your coding, I saw a mk4.dat file. Where is the wav file? Do you have to convert wav file to dat first?
Jim, yes the .dat file is a text file, a literal english conversion of the binary .wav file. You could open the .dat file in Word or notepad, and it would read something like this:

; Sample Rate 96000
; Channels 1
0 0.027374268
4.5351474e-005 -0.024291992
9.0702948e-005 -0.054199219
0.00013605442 -0.042663574
0.0001814059 -0.0047912598
0.00022675737 0.031738281
0.00027210884 0.049407959
0.00031746032 0.040374756
...........etc

There's a header that describes the sample rate and number of channels, then alternate numbers: the first is the time offset in seconds, the second is the digital number that is the signal at that time between -1 and +1. That is between full scale -ve (-1) and full scale +ve (+1).

There's a program called Sox that converts the .wav file to a .dat file - very handy it is too for all sorts of conversions.

So Mk4.dat is a text file that was converted from the .wav file via Sox.

HTH !

LD
 
Last edited:
Administrator
Joined 2004
Paid Member
Audacity may also be able to get it in the format needed. Use Analyze>Sample Data Export and choose Time Indexed and Linear. You'll want more than 100 samples, tho.

sample-data.txt 1 channel (mono)
Sample Rate: 44100 Hz. Sample values on linear scale.
Length processed: 100 samples 0.00227 seconds.


0.00000 0.00000
0.00002 0.05965
0.00005 0.11907
0.00007 0.17801
0.00009 0.23626
0.00011 0.29357
0.00014 0.34972
0.00016 0.40449
0.00018 0.45767
0.00020 0.50904
0.00023 0.55840
0.00025 0.60555
0.00027 0.65032
0.00029 0.69252
0.00032 0.73199
0.00034 0.76857
0.00036 0.80211
0.00039 0.83249
0.00041 0.85959
0.00043 0.88329
0.00045 0.90350
0.00048 0.92015
0.00050 0.93317
 
Yes just open the Audacity file in Wordpad and replace the first two lines with what the .dat format expects. The .dat reader expects ascii and any word break between values that Excel accepts. Don't leave any empty lines before or after the two line header.

Python has a wave reader but the odd byte count 24 bit packed format seemed to give it problems (these are very common). Last I looked a better audio interface was not included with standard distributions and I don't want folks to have to figure out how to install libraries from other sources to get things to work.
 
Last edited:
Audacity may also be able to get it in the format needed. Use Analyze>Sample Data Export and choose Time Indexed and Linear. You'll want more than 100 samples, tho.

sample-data.txt 1 channel (mono)
Sample Rate: 44100 Hz. Sample values on linear scale.
Length processed: 100 samples 0.00227 seconds.


0.00000 0.00000
0.00002 0.05965
0.00005 0.11907
0.00007 0.17801
0.00009 0.23626
0.00011 0.29357
0.00014 0.34972
0.00016 0.40449
0.00018 0.45767
0.00020 0.50904
0.00023 0.55840
0.00025 0.60555
0.00027 0.65032

The time steps are overly truncated but the normalized voltages should be fine, the time steps are ignored and the sampling frequency is used instead.
 
From what Scott posted, I think the python function code is snappy - why not try it at 96 or 44.1 and see ?

From what I'm seeing once the libraries are loaded the script takes about 3-4 sec to do two revs @96000 which is essentially real time since you need to acquire one rev to start the computation in any case. So doing real time with the necessary 1 rev delay should be easy. On an Rpi there should be better hooks to interleave the data capture and computation/display. Another option is the Analog Discovery USB device.
 
I noticed that truncated time compared to the SOX export, and wondered if it would work OK. Worth try I suppose, after editing the header.

Just tried it works fine, just take care to leave a space between the semicolon and the keyword and no blank lines between the top of file and data like this...

; Sample Rate 96000
; Channels 1
0 .20000

etc.

Wordpad worked fine for this and the resuts were exactly the same as previously posted. Audacity allows you to have no header and add an annotation but not two lines of it apparently.
 
I noticed that truncated time compared to the SOX export, and wondered if it would work OK. Worth try I suppose, after editing the header.

This is another case of "what were the developer's thinking?" The information in the first column is totally useless for anything. OTOH the other method bloats the file by 2X for no gain the sampling rate is all you need, arrays end up with integer indices computing the time represented by them is totally redundant.
 
Last edited:
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.