UK Vintage Radio Repair and Restoration Powered By Google Custom Search Vintage Radio and TV Service Data

Go Back   UK Vintage Radio Repair and Restoration Discussion Forum > General Vintage Technology > Components and Circuits

Notices

Components and Circuits For discussions about component types, alternatives and availability, circuit configurations and modifications etc. Discussions here should be of a general nature and not about specific sets.

Closed Thread
 
Thread Tools
Old 19th Jun 2018, 8:19 pm   #21
bluepilot
Heptode
 
Join Date: Feb 2010
Location: Duffort, Gers, France
Posts: 714
Default Re: Heavy maths? Sample rates and pitch shifting

If you sample at a fixed frequency then each individual bit will represent progressively longer bits of the original sound as the tape progresses. Fit a polynomial to a few bits within a "window" and slide that window along the file, keeping track of how far you are from the start. Resample within the polynomial according to how large the current frequency shift is. So if e.g. the radius of the tape at the end was half the radius at the start, you need to adjust the sampling points so that they are half as far apart at the end as they were at the beginning and corresponding spacings in between.

Or buy a spool-drive machine.
__________________
Stuart

The golden age is always yesterday - Asa Briggs
bluepilot is offline  
Old 19th Jun 2018, 10:47 pm   #22
Radio Wrangler
Moderator
 
Radio Wrangler's Avatar
 
Join Date: Mar 2012
Location: Fife, Scotland, UK.
Posts: 22,800
Default Re: Heavy maths? Sample rates and pitch shifting

So you don't need just a shift in pitch, the whole timing changes together, so you need to sample the recording, move the timing of the samples to correct for CAV, and then resample at fixed sampling rate and filter to remove aliases (The filter is the interpolator you need and it is stable)

David
__________________
Can't afford the volcanic island yet, but the plans for my monorail and the goons' uniforms are done
Radio Wrangler is offline  
Old 19th Jun 2018, 11:36 pm   #23
PJL
Dekatron
 
Join Date: Sep 2005
Location: Seaford, East Sussex, UK.
Posts: 5,997
Default Re: Heavy maths? Sample rates and pitch shifting

This is a CAV digital audio tape that was recorded at a fixed sample rate but when played back on a CSV machine the sample rate changes depending on the position on the tape and therefore the audio speeds up or slows down. You plan to digitally record the audio output from the CSV machine and convert it back to the correct speed.

I still think a simple linear interpolation is all that is needed as you don't have missing samples. At worst this will create some very high harmonics easily filtered out.

However, the complication will be in the audio bandwidth of the playback machine which may result in loss of information.
PJL is offline  
Old 20th Jun 2018, 7:43 am   #24
Radio Wrangler
Moderator
 
Radio Wrangler's Avatar
 
Join Date: Mar 2012
Location: Fife, Scotland, UK.
Posts: 22,800
Default Re: Heavy maths? Sample rates and pitch shifting

I agree.

It's a linear drift of all aspects of time. Pitch, syllabic rate etc. all together, That makes it a lot easier to fix

David
__________________
Can't afford the volcanic island yet, but the plans for my monorail and the goons' uniforms are done
Radio Wrangler is offline  
Old 20th Jun 2018, 8:56 am   #25
bluepilot
Heptode
 
Join Date: Feb 2010
Location: Duffort, Gers, France
Posts: 714
Default Re: Heavy maths? Sample rates and pitch shifting

Quote:
Originally Posted by PJL View Post
I still think a simple linear interpolation is all that is needed
Linear is fine if the sampling frequency is much higher (more than 10x) the highest frequency in the audio. For lower frequencies some sort of spline is better. Ubuntu comes with the soundtouch library:
Soundtouch
which will probably do everything you need with a bit of luck.
__________________
Stuart

The golden age is always yesterday - Asa Briggs
bluepilot is offline  
Old 20th Jun 2018, 10:23 am   #26
Trigon.
Hexode
 
Trigon.'s Avatar
 
Join Date: Jun 2018
Location: Buckinghamshire, UK.
Posts: 382
Default Re: Heavy maths? Sample rates and pitch shifting

In Audacity 2.2.1 there is effect named 'Sliding Time Scale/Pitch Shift':-

Sliding Time Scale / Pitch Shift... allows you to make a continuous change to the tempo and/or pitch of a selection by choosing initial and/or final change values.

Tempo changes made without selecting a pitch change preserve the original pitch, and pitch changes made without selecting a tempo change preserve the original tempo. By changing only one of tempo and pitch and choosing the same initial and final value, you can use Sliding Time Scale / Pitch Shift in the same way as Change Tempo or Change Pitch to produce a high quality fixed change. However Sliding Time Scale / Pitch Shift lets you for example set the initial tempo change to -50% while also setting the final tempo change to +20%, the initial pitch change to +3 semitones and the final pitch change to +1 semitones.
Because of the high quality algorithm used, Sliding Time Scale / Pitch Shift is normally slower compared to performing the same effect with Change Tempo or Change Pitch.


I haven't tried it, but it might seem applicable ?

Cheers

.
Attached Thumbnails
Click image for larger version

Name:	Audacity.png
Views:	40
Size:	9.5 KB
ID:	164918  
Trigon. is online now  
Old 20th Jun 2018, 12:19 pm   #27
GMB
Dekatron
 
GMB's Avatar
 
Join Date: Aug 2003
Location: near Reading (and sometimes Torquay)
Posts: 3,086
Default Re: Heavy maths? Sample rates and pitch shifting

Quote:
Tempo changes made without selecting a pitch change preserve the original pitch, and pitch changes made without selecting a tempo change preserve the original tempo.
That suggests it is doing quite complex transforms and unlikely to optimise this simple case. I think the simple approach of resampling at a rate that continuously changes is what is needed, and I doubt there will be any need to do more than simple linear interpolation.

Try it and see.
GMB is offline  
Old 22nd Jun 2018, 9:45 am   #28
Trigon.
Hexode
 
Trigon.'s Avatar
 
Join Date: Jun 2018
Location: Buckinghamshire, UK.
Posts: 382
Default Re: Heavy maths? Sample rates and pitch shifting

Taking a closer look at Audacity, it turns out there is an even simpler function available which uses a 'timing envelope'.

A Time Track is used in conjunction with one or more audio tracks to progressively increase or decrease playback speed (and pitch) over the length of the audio. Speed changes are controlled by manipulating the blue "time warp" line with the Envelope Tool used for making gradual volume changes. If the blue line is dragged above the horizontal, the audio plays faster; if dragged below, it plays slower.

The algorithm is clearly very much simpler, so much so that it allows you to adjust the envelope and play back the result immediately, rather than suffer the lenghy processing time of the scale/pitch effect.

So, add a 'time track', set the range of adjustment and a linear scale, and fix the start end end values... listen to the result, adjust to taste - job done!

Cheers

.
Trigon. is online now  
Old 23rd Jun 2018, 9:14 pm   #29
jamesperrett
Octode
 
Join Date: May 2007
Location: Liss, Hampshire, UK.
Posts: 1,870
Default Re: Heavy maths? Sample rates and pitch shifting

Quote:
Originally Posted by julie_m View Post
Correcting wow and flutter on CLV recordings would be nice. It did occur to me; and I probably could do it, if I could get a good "fix" on any mains hum present in the recording.
Sounds like you are trying to achieve something similar to Jamie Howarth's Plangent Process. There's a paper at

https://docs.wixstatic.com/ugd/2aa44...d1390c2067.pdf

which explains the idea. The bias signal is probably the best reference but this would require some specialist kit in order to extract it.
jamesperrett is online now  
Closed Thread

Thread Tools



All times are GMT +1. The time now is 9:33 pm.


All information and advice on this forum is subject to the WARNING AND DISCLAIMER located at https://www.vintage-radio.net/rules.html.
Failure to heed this warning may result in death or serious injury to yourself and/or others.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright ©2002 - 2023, Paul Stenning.