You are here

Shareware; Out Of Phase & Interpolate

Apple Notes By Martin Russ
Published July 1997

Martin Russ goes all virtual this month — with a freeware software synthesizer, plus more on registering shareware.

The flavour of the moment seems to be software synthesis, and so this month I thought I would present one of my favourite Mac tools for tinkering with sound synthesis. Not for the faint‑hearted, unfortunately, but then it makes up for the investment in learning by providing huge possibilities.

But first, a few thoughts on the sudden appearance of a number of software synthesis tools which claim to provide powerful synthesis capabilities at a bargain price. My first observation concerns the price: by the time you've bought a computer fast enough to do the calculations in a reasonable time, how much is the whole package costing you? The second concerns the control mechanism: since many software synthesizers only produce AIFF or WAV files suitable for loading into a sampler, how can they be controlled in real time? And finally, why do the majority seem to concentrate on subtractive synthesis or analogue modelling?

Out Of Phase

Out Of Phase is a software synthesizer for the MacOS platform — it will run on 68K machines with or without an FPU (floating point unit), as well as PowerPC‑based machines. It was originally called Synthesizer, but this eponymous naming apparently clashed with another program and so it was changed to something rather more mysterious and intriguing. I'll call Out Of Phase by the much jollier abbreviation OOP in the rest of this text.

OOP describes itself as a wavetable synthesizer, which is slightly inaccurate: it can do wavetable synthesis, but it also does Wave Interpolation, Dynamic Waveshaping, and Wavesequencing — and probably others as well. What seems to be the current version (1.3) was released in 1995, with the usual litany 'Version 1.4 should be out soon...'. It's refreshing to finally find some software that doesn't rush ahead too quickly with new versions every couple of months. OOP is freeware — in fact, it comes with the GNU licence, which goes to great pains to ensure that it stays free.

Programming

OOP does not have a graphical interface, so you don't merely plug together someone else's pre‑prepared blocks. Instead it provides a programming language which you use to build up your own set of virtual instruments; arrange them into your own orchestra; incorporate into your song; and then generate the final song as an audio file (AIFF format). Programming OOP requires a clear head, patience, and some programming knowledge. A little bit of mathematics experience might also be useful.

To give some of the flavour of OOP, here's a simple project which produces an interpolation from a sine wave to a square wave (see the screen dump below). To achieve this, you need to produce a function which will fill two tables with a sine wave and a square wave; the sine wave and the square wave are themselves produced from basic maths. You then need to define an instrument that will play this interpolated sine‑to‑square sound.

First, there's the function to produce square waves. The very similar function to produce sine waves does not have the 'if x >= 0 then set x :=1 else set x := ‑1;' line in, of course.

In fact, I combined the sine and the square‑wave generating functions into one by making that 'if then else' line controlled by the number of the table: table 0 for the sine wave, and table 1 for the square wave. Then you need something to fill the tables with the sine and square.

And finally, an 'instrument' to play the sound. The 'Index' envelope controls the interpolation from the sine wave table (0) to the square wave table (1). As you can see, it takes five seconds to change from sine to square and another five seconds to change back to the sine again. The end result is an instrument that sounds a little like a low‑pass filtered square wave being opened and closed, but not exactly — and there's a very interesting halo of digital noise caused by the limited number of interpolated steps. The basic output audio quality is 44.1kHz, 16‑bit, although you can lower the sampling rate and degrade the bit resolution if you want (you can use 48kHz as well). If you've never played around with the mathematics behind synthesis, then a little wavetable synthesis can be quite fascinating; and you can end up with some very useful raw samples to load into your sampler and play S+S with.

You'll find the Out Of Phase home page at

www.upl.cs.wisc.edu/cold/code/ outofphase.html

and a download location at:

https://web.archive.org/web/2016...

The Name's The Thing

There's a surprisingly good set of shareware utilities available for members of the MacOS family of computers. Many of these have commercially priced alternatives, but you might be surprised at the quality and support that you get from the shareware world. I've recently become involved in a couple of projects that required some automation of common desktop operations (clicks, drags and so on), and so I looked around for something to make it easier.

One thing that I'm always doing is renaming files. The MacOS's Finder is okay for changing one name, but it tends to become a little tiresome for more than a couple of renames, and a major annoyance for more than three files. Now, on a computer with a command line interface (Unix, Linux, DOS, AmigaDOS) this would be relatively easy, although learning about topics like Unix's regular expressions or 'grep' function might be more of a challenge. But the MacOS does not provide anything remotely like a command line — so how do you automate things?

AppleScript might be your first port of call. This enables you to write 'scripts' that use a simple, HyperCard‑ or HyperTalk‑like language to control what the Finder does — or, more frequently, to record what you do with the mouse and then let you edit it and replay it. The trouble is that not all applications support AppleScript, and it can sometimes be tricky to get it to do exactly what you want. It also makes your System bigger, requires yet more precious RAM and makes the machine slower to re‑boot. In many cases, AppleScript is a bit over the top.

For my renaming problem, I wanted to remove unwanted text at the end of a large number of files: they were all called variations on 'File nnn copy'. Why? Because when you try to open a file, the order shown is normally related to the sort order as shown on the desktop, and is normally alphabetical. So 'File' and 'File copy' tend to be next to each other, which reduces the number of files you can choose from by half — unless you actually enjoy scrolling down through a list box (there's a way out of that too, but that's another story). So I wanted to change the name to something like '_File' — that 'underscore' character just happens to come after A‑Z in sorting order, and so appears at the bottom of list boxes.

On the desktop, this would require quite a bit of clicking, waiting and typing. But a quick wander through my favourite Utility CD‑ROM (BBS in a Box) produced an application called Drop*Rename, which not only allowed me to make the changes on all the files with one 'drag and drop', but it also allowed me to create an applet which did that and nothing else. It also does automatic renumbering and a host of other operations on filenames. And the cost of this marvel? Ten US dollars, which is just over six pounds sterling.

Registration Class

Okay, so I mentioned Kagi software last month, but since I've been registering software with them for some time, I thought that perhaps I ought to let a few other people into the secret. If you've ever declined paying for shareware software in the past, then look at how easy it can be now.

First off, you need to find the shareware. The two major methods are the Internet or a CD‑ROM compilation. You then try out the alternatives and pick the one that suits your requirements. If a shareware author uses the Kagi system, then alongside (sometimes built into) the application, there will be a small program called 'Register' — normally blue with a picture of a dollar, yen or other currency symbol on it. You double‑click on this and fill in the details: your name, address, email and so on, and then print it out or save it to disk. The application encrypts important details, such as your credit card number, and produces either a barcoded printout, or an email‑ready text file. You then send this to Kagi — by email if you are paying by credit card, or by mail if you are enclosing a cheque (the email/credit card method is much easier than posting US dollars).

In my experience, the following day you get an acknowledgement from Kagi to say that they have your email, and this is usually followed (often that same day) by another email which confirms your registration and which tells you how to personalise the copy of the software program that you've just bought. It's very easy, very quick (often quicker than buying from a mail order company) and there are no problems with delivery — you already have the software!

Apple News In Brief

  • RAW SPEED
    We can expect to see clock speeds of 266MHz, 275 and even 300MHz by the end of the year. But, more significantly, the underlying buss speed is also likely to rise: from the current 50MHz maximum to 60MHz, or beyond (perhaps beyond 80MHz by 1998). This means that the overall performance will continue to rise for the foreseeable future.
  • WEB TV
    Perhaps this belongs on the PC pages, but given the number of MacOS‑based AVID video systems (and their associated Digidesign audio systems) that you see in studios these days, this snippet may well be significant. Recently, Microsoft bought a small Californian start‑up company for $425 million. Not earth‑shaking news, but what is interesting is what the company make: set‑top boxes that allow ordinary TVs to display Internet pages. With their foot in this door, Microsoft then went to the NAB exhibition and suddenly seemed to be part of the video industry too — and that finally gives them access to potentially every household, especially those that don't have a computer. Luckily, Microsoft are ramping up their MacOS division at the moment, and so, given the MacOS's multimedia‑friendly reputation, who knows where this will lead? Personally, I suspect that it won't be long before the average living room has a Microsoft logo lurking on a piece of black hi‑tech equipment.