Showing posts with label audio. Show all posts
Showing posts with label audio. Show all posts

Monday, September 20, 2010

Console Record Player Retrofit

I apologize for the long gap between posts; most of my work has been proprietary recently, so there's not too much to share on the blog.

Therefore, I'm presenting a personal project: a retrofit of a late-1960s era cabinet record player. It's a Fleetwood model 4057, made in Montreal, serial 283. It came complete with AM and shortwave radio, record player and tape input, powered by a tube amp rated for 117 V, 0.95 A at the input. I believe these units were retailed by Sears. The guts were all removed and replaced by a modern turntable, digital music player, amplifier and controller.

Cabinet

Before the retrofit, the unit lights and tubes lit up. On radio, it crackled when you adjusted the volume but couldn't be tuned to any station. The record player wouldn't rotate and no sound was produced when the record was turned by hand. So the radio/amp was removed and sent to the tube amp hospital and the record player went to the morgue.

Tube Amp and Turntable Guts

Tube Amp

Turntable and Radio

The first step in the retrofit was to replace the record player shelf as it had a large cutout for the sunken turntable. I took this opportunity to add some vibration isolation. I expected structural feedback to be a significant problem because the speakers and turntable are mounted in the same unit, as opposed to satellite speakers. Thus, the turntable shelf was designed to be a massive vibration isolator. The shelf is constructed of a wood frame with hardboard top and bottom panels, filled with sand.

Isolation Platform

Isolation Platform

The turntable was replaced with a Stanton T.80 turntable, capable of digital S/PDIF output.

Turntable

Next: digital music. Digital music is played by a VIA Epia M10000 mainboard. This is a small form-factor (Mini-ITX) low-power computer. It's a bit underpowered for video, but is perfect for a mp3 and internet radio player. I've installed Ubuntu server and use VLC as a media player, controlled either over SSH or with its web interface.

Amplifier

The amplifier is an older Sony, purchased second hand for cheap. It sits in the centre cabinet. The computer provides one analog input and the turntable provides a digital input. The integrated speakers mean that the speaker cables need not be flexible after installation, so I used solid 12-gauge residential electrical cable ($1/foot at Rona for essentially no resistance and no chance of phase distortion from complex impedance). The original speakers (12-inch woofer and tweeter) haven't been replaced yet (and may not be).

Left Speaker

Right Speaker

Since the amp is mounted in the belly of the cabinet, the remote no longer works. I worked around this by using a microcontroller to relay the IR remote signals. There is an IR sensor behind the cloth of the right speaker, which is processed by an ATMEGA168 microcontroller. Signals destined for the amplifier (Master Volume, etc) are repeated on an IR LED temporarily taped to the amplifer's remote input. Signals that target the digital music player (track forward, etc) will be passed to the computer over USB (this functionality is not done yet). The USB link will also allow one to control the amplifier over the network. A preamp and mixer will use digital pots driven by the microcontroller to adjust the relative levels and tone of the turntable, digital music player and an aux input. This function is not yet operational, but I can dim three leds using the remote. All of this is being prototyped on an Arduino board since it has USB connectivity and there is a nice library of IR remote functions (written by Ken Shirriff).

Fake remote

So how does it sound? I haven't done any acoustic analysis yet and I hate audiophile-style subjective reviews, but, to my ears, it sounds really good, especially considering the vintage speakers. There is no discernible distortion at normal listening levels (as long as I remember to set the soundcard gains to avoid digital clipping).

Unfortunately, my massive sound isolator is not super effective. At high gains there is a 94.1 Hz feedback that can be eliminated if I put all my weight on the cabinet. This frequency corresponds to a 10.6 ms delay (assuming there is no signal phase changes) which at a sonic speed through wood of 3300 m/s would require a signal path of 35 m, clearly much longer than the size of the console. This leads me to believe there is a significant delay in the turntable's analog to digital conversion process. Perhaps switching to the analog output (with presumably no delay) will solve this problem, although it may just move it to a higher frequency. Alternately, the solution may be to reduce the coupling between the cabinet and the turntable shelf. The shelf is a relatively tight fit so the effective spring between the console and the shelf is relatively stiff. I plan to modify the shelf mounting so that it has no solid contact with the cabinet, being suspended on acoustic foam or a semi-liquid like acoustic caulk or Blutack.



Next: performance characterization and speaker optimization.

Edit 20/09/2009: I almost forgot to mention that I plan to host a session on microcontrollers at Bar Camp Saskatoon.

Wednesday, August 6, 2008

Lowest Common Mulitple of Periods within an Octave

In digital signal processing, it is sometimes required that one calculate the lowest common multiple of a number of periods. For example, imagine we have two sine waves with periods of 6 and 8 samples, and wish to calculate the discrete Fourier transform to determine the phase and amplitude of these two frequencies. Since the DFT assumes that the wave is periodic, we should use a DFT length of 24, the lowest common multiple of 6 and 8.

I came upon the inverse problem when designing a system to generate square waves, which would be analyzed with a DFT. However this problem had a further constraint, I needed to avoid interfering harmonics. A square wave has odd harmonics of the fundamental frequency. That is, for a 1 Hz square wave, there will be components at 3, 5, 7, ... Hz. In order to avoid interference between frequencies, I needed to find the shortest DFT length k that was a multiple of N periods, where the ratio of the largest and smallest periods was less than 3.

It took a bit of time to brute force the problem, so I'll include the results here:
N=3 k=12 p=[ 2 3 4 ]
N=4 k=60 p=[ 2 3 4 5 ]
N=5 k=120 p=[ 4 5 6 8 10 ]
N=6 k=240 p=[ 8 10 12 15 16 20 ]
N=7 k=360 p=[ 8 9 10 12 15 18 20 ]
N=8 k=720 p=[ 8 9 10 12 15 16 18 20 ]
N=9 k=840 p=[ 14 15 20 21 24 28 30 35 40 ]
N=10 k=1680 p=[ 14 15 16 20 21 24 28 30 35 40 ]
N=11 k=2520 p=[ 24 28 30 35 36 40 42 45 56 60 63 ]
N=12 k=2520 p=[ 24 28 30 35 36 40 42 45 56 60 63 70 ]
N=13 k=5040 p=[ 28 30 35 36 40 42 45 48 56 60 63 70 72 ]
N=14 k=5040 p=[ 28 30 35 36 40 42 45 48 56 60 63 70 72 80 ]
N=15 k=10080 p=[ 56 60 63 70 72 80 84 90 96 105 112 120 126 140 144 ]
N=16 k=10080 p=[ 56 60 63 70 72 80 84 90 96 105 112 120 126 140 144 160 ]
N=17 k=15120 p=[ 48 54 56 60 63 70 72 80 84 90 105 108 112 120 126 135 140 ]
N=18 k=25200 p=[ 60 63 70 72 75 80 84 90 100 105 112 120 126 140 144 150 168 175 ]
N=19 k=27720 p=[ 55 56 60 63 66 70 72 77 84 88 90 99 105 110 120 126 132 140 154 ]
N=20 k=30240 p=[ 96 105 108 112 120 126 135 140 144 160 168 180 189 210 216 224 240 252 270 280 ]
N=21 k=50400 p=[ 120 126 140 144 150 160 168 175 180 200 210 224 225 240 252 280 288 300 315 336 350 ]
N=22 k=55440 p=[ 60 63 66 70 72 77 80 84 88 90 99 105 110 112 120 126 132 140 144 154 165 168 ]
N=23 k=55440 p=[ 60 63 66 70 72 77 80 84 88 90 99 105 110 112 120 126 132 140 144 154 165 168 176 ]
N=24 k=83160 p=[ 105 108 110 120 126 132 135 140 154 165 168 180 189 198 210 216 220 231 252 264 270 280 297 308 ]
N=25 k=110880 p=[ 120 126 132 140 144 154 160 165 168 176 180 198 210 220 224 231 240 252 264 280 288 308 315 330 336 ]
N=26 k=110880 p=[ 120 126 132 140 144 154 160 165 168 176 180 198 210 220 224 231 240 252 264 280 288 308 315 330 336 352 ]
N=27 k=166320 p=[ 210 216 220 231 240 252 264 270 280 297 308 315 330 336 360 378 385 396 420 432 440 462 495 504 528 540 560 ]
N=28 k=166320 p=[ 210 216 220 231 240 252 264 270 280 297 308 315 330 336 360 378 385 396 420 432 440 462 495 504 528 540 560 594 ]
N=29 k=166320 p=[ 210 216 220 231 240 252 264 270 280 297 308 315 330 336 360 378 385 396 420 432 440 462 495 504 528 540 560 594 616 ]

Now, while the square wave has no even harmonics, these harmonics can be generated by non-linear processes, such as the saturation of vacuum tubes. So the same analysis was performed, constraining the ratio of the maximum and minimum periods to be less than 2 (or within one octave). Here are the results:
N=3 k=60 p=[ 3 4 5 ]
N=4 k=180 p=[ 9 10 12 15 ]
N=5 k=720 p=[ 8 9 10 12 15 ]
N=6 k=840 p=[ 20 21 24 28 30 35 ]
N=7 k=2520 p=[ 35 36 40 42 45 56 60 ]
N=8 k=2520 p=[ 35 36 40 42 45 56 60 63 ]
N=9 k=5040 p=[ 35 36 40 42 45 48 56 60 63 ]
N=10 k=10080 p=[ 56 60 63 70 72 80 84 90 96 105 ]
N=11 k=15120 p=[ 70 72 80 84 90 105 108 112 120 126 135 ]
N=12 k=27720 p=[ 55 56 60 63 66 70 72 77 84 88 90 99 ]
N=13 k=27720 p=[ 55 56 60 63 66 70 72 77 84 88 90 99 105 ]
N=14 k=55440 p=[ 55 56 60 63 66 70 72 77 80 84 88 90 99 105 ]
N=15 k=83160 p=[ 165 168 180 189 198 210 216 220 231 252 264 270 280 297 308 ]
N=16 k=83160 p=[ 165 168 180 189 198 210 216 220 231 252 264 270 280 297 308 315 ]
N=17 k=110880 p=[ 198 210 220 224 231 240 252 264 280 288 308 315 330 336 352 360 385 ]
N=18 k=166320 p=[ 165 168 176 180 189 198 210 216 220 231 240 252 264 270 280 297 308 315 ]
N=19 k=221760 p=[ 252 264 280 288 308 315 320 330 336 352 360 385 396 420 440 448 462 480 495 ]
N=20 k=277200 p=[ 264 275 280 300 308 315 330 336 350 360 385 396 400 420 440 450 462 495 504 525 ]
N=21 k=332640 p=[ 198 210 216 220 224 231 240 252 264 270 280 288 297 308 315 330 336 352 360 378 385 ]
N=22 k=360360 p=[ 252 260 264 273 280 286 308 312 315 330 360 364 385 390 396 420 429 440 455 462 468 495 ]
N=23 k=554400 p=[ 264 275 280 288 300 308 315 330 336 350 352 360 385 396 400 420 440 450 462 480 495 504 525 ]
N=24 k=720720 p=[ 504 520 528 546 560 572 585 616 624 630 660 693 715 720 728 770 780 792 819 840 858 880 910 924 ]
N=25 k=720720 p=[ 504 520 528 546 560 572 585 616 624 630 660 693 715 720 728 770 780 792 819 840 858 880 910 924 936 ]
N=26 k=720720 p=[ 504 520 528 546 560 572 585 616 624 630 660 693 715 720 728 770 780 792 819 840 858 880 910 924 936 990 ]
N=27 k=720720 p=[ 504 520 528 546 560 572 585 616 624 630 660 693 715 720 728 770 780 792 819 840 858 880 910 924 936 990 1001 ]

So, for example, the period of the shortest repeating waveform with 12 frequencies within an octave is 15120. If we allow frequencies up to the 2nd harmonic of the lowest frequency, the shortest period is 2520.

Tuesday, July 22, 2008

Forest Reverb Model


For your auditory pleasure, Travis Wiens and Nutaksas Research are pleased to announce the release of a Forest Reverberation Modeller. This package of Matlab functions allows you to simulate the impulse response of an arbitrary forest of any number of trees of any size at any location, as well as source and listener lcoations.
Based on Morse's theory, each tree is treated as an acoustically hard cylinder and the effect of each path from source to receiver via any number of trees is calculated. The maximum number of scatterings may be limited to cut down on excessive calculation times.
The idea was based on Kyle Spratt's Treeverb proposal, although it was developed independently and gives different results.
Download the code from Matlab Central File Exchange, and feel free to check out the other files available. Watch this space for a more technical description.