Translate

2021-01-16

Audacity, removing glitches from a sound track (the easy way)

 I found a collection of files in my archive I didn't know how to handle. I'm not into music editing so, no wonder. One thing I know is that sounds, shorter that 5ms, is not possible to hear.



This version of Ubuntu (20.04) displayed headphones as icons for some of the so I started Audacity to see if I could find out their heads and tails. They showed up as a whole CD by the "Klematics". Nice.
Checking what's in the files, you will get the idea why.

I noticed, when playing it that there were some glitches, when listening they sounded like a click. I thought I would try to get rid of them. I din't rally know how these glitches came about but  think i'ts reasonable to think they they just might be where the separate parts are... parted, but on the other hand.. well, I'll be content by finding them and fixing them.

I found that to zoom horizontally you could left click the fields to the left of the graphs. The middle say "0"  it says "0.5" etc. Left clicking got you a looking glass and right clicking expanded the graphs vertically up or down depending on where you clicked. This wasn't what I needed, I wanted to expand then horizontally. I found that Ctrl-1 and Ctrl-3 expanded respectively shrank them horizontally. Perfect!

Now I needed to find the glitches. First I used a high degree of expansion horizontally. To move the graphs sideways I needed to use the scroll-bar below. Grabbing the slider, the movement was too fast. Clicking in the "track" the slider was sliding in, made the slide go sideways one page at a time, but! using the high degree of expansion resulted in so short pieces of the graph moving in sight I would probably still be sitting there clicking, getting a carpal tunnel syndrome.

It was reasonable to lessen the resolution to make more of the graph pass by at each click. After a while I thought I'd got the hang of it. I was on my way to eliminate the glitches.

Glitches may certainly look in many different ways, my glitches looked like this:




Putting the cursor on the glitch and doing Ctrl-1 one or more times made it it looked like this:


Expanding it even further (Ctrl-1), I could mark the area with precision (the expanded view is not the same glitch! Sorry, you will get the idea anyway):


Pressing the "Del" key on the keyboard removes the part that is highlighted, which is a bout 1ms in length. I can guarantee, you will not be able to distinguish it, even if 1ms of real music should have been deleted.
But; this poses the interesting (for nerds like me) question: If I could predict what should have been in the place of the glitch? Could I then replace it with a new part making the music perfect. Yes you can. 

You can mark any part of the graph, press Ctrl-c and then move to another location and Ctrl-v this part in place you've marked. Using the Ctrl-1 you can expand the graph to the level where you can see each single sample of the sound level, count them, find a new part of your liking, in the material, of the exact same size and copy it to your place of preference. I could copy the marked part to the part between 45:52:8930 and 45:51:30 where something seems a bit undecided, Like this:




In this image each sample is designated by a dot. I could then cut out a part of the graph of the exactly right size (number of dots) and replace the part where there seems to be no action, just after 45:51:8920. We're in the milliseconds here :0).

What the result would be, it's up to you (and me) practicing. A string, swinging sinusoidal, would be possible to predict, in real life... well, it depends.
It was a most interesting exercise, making me interested in more fiddling.




The Mighty Hard Drive (Diablo mod. 30, 2.5 Mb)

 When working for Data General we laid our hands on some old equipment and set up an old Nova2, 16 bit,  computer together with a Diablo 30 disk drive. The reason was that we had an industrial system at a paper mill that used such a system in their paper lab. They had another like it in the factory, both were using a teletype as input. 

The Nova2. Image from https://www.computerhistory.org/collections/catalog/X2067.2001
(pending permission)



The Teletype ASR33 (or KSR33) Image from https://www.eetimes.com/feast-your-eyes-on-my-asr-33-teletype-terminal/
(pending permission)

The one in the factory always was always oxidized, due to high levels of sulfur in the air, so to make the teletype work we often had to disassemble it so we could clean the copper plated disk that turned for each time you pressed a key. The signal was produced by a coal brush in contact with the the plating. If oxidized, the Teletype didn't work.

Back to the paper lab. The system was running RTOS 3.0 or something similar. From my standpoint then, this was a fossil. The "T" stands for "tape" and it's not magnetic tape, it means paper tape. Ouch!


RTOS, the paper tape Real Time Operating System

Normal proceedings were to put a disk cartridge with test programs in the drive and press "Program Load". It didn't work so I connected my cassette recorder to the backplane and entered the program load code sequence via the front panel switches an ran my programs from tape, CPU test, memory test, a disk test on an empty disk etc. Then I inserted the production disk, pressed "Program Load" and saw that the computer was running as usual. Well, the lämps were lit. When finished, I left the mill after a telephone call to the guys who were my contacts, and went back to my office.

After a year or so, I heard they had had problems with the system, they had no backup, nobody knew how to repair the system because it was so old. They really worked hard, I was told, and in the end succeeded to get it running again. At the time I didn't think more about it, there were problems of more immediate nature to solve.

A couple of years later I had to return to this system and this time I checked my test disk to be sure it was OK before the service trip. I worked OK in our office. Then I went there again. Strangely my own test program disk didn't work this time either. I got really suspicious, I remembered the last time I was there. So I ran the usual tests from my cassette recorder, again, including the disk tests on an empty disk, inserted their production disk, called the system guys and went home.

This time though I sat down with my own system and a disk editor to try to see what really was on the disk, making it useless. The first track was just crap! "¤T¤T¤T"... round the whole track. I realized, the program load chip was shot in the machine, instead of booting, it wrote random characters on the first track. It was only necessary to drop a "1" in the instruction to "read" to make it an instruction to "write".

 I immediately called one of my contacts at the mill, thinking they'd think it was a nice thing to know that their CPU's program load ROM was bad. No way. They accused me for running disk tests on their production disk and would not listen to my explanation. I thought these guys were tech savvy and that they immediately would get the context, but no. I can only say, we had a serious falling out. I did not accept being called a liar, not even by my customers. I never went back there again. I told them i'd rather get fired from my job. That was the last I saw of these idiots.

The Diablo is a nice piece of machinery, though it didn't fit very well into the line of computers Data General made. It was an early phenomenon, before DG started their factories fully, I guess they just found this general purpose equipment and used it. They had to construct a 19" chassis and a controller board plus the powers supply to serve it, which made the complete working product rather unwieldy and space consuming. Rack space was expensive and the marginal cost to get a new rack just because of this adapter seemed to me rather unappetizing feature when trying to sell it. That aside, I liked the drive. 


The disk is inserted from the left. The green area around the spindle contained a magnet, actuated by the drive at some time in the start up or loading sequence, holding the disk in a steady, non slip grip.



Tracks indicated in the round PCB, heads to the left (metal+yellow)



Head assembly from the side

 The heads were moved over the disk by a stepping motor, the tracks are clearly marked on the green, round PCB at the right and the sectors were hard coded on the disk cartridge's underside by little slits in the metal. One can be seen in the image below.


Disk cartridge, 2.5Mb


Disk cartrigde marked "Dkinit 810626". That means: Formatted and checked for errors, a very long time ago.

When it's been running for some years the spindle motor roller bearings were worn and you could easily hear it, when running. The customer then had to send it to DG for repair, DG sent it to England to the factory, they changed  the bearings, returned it and the customer got it back. This amounted to £800.
A lot of money for a couple of bearings. 

I bought a couple from a car spare retailer for almost nothing and changed them myself at the office, tested the disk and sent it to the customer. DG still invoiced £800. Roughly converted to today's value this would amount to Eur. 6000. No surprise, DG wanted at least Eur. 25000 (then!) for a 96Mb disk, a few years later. The computer industry was rather profitable. I also left it's mark in my salary. These earlier years, working for DG, I never felt any pecuniary pressure at all. It got worse later after the market was restructured in the middle of the 1980:s