Notes on the Minolta SR-1 (Model A)

The SR-1 is a model of 35mm film SLR camera made by Minolta (Chiyoda Kogaku) from 1959 onwards. It was the second SLR that Minolta released. As was typical at the time, their first was a more expensive model, the SR-2 in 1958, which they then cut down for a  cheaper alternative by removing the fastest shutter setting1. The resulting SR-1 remained in production for the next 12 years, but with incremental changes, which mean that the designation SR-1 actually covers at least five different models.

This first SR-1, unofficially the SR-1 model 1 or model A, is — in its style — surely the finest looking 35mm SLR camera ever made.

In 1962 Minolta spoiled its good looks by adding an industrial-looking bracket on the front for an optional light meter, and in 1965 they redesigned the body in an altogether squarer style. Later models are far more common, at least in the UK, and there is not so much information online about the earlier ones.

Early SR-1s still say SR 2 beneath the bottom plate.

This article hopes to remedy that. Read on for everything I could learn about the workings of the SR-1 model A.

Given the similarity of the two cameras, this probably almost all applies to the SR-2 as well, although actual SR-2s are expensive enough that I’m not sure I would dare to open one.

Standard disclaimer

This is all just the findings of an amateur poking about and making notes. Please don’t follow anything I say and ruin your lovely camera.

This will be a very long article, and unlike my previous post, there’s no story arc for the contemporary reader — I did solve the problem that set me off on this chase, but I did it in a way that would have been unexceptional 50 years ago, and old hands will just tut at my ignorance. The expected audience for this post is pretty much me, re-reading it the next time I need to fix something.

Background

I bought an SR-1 (the one shown above) from a charity shop in non-working condition, thinking it would be nice to get to grips with the workings of a camera with no electrical components at all.

Its second shutter curtain ran very slowly and made a sort of zipper noise, and the shutter mechanism seized up after firing and winding it a few times. I later found other things wrong with it: the slow shutter speeds (1/4 second and slower) didn’t work, and there were various cracks and tears in the second shutter curtain, which needed to be replaced.

I tried to find a maintenance manual for it. I couldn’t find any freely available for download, so I looked around for copies for sale.

I tried a company that sells paper copies of old manuals; they listed two repair manuals for the SR-1, identified as “older version” and “newer version”. I emailed asking whether this referred to the version of the camera or of the manual, and they replied that they couldn’t tell me because they had lost the older one: it existed only on microfiche, to be digitised on demand, but their reader had broken down before anyone had ordered it.

I ordered the version of the manual they could supply; it turns out to cover the later boxy revision that shares a basic body style with the SR-7 model. It is gorgeous to look at, being a negative scan from microfiche of a manual with hand drawn diagrams:

I would happily hang the first of those pages on my wall. But that’s about all I can do with it, as there were a great many changes between the model I have and the one shown here. Fundamental differences in the picture above include:

  • In the picture, both sets of shutter curtain barrels and the whole timing gear are attached to the sides of the mirror box. In the earlier model, all of this stuff was attached to the diecast camera body, and the mirror box had the mirror mechanism and nothing else.
  • In the picture, the second shutter curtain and its tapes are guided directly around the first-curtain barrels. In the earlier model, the second curtain had separate guide pins and never touched the first-curtain barrels.

There are also many omissions, for example the page shown above is the only appearance in the manual of the slow-speed gear (parts numbered 2301-2327), and it’s drawn from below as a single unit so you can’t see any of the details.

Given the lack of an accurate manual, before diving in I bought a second camera of the same model in unknown condition to use as a reference. It was cheaper and in a worse state on the outside, and I had to beat out a dent in the top cover with a small hammer wrapped in a cloth before the winding lever turned smoothly, but otherwise it turned out to be in really good working order.

All of the photos that follow are of the first SR-1 I bought. Most are snaps taken beneath a task light during disassembly. In most cases I have used the same names for the parts as appear in the maintenance manual for the later SR-12.

Survey of features

The Minolta SR-1 model A is a mechanical single-lens reflex camera with pentaprism viewfinder, taking 35mm film and using interchangeable lenses with Minolta’s bayonet lens mount. It has a self-timer, a thread for a mechanical remote in the shutter button, and flash X and FP sync terminals. There is no light meter, no battery, and nothing electrical inside except the wires and contacts used for the flash sync.

It has a semi-automatic aperture (when used with Minolta lenses) and automatic mirror return. That is, focusing is done at fully-open aperture and then the lens stops down automatically to its selected aperture to take the photo; after taking, it doesn’t re-open until you wind on the film. The mirror however does return to its lowered position as soon as the photo is taken, so you can see through the viewfinder again immediately, just not at full aperture. As in any similar camera of the age, this is achieved through cunning arrangements of gears, springs, and levers.

The camera uses a horizontal-travel cloth focal-plane shutter with speeds from 1/500 to 1 second, selected using a dial that must be lifted up in order to turn it. There are three timing mechanisms: the slowest speeds use a governor mechanism with a clockwork escapement, intermediate speeds use the same governor but bypass the escapement, and fast speeds offset the second shutter by a measured distance from the first.

The SR-1 is made almost entirely of metal, weighing about 730g without a lens. It’s not that easy to take apart and work on, as the design is not particularly modular and it uses a large number of different slot-headed screws, but at least there’s no risk of shearing off any threaded pieces of plastic.

P7120012.jpg

In use, the camera is a little wide and heavy, not that easy to grip, and the pointy end of the metal winding lever can put a dent in your forehead. It’s prettier than it is ergonomic. The shutter and mirror are loud (being totally undamped) but with a satisfyingly crisp sound, and not heavy to operate. The viewfinder is bright and easy to focus with.

How to tell a Model A apart from later models

Referring to this page for the model types, the most obvious distinguishing feature is the speed selection dial.

If the speeds are unevenly spaced on the dial (as in the picture to the right), and you have to lift up the dial to turn it, then it’s a model A.

If the speeds are equally spaced and the dial turns directly with a satisfying click, but there is no mount point for a light meter on the front of the camera, then it’s a model B or C. These also have a chrome ring on the viewfinder eyepiece, where the A has a black one. I don’t know how to tell the difference between B and C from the outside.

If it has a mount point for a light meter on the front, then it’s a model D or later.

Top and bottom covers

The bottom cover is simply held on by two screws.

The top cover is more involved. These pieces must be removed before it can be lifted off:

PB290369.jpg

  • The rewind knob can be unscrewed by hand (open the film door and put a screwdriver across the film engagement fork to hold it still while unscrewing it), but there is a circular plate beneath it that ideally needs a tool such as a spanning wrench to unscrew.
  • The eyepiece is in three parts. The black ring is used to hold on the optional flash cold-shoe, and can be unscrewed by hand. The glass eyepiece in a chromed ring also “simply” unscrews, but I found it maddeningly hard to do — some grippy rubber material may help. The sealing ring then lifts off.
  • To remove the speed selection knob, loosen (but not so far as to remove) the three small grub screws set into its perimeter at regular intervals, then lift it off.
  • The shutter button surround can be unscrewed by hand, and the shutter button then lifts out. The brass ring holding the winding lever in place has notches for unscrewing using a spanning wrench again; once it’s gone, the lever lifts off.
  • Finally three screws hold the cover on.

Don’t mess with the exposure counter window: it’s attached to the top cover.

You can put the winding lever and its brass ring back on after removing the cover — not a bad idea for testing things. No need to put on the shutter button, as all it does is push down a small plate that is now accessible directly just behind the winding gear.

What’s under the top cover

sr1-top.pngThe viewfinder pentaprism is in the middle, beneath a black plastic cover, with the eyepiece next to it.

The parts on the right are organised onto two separate chunky metal plates, the speed change base plate and the winding base plate. In both cases the user-accessible controls are attached on top of the plate, and the gears that do the work are hidden beneath it.

The two plates’ mechanisms are separate, but are connected underneath by a pair of gears in a stack attached to the shutter button plate. You can just see a few of the teeth of one of these gears in the picture, above the exposure counter pulley. When the shutter button is pressed, the first thing that happens is that these gears are detached from one another, disconnecting the two plates, so that the winding gear is not involved in the shutter release action.

Neither plate is easy to remove and replace. The winding plate is easy to remove, but it takes some trial and error to replace it with the right orientations for the gears beneath. The speed change plate can’t be removed without detaching the lever at the top of the slow-motion axis, which I think then can’t be re-attached at the correct angle without access to the lever at the other end of the axis, which is down where the slow speed gear lives, under the baffle at the bottom of the mirror box.

What’s under the bottom cover

sr1-bottom

In this picture the tripod mount has been removed (it is screwed into the three larger holes arranged in a triangle in the middle), and so has the slow-speed gear within the camera, leaving its two attachment holes empty of screws.

Note that the ratchet gears and the attachment screws for their pawls (the little hooks that hold them in place) are threaded backwards — turn right (clockwise) to loosen, left to tighten. This makes sense visually for the pawls because turning left pushes the pawl against the ratchet through friction from the screw, which is what you want to happen. For the ratchets it just has to do with the direction the shutter curtains move.

I didn’t label the flash sync contact mounting block or contacts, which the green and white wires are soldered to. The contacts are attached to a small plastic block which is screwed to the shutter spring base plate at its left end, and directly to the diecast camera body at its right.

Front plate, lens mount, and leather wrap

To get at the mirror box, shutter curtains, shutter springs (but not their tensioning ratchet gears, which we saw above) and barrels, and self-timer, it’s necessary to go in through the front. This means peeling off the leather cover.

First remove the self-timer furniture from the front — the lever cover unscrews with a spanning wrench or similar, and the knurled knob can be unscrewed with small pliers — as well as the lens release knob at the top of the lens mount, which also just unscrews. The top cover of the camera overlaps the lens mount, so it has to come off as well before the front plate can be removed.

The leather is thin in comparison to later cameras, tears easily, and is well stuck down with both glue and tape. It’s not that easy to lift, and it wouldn’t stick back down again without new adhesive, but I did find the texture quite good at hiding mistakes afterwards.

The best bet seemed to be to go in with a small sharp flat-headed screwdriver where the leather meets the lens mount, dig in and lift, and keep chipping away underneath and gradually pulling the cover out as you go. The leather is stuck so tightly up against the lens mount that I was convinced at first that it must have been nosed in under it, but no, it does just sit on top.

The front plate consists of the entire lens mount and two metal “wings” either side of it, beneath the leather, one of which (in picture) has the self-timer attached to its back. The plate is held on by four screws, one at the top and bottom of each wing. Remove these and the front plate then lifts off.

(The two “inner” screws visible in the picture, close to the self-timer lever/switch attach points, hold the self-timer on to the front plate. The self-timer isn’t attached to anything behind it, only to the front plate, so these don’t need to be unscrewed to remove the front.)

When replacing the front plate, put it gently in place first and then press the shutter button a couple of times to make sure the self-timer lever settles into place in the cutout of the shutter release shaft (see picture under the self-timer section below) before trying to fasten it down. Don’t tighten the screws without being sure the self-timer lever is properly settled, or you might damage it.

Shutter speed selection

speed-control-settings

The speed control knob on top of the camera rotates a collar with a pin in it that pokes down through a hole in the plate beneath. The position of the pin is visible from the top of the collar, so the current speed can be read off even though the knob has been removed. The sketch to the right shows the speed corresponding to each position of the pin.

Under the speed control knob is a stack of three eccentric discs which rotate along with the speed setting, serving to set the positions of these three sprung control arms:

sr1-speed-baseThe shutter lever is engaged at fast speeds. It is sprung so as to push against the high-speed lever which is attached to the first-curtain gear, and it has a hook that keeps the second-curtain gear in place. At the appropriate point in the rotation of the first-curtain gear, it gets pushed aside, releasing the second curtain. The screw on top of the lever adjusts an eccentric which controls its sensitivity and thus the shutter spacing.

The slow motion axis is engaged at the slowest speeds. It communicates to the slow speed gear in the base of the camera that its escapement mechanism should not be bypassed.

The slow speed control shaft is used for intermediate and slow speeds. It communicates to the slow speed gear the extent of deflection to use and therefore how long to delay for.

Speed setting Shutter lever position Slow motion axis position Slow speed control shaft extent
B Engaged
500 Engaged
250 Engaged
125 Engaged
60 1/8 approx
X 1/8 approx
30 1/4 approx
15 1/2 approx
8 Engaged 1/8
4 Engaged 1/4
2 Engaged 1/2
1 Engaged Furthest extent

Slow speed gear

The slow-speed gear or governor is a self-contained module that lives beneath a black-painted metal baffle at the bottom of the mirror box. You can see it at the bottom of the picture above, which shows the landscape with the mirror box removed.

You don’t need to remove the whole mirror box to have a look at it — you can just take out the baffle. But I found I had to remove the pentaprism and focusing screen from the top of the mirror box before I could get a screwdriver in vertically enough to undo the two screws at the front that hold the baffle in place.

Slow-speed gear module

The purpose of the slow-speed gear is to allow a lever to rotate a certain extent and then be returned by a spring to its original position, at a speed controlled by an escapement mechanism. In the picture on the right, the lever that is being controlled is engaged with the sprung wheel on the left side, and the escapement consists of the star gear and pallet on the right side. The inertia of the pallet determines the speed at which the wheel is allowed to return to the position set by its spring. An additional lever on top of the module optionally pushes the pallet away entirely, removing this control and allowing the mechanism to run much faster.

Two vertical shafts, visible in the picture at the top of this section, connect the slow-speed gear to the speed control mechanism above. These are referred to as the slow motion axis and the slow speed control shaft. The slow motion axis (the right-hand one of the two in the picture) has the job of pushing the lever on top of the slow-speed gear that deactivates the escapement mechanism for faster speeds. The slow speed control shaft (on the left) is the one that is controlled by the slow-speed gear, being pushed out to an extent fixed by the speed setting and then allowed to return when the shutter is fired. See the following section for more about how these are set for the different shutter speeds.

In my camera the slow-speed gear initially didn’t work, it just got stuck. I removed it, air-dusted and brushed it, and applied a pinpoint of sewing machine oil to the outside ends of the bearings, which was enough to get it moving again. (I believe one doesn’t oil the gears themselves, in a clockwork mechanism.) The escapement runs correctly now, but the intermediate shutter speeds with the escapement disengaged are a bit too fast, so perhaps oiling the bearings was a bad idea too. Though I’m puzzled by how the mechanism is ever expected to time anything accurately in the case when it doesn’t have the escapement engaged. Comments welcome.

Winding gear

Beneath the winding base plate

The base plate which the winding lever attaches to is, unsurprisingly, the winding base plate. The winding lever itself is fixed to the top of a sprung rotating cylinder with a stay at the return point, and this drives the gearing below the plate. I believe the only purpose of the spring in the cylinder is to make the lever flip back when you let go of it.

Winding the lever turns the film advance spool, and also turns the first and second curtain gears, pulling the shutters across to this end of the camera against the pull of the shutter springs at the other end.

Since the shutter curtain gears must spin back again when the shutter is fired, there has to be a mechanism to decouple them from the winding gear while the shutter button is pressed. This consists of a stack of two linked gears, shown in the picture.

The gear sitting at the front of the picture has a hole in it, and it goes on top of the slightly smaller gear just left of centre in the picture — which gets pushed down when the larger gear is added, so that it engages with the winding gear on the right.

This smaller gear has a pin that fits the hole in the larger, so that the two gears normally turn together. The smaller gear is driven from the winding gear, and the larger then drives the gears on the left. When the shutter button is pressed, the smaller gear is lowered and detaches from the larger, leaving the larger one free to spin without any connection to the winding gear.

The small gear also has a cutout in the bottom (not visible here) which fits over the head of a screw jutting from the camera body. The gear can only be lowered when this cutout is aligned over the screw. That’s what prevents the shutter button from being pressed before the film has been fully wound on. It also prevents the winding lever from turning while the button is pressed.

In hindsight there was no good reason other than ignorance and curiosity for me to remove this plate. There were no faults here, the actual fixes I ended up making didn’t require it, and it took some trial and error to fit again. To do so, make sure the small gear is oriented so that the button can be pressed, then fit the larger one over it, push the plate over, and screw down — but it took me several tries before I got the angle of rotation just right so that the shutter could be wound and fired again without jamming because the cutout in the lower gear hadn’t been properly aligned over the screw head.

(It’s also necessary to make sure the disc at the other end of the winding gear, on the bottom of the camera, is at the correct point in its phase of rotation before replacing the winding plate. That is, the pin that pushes the winding charge plate needs to be at roughly the angle shown in the picture at “What’s under the bottom cover” above.)

Shutter firing order

  1. Shutter release shaft

    The shutter release shaft is pressed down, either by the shutter button or by the self-timer lever.

  2. At the top of the camera, lowering the shutter release shaft disengages the winding gear from the transmission and makes space for the fast-speed shutter lever to move in against the first curtain gear if an appropriate speed is selected.
  3. At the bottom of the camera, the pointed end of the shutter release shaft pushes aside a lever that releases the aperture slider at the base of the lens mount, allowing the aperture on the lens to spring closed.
    This picture shows the aperture slider in its cocked position, with the various levers around it. (Cocking the slider is done by the thing I have labelled the winding charge plate, which pushes it along during winding until it latches as below.)
  4. sr1-bottom-detailThe travel of the aperture slider trips a catch I have labelled the mirror lever catch, which holds back the mirror lever on the side of the mirror box. This releases the mirror, which is sprung so as to flip into the upward position.
  5. The gears that control the first and second shutter curtains: first on top, second beneath

    At the end of its travel, the mirror lever strikes a lever I have labelled the shutter trip lever, which I believe is connected to the transmission shaft (this is one part I haven’t actually uncovered). This releases the first curtain gear, firing the first shutter curtain and releasing the slow speed control shaft to begin the slow timer if appropriate.

  6. The first curtain gear spins back to its un-cocked position as the first shutter moves. If a fast speed is selected, then the high-speed lever attached to it pushes aside the shutter lever at the appropriate moment, releasing the second-curtain gear and firing the second shutter curtain. Otherwise it has to wait until the slow speed control shaft has finished its travel.
  7. Mirror kick gear

    At the other end of the second curtain, there is a gear at the bottom of the curtain spring barrel, which rotates the mirror kick gear next to the base of the mirror box. At the end of its rotation a pin on it knocks the mirror hook aside, reversing the direction of spring for the mirror operation lever and pulling the mirror back into lowered position.

Most of these steps are triggered by the completion of the prior step, so guaranteeing that the timing works out. For example, the shutter can’t normally open before the mirror has flipped up, because it is triggered by the mirror lever itself at the end of its travel. But there are some minor timing-related weaknesses:

  • There is no means of synchronisation with the lens aperture itself, only with the aperture release slider. If the aperture takes too long to close, it may be still closing when the shutter begins to travel. This can happen with some lenses whose aperture blades tend to get oily. Yes I mean you, Minolta W.Rokkor-HG 35mm f2.8.
  • It is just possible to press and release the shutter button so quickly that the winding gear (disengaged in step 2) has re-engaged before step 5 is reached, preventing the transmission gears from turning and leaving the mirror flipped up but the shutter still closed. Pressing the button again will fire the shutter and complete the process.
  • The winding gear is re-engaged at the end of the first shutter’s travel in step 6; it doesn’t wait for the second shutter. So there is nothing preventing you from winding the film on in the middle of a long exposure.

Some of the working of this depends on the angle at which the eccentric control that I’ve labelled the mirror lever catch eccentric is set. This is partly hidden by the tripod mount and is shipped with its adjustment screw secured with a blob of shellac to prevent it from coming loose. If this is wrongly set, then either the mirror lever won’t hook up on winding (so the mirror will remain up and the viewfinder will be useless) or the mirror lever won’t reach the shutter trip lever (so the shutter button will close the aperture and flip the mirror, but not fire the shutter).

Pentaprism and viewfinder

The pentaprism (see the middle of the “under the top cover” pic earlier) is held on by two springs hooked over screws on the sides of the mirror box. Unhook the top ends of these, and you can lift off the plastic cover and pentaprism. Then three screws around the edges release the focusing screen.

(The manual I have suggests that you can take the whole thing off by unscrewing the screws without unhooking the springs first — that’s definitely not true for this model. If you try it, you’ll find the screws very hard to put back in.)

I don’t have a photo of any of these bits, as I forgot immediately picked them up with a cloth and put them in a box to avoid getting fingerprints on them. I should have taken some, because both of my cameras showed a typical problem: corrosion of the mirror coating of the pentaprism where the dust seals were glued on to it. The result is a rough dark line across the bottom of the image as you look into the viewfinder.

As far as I can learn, there is no way for an ordinary person to re-silver a mirrored prism like this. I left the less seriously damaged prism from the two cameras alone, and in the other one I scraped off the thin corroded strip of silver (making that part transparent) and then wrapped a strip of aluminised plastic, cut from the inner wrapper of a pack of tea-bags, around it to add a bit of reflection. There is no problem so serious that it cannot be mitigated by a good cup of tea. The result is much less intrusive in the viewfinder than it was, making the bottom part of the image vaguely accurate in colour rather than solid black, but it isn’t possible to see detail there and it wouldn’t work at all for damage in the middle of the frame.

Exposure counter

This is nudged along by a hook drawn by a pulley connected to the winding gear on the other end of the camera. The counter is sprung so as to return to zero, but it is on a ratchet and is latched under pressure from the camera back while the back is closed. When the back of the camera is opened, the counter springs to zero.

The thin aluminium surround on top of the counter is easily bent and I suspect could snap, so it seems like a good idea to unscrew it when working on the camera for any length of time. There are a couple of hazards, though.

The first is that the surround, or the washer beneath it, holds the counter down on its axis. If you remove it and the counter gets lifted up too far, there are two different rotations in which it can be pushed back down — the correct rotation, or 180° out from it — and under pressure of its spring it will prefer the latter. So if you find your counter is resetting to somewhere around 20 instead of to zero, that’s why: you need to lift it, rotate half a turn against the spring, and push it down again.

The other little problem is that I found this the most bizarrely troublesome screw to put back in in the entire camera. I don’t know why, it just doesn’t want to sit right.

Mirror box

There doesn’t seem to be a great deal to say about the mirror box, from my standpoint of ignorance, except to marvel at the lever and spring mechanism, which I imagine to be essentially the same as in all SLRs. The box is attached with four screws, two at the top by the eyepiece and two at the bottom (whose locations are marked in the “under the bottom cover” picture further up).

The two metal shafts also visible in the central picture above are the slow speed control shaft (top) and slow motion axis (bottom) of the slow-speed gear.

Note that after removing the mirror box you can no longer fire the shutter in the normal way, because the mirror lever on the side of the box is what triggers the shutter release. To fire the shutter, push the shutter trip lever on the bottom of the camera yourself while pressing the shutter button.

Flash sync contacts

Attached to one side of the mirror box is the little electrical contact board shown to the right, which provides the contacts for the flash X- and FP-sync terminals on the side of the lens mount.

The wires are soldered here and to a switch block on the base of the camera, passing through a small hole in the diecast body in between. This is a surprisingly frustrating arrangement, as the board gets in the way and can’t be removed without un-soldering and subsequently re-soldering it.

I tried to work without removing the board, then broke one of the wires near the contact point, gave up and removed it, didn’t have enough wire left to strip and re-solder, and so had to replace the wire as well. I found the data cores of a USB cable to be a good replacement, with the proper insulation colours (green and white). Of course you have to feed the wires back through the hole before you can solder the ends on, so you’re waving your hot iron rather close to the camera. I am not a confident solderer and had hoped to avoid soldering with this project, but no such luck.

This is the only part of the job that I haven’t tested — I see no reason why it shouldn’t work after being rewired, but I don’t know for sure. If it doesn’t, I think I would probably rather not know.

Shutter curtains and barrels

The cloth focal-plane shutter consists of two opaque fabric curtains with tapes attached to revolving barrels at both ends. With the shutter cocked, the first curtain covers the film. When the shutter is fired, the first curtain is pulled aside to expose the film, and then the second curtain follows it to cover up the film again.

The barrels at the rewinding end of the camera are metal with a central spring, and it is these springs that power the motion of the shutters and consequently everything else about the shutter firing sequence. I’ve read that it’s common for the springs (or the grease they are packed with) to seize up through age or disuse, but this wasn’t a problem in either of the cameras I have.

The picture on the right shows the spring barrels with the shutter cocked. The first shutter’s barrel is on the left. Its cloth is glued to this barrel, and it has tapes glued to the un-sprung barrel at the other end. The second shutter is the other way around: its cloth is glued to the barrel at the other end, with tapes attached to this one.

The spring barrels can be accessed by removing the cover plate on the bottom of the camera. This is fiddly and means losing the spring tension, so having to “re-program” the shutters afterwards by re-tensioning, but it’s necessary to do this as well as remove the mirror box if you want to actually take out either shutter curtain.

Here’s the other end, with the un-sprung barrels (seen from the top). These ones are plastic sleeves surrounding metal shafts, held in place by two screws that go all the way through the barrel. You can just about see one of those screws in this photo, where I’ve pulled the (old, cracked and torn) shutter cloth away from the barrel. The holes in the cloth are useful to insert a screwdriver and unscrew the screws to slide the central shaft out of the top of the camera and extract the barrel.

This picture shows the central shaft of that second curtain barrel, and the screws that attach the barrel to it.

The second shutter curtain also passes around two guide pins, which keep it away from the first curtain barrels. These are just to the “film side” of the first curtain barrels at either end. The pin at the spring end can be removed along with the spring barrels, but I couldn’t discover how to remove the other pin, and since the second curtain passes behind it, that means the only way I know to remove that curtain is to un-glue it from its barrels at one end or the other. (The tape end is easier.)

The curtains themselves are made of an inelastic fabric with some sort of opaque black paint-like finish. They don’t appear to have a separate coating layer.

Where the tapes meet the curtain cloth there is a rigid metal lath, formed from a thin strip folded in half around the end of the cloth and crimped and glued down. The tapes pass through slits in the ends of the lath, and are sewn to the cloth.

A detail of the original second shutter curtain is shown to the right.

I needed to replace the cracked and torn second curtain, so I ordered new cloth, tapes, and glue from Aki-Asahi. The cloth (silk with an opaque rubber coating on one side) is more flexible than the old and feels very high quality, though it’s also a little more elastic even when cut with the warp. I cut it to size, glued and sewed the tapes down at the corners, then prised the lath off the old curtain and wrapped, glued, and crimped it with pliers. Here it is being glued on to the plastic barrel, waiting for the glue to dry:

The result is visibly amateur in comparison to the original. I used a little too much glue, the lath is bumpy after being forcibly prised from the old one, and I left the curtain not lying completely flat when not under tension. Fortunately it’s not at all obvious when installed, and the shutter does actually run well, but I’d hope to do better next time.

Tuning the shutter speeds

Tricky this. After replacing a shutter you have to adjust everything. The tensions of the first and second curtain spring barrels affect the timings of all shutter speeds, and have to be both sufficiently accurate and sufficiently similar to one another. Then the slow speeds depend on those tensions and on how well the slow-speed gear runs, and the fast speeds depend also on the adjustment screw on the shutter lever.

I started out by setting the speed dial to B and adjusting the shutter spring tensions, using the ratchets at the bottom, until the shutter curtains seemed to be moving at similar-ish speeds to those in my reference camera. (They are supposed to traverse the width of the film negative in 1/60 second, about 13ms.)

I found the escapement-timed slow speeds were OK, but the intermediate speeds, using the slow speed gear without the escapement, ran too fast. I have no idea whether anything can be done about that.

Then I adjusted the screw on the shutter lever so as to get it to a good middle point. If this screw is turned too far one way, it makes the fastest speed (1/500) behave like bulb mode — the button opens the shutter and doesn’t close it until you let go. If it’s turned too far the other way, then the slowest of the fast speeds (1/125) does the same thing. There isn’t an enormous range in between, and I don’t know how much difference this control makes, so I just picked a point somewhere in the middle.

Then I happen to have a CRT TV among my apparently increasing collection of obsolete stuff, so I was able to use Rick Oleson’s method to test the fast speeds, using the spring ratchets to fix inconsistencies between the two curtains’ speeds (shown by the bright region being wider at one end than the other) or gross timing errors (bright region taking the wrong proportion of the whole field).

Self-timer

The self-timer is a cute little clockwork module that’s fun to operate and watch outside the camera. The arm winds the spring, the slider button releases it, and when it comes back to a point close to the origin, a lever pokes down the shutter release shaft to fire the shutter.

The picture on the right shows how the module sits within the camera and the position of its lever over the shutter release shaft, although in practice the module is attached to the front plate and is installed and removed with it.

The self-timer of course uses an escapement mechanism. I believe that, as in the slow-speed gear, the gears themselves should not be oiled, but a pinpoint of light oil on the outside ends of the bearings may be acceptable. Corrections welcome.

Dust and light seals

There are not that many of these — nothing in the film area and no mirror damper — and those there were in my camera had largely crumbled into a red dust which took quite a bit of cleaning out.

The main seals are a big wide one within the curved base of the lens mount, edge seals along the bottom edge behind the front cover, and edging around the top of the back of the mirror box. A 3mm thickness open-cell foam from Camera Light Seals seems like a fair replacement.

What the problems were with my camera, and their solutions

At the top of this article I listed the problems I had with this camera:

Its second shutter curtain ran very slowly and made a sort of zipper noise, and the shutter mechanism seized up after firing and winding it a few times. I later found other things wrong with it: the slow shutter speeds (1/4 second and slower) didn’t work, and there were various cracks and tears in the second shutter curtain, which needed to be replaced.

I’ll close with a breakdown of those, with what I think were their causes and the solutions:

Second shutter curtain ran very slowly and made a sort of zipper noise

Caused by friction in the running of the second shutter curtain gear, the lower of the two stacked gears in the picture to the right.

I didn’t get as far as working out how to remove these gears entirely for cleaning, but air-dusting them and squirting the underside of the lower one with light oil (then mopping up the excess) fixed this problem surprisingly quickly, for now at least.

Shutter mechanism seized up after firing and winding it a few times

I’m fairly sure this was just a consequence of the above. The shutter spring has to have enough energy to return the gears to their “home” positions; the friction was enough to prevent them from getting all the way there.

The slow shutter speeds (1/4 second and slower) didn’t work

Fixed by cleaning the slow-speed gear module and applying a tiny quantity of sewing-machine oil to the outer ends of its bearings.

Cracks and tears in the second shutter curtain

Fixed by replacing the second shutter curtain!

This goes something like the following. (I’m writing this from memory — wonder if I’m forgetting anything):

  1. Remove the eyepiece, top controls, top and bottom covers and the front plate; put the winding lever back on
  2. Unhook and remove the pentaprism, undo the screws holding on the focusing screen, remove the focusing screen
  3. Remove the baffle from the bottom of the mirror box (I can’t actually remember whether this is essential, but it’s fairly easy so might as well)
  4. Remove the tripod mount from the base, unscrew the fixing screws at bottom and top of the mirror box, and delicately ease out the mirror box (first unhooking the mirror lever from below, and removing the little metal screen to its left if it gets in the way)
  5. Detach the lever from the top of the slow motion axis and remove the speed control base plate
  6. Remove the two control shafts for the slow-speed gear
  7. Remove the four screws holding in the two shutter blinds at top and bottom of the shutter by the film window and detach the blinds
  8. Make a note of the positions of the screws threaded through the barrels at the un-sprung ends of the first and second shutter curtains when the shutter is not cocked, so as to replace them at the right rotations again later
  9. Loosen the pawls beneath the shutter spring barrels (losing their spring tension), undo the ratchet gears around the barrel ends, unscrew the retaining screws for the covering plate, and remove the plate with the mirror kick gear and guide pin
  10. Unscrew the two screws threaded through the barrel at the un-sprung end of the first shutter (the shutter whose barrels are closer to the film plane), pull out the central shaft for that barrel, and remove the whole of the first shutter curtain with both barrels still attached
  11. Unscrew the two screws threaded through the barrel at the un-sprung end of the second shutter, by poking a screwdriver through the holes in the second shutter curtain, and pull out the central shaft for that barrel. Observe that you can’t just remove the curtain because it runs behind a guide pin for which access is not obvious
  12. Detach the second curtain’s tapes from the spring barrel by lifting them away with a sharp tool, and remove the second curtain and both of its barrels
  13. Detach the second curtain from the unsprung barrel as well by lifting it away
  14. Obtain some shutter cloth and cut a rectangle of it to match the original, cutting along the warp of the cloth so as to have the least stretchy direction along the length of the shutter. (I think the rubbery coating should go on the lens side rather than the film side, though I didn’t find an authoritative source)
  15. Obtain some shutter tape and cut two lengths to match the originals; I think these can be a bit too long without problems, but not too short
  16. Prise the metal lath away from the original shutter curtain
  17. Glue the tapes to the corners of the shutter cloth using a contact adhesive (I had the Japanese Super-X glue) and allow to dry for a while
  18. Sew a small strong square of black cotton through each of the tapes’ contact areas (I did it by hand but you could do it with a machine if you knew how)
  19. Apply some glue to the very edge of the cloth, push the lath from the old shutter over the edge of the cloth, square it up carefully, and crimp it tight with pliers
  20. Glue the end of the curtain cloth to the un-sprung barrel following the positioning of the previous curtain, and let dry
  21. Re-fit and screw into place the un-sprung barrel of the second curtain, following the positioning noted before removing it earlier
  22. Make sure the second curtain is routed behind its guide pin, but don’t accidentally route it behind the nearby shaft from the shutter gears! I stupidly did this the first time and then had to un-glue it and fit it again
  23. Glue the tapes at the other end of the second curtain onto the spring barrel, matching the original positioning and being very careful not to get glue in the spring
  24. Re-fit and screw into place the un-sprung barrel of the first curtain, following the positioning noted before removing it earlier
  25. Introduce the two sprung barrels and the other guide pin for the second curtain into the appropriate holes in their bottom plate through their metal collars, ensure the mirror kick gear has the right orientation (as in the picture in the “Shutter firing order” section above, when the shutter is un-cocked) and screw down the plate
  26. Tighten the spring ratchets enough to pull the curtains tight and check their positioning and overlap (they should overlap by about the thickness of the lath)
  27. Test winding and firing the shutters — you’ll have to hold back the shutter trip lever yourself (see note in “Mirror box” above and picture in “Shutter firing order”) and there is no control over timing, but the shutters should work at this point
  28. Replace the blinds at top and bottom of the shutter area
  29. Replace the two control shafts for the slow-speed gear. The slow speed control shaft engages with the slot in the wheel, and the slow motion axis sits next to the lever end (see picture in “Slow speed gear” above)
  30. Replace the speed control base plate, put the lever back on the slow motion axis, and arrange it so that when it is pushed out by the appropriate cam on the speed control base, it pushes the lever on the slow speed gear so as to deactivate the escapement. Tighten the set screws on this lever
  31. Wind the shutter a little bit so as to move the pin on the mirror kick gear out of the way, then put the mirror box back in (may take some patience to get the mirror lever through the base properly) and screw down
  32. Replace the baffle at the bottom of the mirror box
  33. Replace the front plate
  34. Tune the shutter speeds
  35. Replace the focusing screen and pentaprism, hook the cover back on
  36. Remove the winding lever again, replace the top and bottom covers, re-attach the top controls and eyepiece.

And that is the end of this post. Phew.

The repaired SR-1 (left) and its stunt double (right)

1. The most cynical example of this came from Pentax, whose cut-down S1a model simply had the label for the 1/1000 shutter speed removed from the dial – the setting itself still worked fine.

2. One exception is that I refer to the “first-curtain gear” and “second-curtain gear” when referring to the roles of the large transmission gears in the timing order. In the manual these gears are called the “change speed gear” and “transmission gear” respectively, and the names “first-curtain gear” and “second-curtain gear” are used to refer to the small gears at the ends of the curtain shafts that are connected to them.

Repairing a Minolta XG-9 camera

This is the story of how I repaired, broke, and repaired again a Minolta XG-9 35mm SLR film camera.

It will be long, and of niche appeal, but I’m writing it up in case anyone else finds it as useful as I would have done before I started. Here’s the plot summary:

  • The camera’s shutter was sometimes sticking open when fired in Auto mode
  • I set out to fix this by cleaning the electrical contacts of the film-speed selection switch, beneath the camera’s top plate
  • That appears to have been the correct fix, but when reassembling the camera, I broke a fragile plastic part which holds the power switch in place, rendering the camera useless
  • I modelled a replacement part using 3D modelling software, had it 3D printed, and replaced the part in the camera
  • The replacement part is good enough to use, but could probably have been better; I’ve published the model for it, and would appreciate any ideas

If that sounds in any way interesting, read on. This was my first attempt at repairing a camera and my first experience of 3D modelling and printing, so it was certainly interesting to me.

The original problem: a sticking shutter

OLYMPUS DIGITAL CAMERA

The camera is one that I wrote a happy post about last year (“A film camera“). It was made in 1980 or so, but I bought it in 2018.

It worked well, except that the shutter would sometimes stick open when fired in Auto mode, and the only way to close it was to switch out of Auto. When stuck open, it often let in enough light to ruin both the previous and following photos as well as the current one. I was keen to fix it, especially as these cameras are designed so that the light meter only works when in Auto mode.

The first hint I found online was here, in a photo.net post from 2003 by “rokkor fan” who writes: “I had this once on a XG-1, and it was as a result of the mirror slap jarring the circuitry under the shutter release. I had a friend clean the circuits and it worked a treat after that.” No more details there, but a poor electrical contact sounds promising.

There’s a 238-page service manual available for these cameras (thank you Benoît Suaudeau) and it has an electrical troubleshooting section starting at page 174 that says:

Annotation 2019-07-04 204232“AUTO… curtain is kept open” looks like our problem, and “ASA contact defective” seems worth checking. ASA refers to the film-speed selection switch, which is on the top of the camera. It makes sense that a lost contact from that switch would only affect Auto mode, since Auto needs to know the film speed to decide how long to leave the shutter open.

There’s a YouTube video here, by Florian Buschmann, which shows how to take the lid off. The top cover has three axes poking out of it, one for the rewind knob and power switch, one for the shutter button and film speed knob, and one for the winding lever. The components attached to the tops of these can all be unscrewed from their axes and removed, leaving a plastic top-plate attached via four small screws, two at front and two at the back towards the middle of the camera. Here’s the camera with the top off:

Minolta XG-9 with top plate removed

The film-speed switch is beneath the large black nubbin poking out of the top about 3/4 of the way across from the left. The smaller nubbin at the left side is the power switch mechanism and rewind axis, which is the part I was just about to break while reassembling the camera.OLYMPUS DIGITAL CAMERA

Unscrewing the parts atop the film-speed switch reveals a brush mechanism with a flat contact plate. I cleaned the plate with switch cleaner (it was quite grubby) and made sure the brushes were sticking out enough on the switch side, then reassembled the top of the camera.

After reassembly I tested the shutter in Auto mode a few times, and it didn’t stick. Flushed with success, I set out to load a film — and that’s when the power switch came loose. While screwing on the metal collar that keeps the power switch in place, I had managed to shear off the entire threaded top of the plastic part that holds it down. A problem.

The broken part

Minolta part 2006-3309-2, Rewinding axis receiverThe picture on the right shows the part I had broken. It’s intact in this photo, because this was taken during one of my initial attempts to glue it back together again — which always failed when force was applied to screw the threaded collar back on the top.

The 40-year-old plastic is quite brittle, and as you can see, I also broke one of its little lugs just unscrewing it from the body. And I am a reasonably delicate person.

Without this part, it’s impossible to use the power switch: it is left floating, switching between on, off, and self-timer modes at random. Having failed to glue it, my options seemed to be:

  1. Write off the camera. I wasn’t going to do that yet.
  2. Figure out some ingenious bodge to keep using the power switch even though the official mechanism didn’t work. Well, I did sort of do this using a piece of thread attached to the switch mechanism, but I didn’t like that very much.
  3. Find a replacement part. For an easily-broken part in a relatively inexpensive 40-year-old camera from a company that stopped making cameras over a decade ago, that seemed unlikely, and my first searches came up with nothing.
  4. Buy a non-working camera, sold for parts, and plunder it for this part. Yes, but what if it just broke in the same way again? That would be unbearable. Or if this part was already broken in the other camera?
  5. Make a new part. This takes time and money and might not work, but it puts the outcome in my own hands and hopefully teaches me something new.

My first assumption, knowing very little about 3D printing, was that this component was too fiddly to be produced that way — especially the rather fine threaded bit at the top. But reading about different 3D processes, it seemed faintly possible that a nylon SLS printer, with 0.1mm resolution, might just be able to produce a viable part, especially as the thread was required to screw into a metal collar (which could perhaps do a bit of self-tapping) rather than a plastic one.

Modelling the part

Here’s this component in the service manual, identified as “Rewinding axis receiver”. It comes in two variations with codes 2006-3309-02 and 2006-3309-04. I think mine is a 2006-3309-02.Part in maintenance manual

First I needed a 3D model.

I measured it with a vernier caliper and some close-up photos. The thread seems to be 0.5mm x 7mm and the three screw-fixing lugs are spaced at 0°, 140°, and 220°. A hole through the middle admits a metal axle of 4mm diameter. There is a cutout in the collar at the bottom, into which the mechanism to release the film door when the axle is lifted fits. There’s also a slot in the midriff which a metal clip pokes into, to meet a notch in the axle that snaps it into its usual lowered position.

Knowing nothing about 3D modelling software, I asked my kids for advice first. Their suggestion was Blender, but I’m a bit afraid of Blender. I did try Wings3D, another free application (written in Erlang using wxWidgets — interesting!) but I got stuck on how to model a screw thread, and decided I should probably start with a trial version of something expensive with extensive documentation.

I came across Autodesk’s Fusion 360 while searching for screw thread tutorials, when I found a page that basically just said “use the thread tool”, which seemed about right. Fusion 360 is a very expensive subscription product with cloud-storage lock-in, but it has a one-year trial period for “hobbyist” use. That’s me!

Annotation 2019-07-05 203934.png

I really enjoyed using Fusion 360, and I waxed lyrical about it here on Twitter. Much the appeal has to do with good interactive feedback, but the core thing is that it’s built on a very nice 2D sketching program: the expectation seems to be that you sketch in 2D and then extrude into 3D, which I find a lot simpler than trying to design in 3D. But I don’t know how other software of this kind works. Anyway, I successfully built a nice-looking model, though with a thread that I suspected wasn’t really possible to print.

3D printing

I exported the model as an STL file and sent it for nylon/polyamide SLS printing at i.materialise. I have to admit that I picked this company because they had the most anonymous, automatic-looking order page, and I felt embarrassed about having a real person look over my impossible design. I didn’t notice at first that i.materialise are actually in Belgium, and it’s slightly crazy to send your model from London to Belgium for printing when there are companies in London (digits2widgets, 3DPRINTUK) doing the same thing, but by that point I was sort-of committed.

Because of the minimum order price, I ordered three different pieces. Two were from my best attempt at the model, which I asked for once in SLS (laser) process and once in MJF (HP’s ink-based) process. The third was an SLS print with slightly different dimensions for some things I wasn’t sure of. The pieces took about a week to arrive, and the price was quite high — the nominal charge for printing each item was £11.15, but that was quoted before VAT and shipping, and the eventual total was very close to £50.

Here are the results. The black part on the left is the broken original, the white one is the SLS of the variant model, and the grey one on the right is the MJF. (The colour doesn’t matter, as the part is not visible from outside the camera.)

3D printed Minolta parts

Receiving these was a really exciting moment: a true marvel that it was actually possible to design and build this neat little component with no worthwhile expertise on my part!

Of the two processes, the MJF version came out a bit fatter than the SLS — the holes are smaller, the walls are thicker. I think the SLS copy is more true to the design size. Although the texture of the printed nylon is unpolished (they both feel a bit like paper) and looks almost crumbly, both of them feel very solid, are harder and less flexible than I expected, and seem pretty tough.

The threads are indeed pretty sketchy. The SLS one is a little too narrow, without enough depth to the thread: the collar doesn’t tighten well and can easily jump a thread if pushed. The MJF has even less visible thread, but it is a bit too fat, and it is hard to fit the collar onto it at all. In this situation that would probably be a good thing, but the thicker walls of the MJF part interfered with the film-door release disc underneath the part, so it was an SLS copy that I ended up fitting. Here it is in the camera.

3D printed Minolta part fitted in XG-9 camera

I think that the thread, although weak, may hold well enough. It isn’t the last line of defence against the power switch falling off: the rewind knob on top of it, held on with a metal-on-metal screw fitting, is there to prevent that. This thread just needs to stop the power switch from lifting and losing its position while loading or rewinding film. But it would be nice to have done better, if it were possible to do so. I’d like to know if there is some technique for making threads more “printable” at this kind of scale.

Conclusion

This feels like a successful outcome, and at least the original problem is fixed. It would obviously be better not to have broken this part at all — and although it was my fault, I did spend some time mentally railing at Minolta for using a plastic thread here in the first place. Perhaps the main lesson is just that old plastic is fragile. But I enjoyed the process and am happy with the result, which is after all a camera that works better than it previously did.

I’ve published the 3D model, in a Github repository at cannam/minolta-2006-3309-2, in case it is of use to anyone else. If you’ve any suggestions for how this could have been done better, I’d like to hear! Of course this does show a big limitation of using Fusion 360 to do the modelling: the main file in that repo is in a proprietary format and probably useless to any other tool. I’ve included a couple of exports as well, including the STL file.

 

MIREX 2018 submissions

The 2018 edition of MIREX, the Music Information Retrieval Evaluation eXchange, was the sixth in a row for which we at the Centre for Digital Music submitted a set of Vamp audio analysis plugins for evaluation. For the third year in a row, the set of plugins we submitted was entirely unchanged — these are increasingly antique methods, but we have continued to submit them with the idea that they could provide a useful year-on-year baseline at least. It also gives me a good reason to take a look at the MIREX results and write this little summary post, although I’m a bit late with it this year, having missed the end of 2018 entirely!

For reference, the past five years’ posts can be found at: 2017, 2016, 2015, 2014, and 2013.

Structural Segmentation

No results appear to have been published for this task in 2018; I don’t know why. Last time around, ours was the only entry. Maybe it was the only entry again, and since it was unchanged, there was no point in running the task.

Multiple Fundamental Frequency Estimation and Tracking

After 2017’s feast with 14 entries, 2018 is a famine with only 3, two of which were ours and the third of which (which I can’t link to, because its abstract is missing) was restricted to a single subtask, in which it got reasonable results. Results pages are here and here.

Audio Onset Detection

Almost as many entries as last time, and a new convolutional network from Axel Röbel et al disrupts the tidy sweep of Sebastian Böck’s group at the top of the results table. Our simpler methods are squarely at the bottom this time around. Röbel’s submission has a nice informative abstract which casts more light on the detailed result sets and is well worth a read. Results here.

Audio Beat Tracking

Pure consolidation: all the 2018 entries are repeats from 2017, and all perform identically (with the methods from Böck et al doing better than our plugins). Every year I say that this doesn’t feel like a solved problem, and it still doesn’t — the results we’re seeing here still don’t seem all that close to human performance, but perhaps there are misleading properties to the evaluation. Results here, here, here.

Audio Tempo Estimation

This is a busier category, with a new dataset and a few new submissions. The new dataset is most intriguing: all of the submissions perform better with the new dataset than the older one, except for our QM Tempo Tracker plugin, which performs much, much worse with the new one than the old!

I believe the new dataset is of electronic dance music, so it’s likely that much of it is high tempo, perhaps tripping our plugin into half-tempo octave errors. We could probe this next time by tweaking the submission protocol a little. Submissions are asked to output two tempo estimates, and the results report whether either of them was correct. Because our plugin only produces one estimate, we lazily submit half of that estimate as our second estimate (with a much lower salience score). But if our single estimate was actually half of the “true” value, as is plausible for fast music, we would see better scores from submitting double instead of half as the second estimate.

Results are here and here.

Audio Key Detection

Some novelty here from a pair of template-based methods from the Universitat Autonoma de Barcelona, one attributed to Galin and Castells-Rufas and the other to Castells-Rufas and Galin. Their performance is not a million miles away from our own template-based key estimation plugin.

The strongest results appear to be from a neural network method from Korzeniowski et al at JKU, an updated version of one of last year’s better-performing submissions, an implementation of which can be found in the madmom library.

Results are here.

Audio Chord Estimation

A lively (or daunting) category. A team from Fudan University in Shanghai, whence came two of the previous year’s strongest submissions, is back with another new method, an even stronger set of results, and once again a very readable abstract; and the JKU team have an updated model, just as in the key detection category, which also performs extremely impressively. Meanwhile a separate submission from JKU, due to Stefan Gasser and Franz Strasser, would have been at the very top had it been submitted a year earlier, but is now a little way behind. Convolutional neural networks are involved in all of these.

Our Chordino submission can still be described as creditable. Results can be found here.

 

EasyMercurial v1.4

Today’s second post about a software release will be a bit less detailed than the first.

I’ve just coordinated a new release of EasyMercurial, a cross-platform user interface for version control software that was previously updated in February 2013. It looks a bit like this.

Screenshot from 2018-12-20 18-55-36

EasyMercurial was written with a bit of academic funding from the SoundSoftware project, which ran from 2010 to 2014. The idea was to make something as simple as possible to teach and understand, and we believed that the Mercurial version-control system was the simplest and safest to learn so we should base it on that. The concurrent rise of Github, and resulting dominance of Git as the version control software that everyone must learn, took the wind out of its sails. We eventually tacitly accepted that the v1.3 release made in 2013 was “finished”, and abandoned the proposed feature roadmap. (It’s open source, so if someone else wanted to maintain it, they could.)

EasyMercurial has continued to be a nice piece of software to use, and I use it myself on many projects, so when a recent change in the protocol support at the world’s biggest public Mercurial hosting site, Bitbucket, broke the Windows version of EasyMercurial 1.3, I didn’t mind having an excuse to update it. So now we have version 1.4.

This release doesn’t change a great deal. It updates the code to use the Qt5 toolkit and improves support for hi-dpi displays. I’ve dragged the packaging process up-to-date and re-packaged using current Qt, Mercurial (where bundled), and KDiff3 diff-merge code.

Mercurial usage itself has moved on in most quarters since EasyMercurial was conceived. EasyMercurial assumes that you’ll be using named branches for branching development, but these days using bookmarks for lightweight branching (more akin to Git branching) is more popular — EasyMercurial shows bookmarks but can’t do anything useful with them. Other features of modern Mercurial that could have been very helpful in a simple application like this, such as phases, are not supported at all.

Anyway: EasyMercurial v1.4. Free for Windows, Linux, and macOS. Get it here.

Sonic Visualiser v3.2

Another release of Sonic Visualiser is out. This one, version 3.2, has some significant visible changes, in contrast to version 3.1 which was more behind-the-scenes.

The theme of this release could be said to be “oversampling” or “interpolation”.

Waveform interpolation

Ever since the Early Days, the waveform layer in Sonic Visualiser has had one major limitation: you can’t zoom in any closer (horizontally) than one pixel per sample. Here’s what that looks like — this is the closest zoom available in v3.1 or earlier:

Screenshot from 2018-12-20 09-23-39

This isn’t such a big deal with a lower-resolution display, since you don’t usually want to interact with individual samples anyway (you can’t edit waveforms in Sonic Visualiser). It’s a bigger problem with hi-dpi and “retina” displays, on which individual pixels can’t always be made out.

Why this limitation? It allowed an integer ratio between samples and pixels to be used internally, which made it a bit easier to avoid rounding errors. It also sidestepped any awkward decisions about how, or whether, to show a signal in between the sample points.

(In a waveform editor like Audacity it is necessary to be able to interact with individual samples, so some decision has to be made about what to show between the sample points when zoomed in closely. Older versions of Audacity connected the sample points with straight lines, a decision which attracted criticism as misrepresenting how sampling works. More recent versions show sample points on separate stems without connecting lines.)

In Sonic Visualiser v3.2 it’s now possible to zoom closer than one pixel per sample, and we show the signal oversampled between the sample points using sinc interpolation. Here’s an example from the documentation, showing the case where the sample values are all zero but for a single sample with value 1:

The sample points are the little square dots, and the wiggly line passing through them is the interpolated signal. (The horizontal line is just the x axis.) The principle here is that, although there are infinitely many ways to join the dots, there is only one that is “smooth” enough to be expressible as a sum of sinusoids of no higher frequency than half the sampling rate — which is the prerequisite for reconstructing a signal sampled without aliasing. That’s what is shown here.

The above artificial example has a nice shape, but in most cases with real music the interpolated signal will not be very different from just joining the dots with a marker. It’s mostly relevant in extreme cases. Let’s replace the single sample of value 1 above with a pair of consecutive samples of value 0.5:

Screenshot from 2018-12-19 20-31-48

Now we see that the interpolated signal has a peak between the two samples with a greater level than either sample. The peak sample value is not a safe indication of the peak level of the analogue signal.

Incidentally, another new feature in v3.2 is the ability to import audio data from a CSV or similar data file rather than only from standard audio formats. That made it much easier to set up the examples above.

Spectrogram and spectrum oversampling

The other oversampling-related feature added in v3.2 appears in the spectrogram and spectrum layers. These layers now have an option to set an oversampling level, from the default “1x” up to “8x”.

This option increases the length of the short-time Fourier transform used to generate the spectrum, by padding the time-domain signal window with additional zero-valued samples before calculating the transform. This results in an oversampled frequency-domain output, with a higher visual resolution than would have been obtained from the original, un-zero-padded sample window. The result is a smoother spectrum in which the locations of peaks can be seen with a little more accuracy, somewhat like the waveform example above.

This is nice in principle, but it can be deceiving.

In the case of waveform oversampling, there can be only one “matching” signal, given the sample points we have and the constraints of the sampling theorem. So we can oversample as much as we like, and all that happens is that we approximate the analogue signal more closely.

But in a short-time spectrum or spectrogram, we only use a small window of the original signal for each spectrum or spectrogram-column calculation. There is a tradeoff in the choice of window size (a longer window gives better frequency discrimination at the expense of time discrimination) but the window always exposes only a small part of the original signal, unless that signal is extremely short. Zero-padding and using a longer transform oversamples the output to make it smoother, but it obviously uses no extra information to do it — it still has no access to samples that were not in the original window. A higher-resolution output without any more information at the input can appear more effective at discriminating between frequencies than it really is.

Here’s an example. The signal consists of a mixture of two sine waves one tone apart (440 and 493.9 Hz). A log-log spectrum (i.e. log frequency on x axis, log magnitude on y) with an 8192-point short-time Fourier transform looks like this:

Screenshot from 2018-12-19 21-25-02

A log-log spectrum with a 1024-point STFT looks like this1:

Screenshot from 2018-12-19 21-25-26

The 1024-sample input isn’t long enough to discriminate between the two frequencies — they’re close enough that it’s necessary to “hear” a longer fragment than this in order to determine that there are two frequencies at all2.

Add 8x oversampling to that last example, and it looks like this:

Screenshot from 2018-12-19 21-26-04

This is very smooth and looks super detailed, and indeed we can use it to read the peak value with more accuracy — but the peak is deceptive, because it is still merging the two frequency components. In fact most of the detail here consists of the frequency response of the 1024-point windowing function used to shape the time-domain window (it’s a Hann window in this case).

Also, in the case of peak frequencies, Sonic Visualiser might already provide a way to get the same information more accurately — its peak-frequency identification in both spectrum and spectrogram views uses phase unwrapping instead of spectrum interpolation to estimate the frequencies of stable harmonics, which gives very good results if the sound is indeed harmonic and stable.

Finally, there’s a limitation in Sonic Visualiser’s implementation of this oversampling feature that eliminates one potential use for it, which is to choose the length of the Fourier transform in order to align bin frequencies with known or expected frequency components of the signal. We can’t generally do that here, since Sonic Visualiser still only supports a few fixed multiples of a power-of-two window size.

In conclusion: interesting if you know what you’re looking at, but use with caution.


1 Notice that we are connecting sample points in the spectrum with straight lines here — the same thing I characterised as a bad idea in the discussion of waveforms above. I think this is more forgivable here because the short-time transform output is not a sampled version of an original signal spectrum, but it’s still a bit icky

2 This is not exactly true, but it works for this example

Rubber Band Library v1.8.2

I have finally managed to get together all the bits that go into a release of the Rubber Band library, and so have just released version 1.8.2.

The Rubber Band library is a software library for time-stretching and pitch-shifting of audio, particularly music audio. That means that it takes a recording of music and adjusts it so that it plays at a different speed or at a different pitch, and if desired, it can do that by changing the speed and pitch “live” as the music plays. This is impossible to do perfectly: essentially you are asking software to recreate what the music would have sounded like if the same musicians had played it faster, slower, or in a different key, and there just isn’t enough information in a recording to do that. It changes the sound and is absolutely not a reversible transformation. But Rubber Band does a pretty nice job. For anyone interested, I wrote a page (here) with a technical summary of how it does it.

I originally wrote this library between 2005 and 2007, with a v1.0 release at the end of 2007. My aim was to provide a useful tool for open source GPL-licensed audio applications on Linux, like Ardour or Rosegarden, with a commercial license as an afterthought. As so often happens, I seriously underestimated the work involved in getting the library from “working” (a few weeks of evening and weekend coding) to ready to use in production applications (two years).

It has now been almost six years since the last Rubber Band release, and since this one is just a bugfix release, we can say the library is pretty much finished. I would love to have the time and mental capacity for a version 2: there are many many things I would now do differently. (Sadly, the first thing is that I wouldn’t rely on my own ears for basic testing any more—in the intervening decade my hearing has deteriorated a lot and it amazes me to think that I used to accept it as somehow authoritative.)

In spite of all the things I would change, I think this latest release of version 1 is pretty good. It’s not the state-of-the-art, but it is very effective, and is in use right now in professional audio applications across the globe. I hope it can be useful to you somehow.