Author Archive for Andy Murkin

26
May
16

Stylophones 5 – The Melophone

There are a number of different instruments called the ‘Melophone’ or ‘Mellophone’.  The one on the left in the picture below (by Kc8dis at the English language Wikipedia) is a brass instrument used in marching bands and the one on the right is ‘a cross between a guitar and a harmonium’, according to the Squeezytunes blog (at http://squeezyboy.blogs.com/squeezytunes/2008/02/melophone.html, from which the pictures came).

Mel(l)ophones

However, this Melophone which I recently acquired, is clearly a type of Stylophone – and a very stylish type of Stylophone at that!

Melophone2

Melophone1

I had never heard of this Melophone before, and found only a single reference to it on the internet.  A glance at the accompanying booklet – which, as you will see below, follows exactly the same style and format as the booklet from a 1960s/70s Stylophone – shows that it was not written by a native English speaker.  The company that manufactured it is (according to this website: http://www.pewc.com.tw/eng/) or was (according to this Wikipedia entry: https://en.wikipedia.org/wiki/Taiwan_Mobile) founded in Taiwan in the 1950s and acquired the name ‘Pacific Electric Wire and Cable Company’ on December 30th 1957.

The company would, therefore, have been in place to manufacture the Stylophone after its invention in 1967.  It looks as though it may have done so for some years as the picture on the box shows a Melophone with the early Stylophone keyboard with the black non-playing sections; just as the Stylophone was updated with a new keyboard, so it seems was the Melophone.

Box

The flap has a sticker on it showing the colour as yellow, which this one is; but other colours were presumably available.

It is, incidentally, not ‘Colour’, but ‘Color’, which may be an indication of the market it was intended for: Asia or America.  There would be no reason why it should not be intended for the UK, as the legend ‘Made in Taiwan’ was commonly seen during that period – except that genuine, British-made Stylophones were available over here, and Dübreq would surely not want to allow or encourage competition.

*

The similarities with the Stylophone – its appearance as well as its booklet – are striking: particularly the distinctively-shaped keyboard with its recess above to hold the stylus.

Stylus01

As can be seen  in the above photograph, the size and method of connection to the stylus are also the same as the Stylophone, and a detailed comparison of the yellow Melophone stylus with a black Stylophone stylus, shows that their dimensions are more or less identical:

Stylus02

Nevertheless, there are significant differences – aside, of course, from its handsome ‘Grand Piano’ shape!

First of all, although apparently identical, the Melophone keyboard is longer.  With a standard Stylophone on top, this can be clearly seen:

Keyboards

There are 2 extra notes at the bottom end of the keyboard, G and G#, and 1 extra note at the top, F – that is, 23 notes in total, as opposed to the Stylophone’s 20.

You can also see in the above photograph that the Melophone lacks the traditional Power and Vibrato switches at the left-hand end of the keyboard.  Instead, the Power On/Off switch is incorporated into a volume control on the top of the Melophone, to the left:

On_Off_Volume

The Vibrato switch is found on the left side, together with a control the standard Stylophone never had – an Octave-change switch!

Side

Using this switch, the range of the Melophone can be extended by another 12 notes, giving the instrument an exceptionally wide range.

Turning the instrument over reveals the battery compartment – like the original Stylophone, the Melophone requires a 9v PP3 battery – and the three screws which need to be undone to access the inside.

Back

The circuit board inside is quite different from the standard Stylophone – and so is the circuit itself: no fewer than 6 transistors can be identified in the following pictures (These are 1 x ED1402A, 3 x ED1402D, 1 x ED1402E and 1 x ED1602E, which are all NPN General Purpose transistors – except the 1602E, which is a PNP):

Inside1

Inside3

Inside4

Inside2

It has no tuning control like the standard Stylophone; I wonder if the top has been removed from one of the potentiometers in the first internal picture in order to make some pitch adjustment.

*

Comparing the Melophone Booklet with a typical Stylophone booklet of the period, the close similarity is evident:

Two CoversRead the Melophone Booklet

Even the two pieces of music at the back of the booklet are the same: ‘Silent Night’ in the key of Bb and ‘The Londonderry Air’ in the key of C, although references to ‘Stylophone’ or ‘Dübreq’ are noticeably absent.

*

One website (http://www.miniorgan.com/lib/view.php?miniorgan=80&view=E&srch=&srch_type=&sortby=&output=14) pictures and describes as ‘another very cheap STYLOPHONE clone’ an obvious copy (which they date to 1976 – the year after production of the original Stylophone ceased, according to the Stylophone Collectors Information Site  at http://www.stylophone.ws/index.html).  ‘Sounds poor and very poor plastic’, they say; but this Grand Piano Melophone seems like a step up from that, in sound and construction.

Here’s a brief example of the tones made by the Pacific Melophone:

Sufficiently Stylophone-like, I’m sure you’ll agree!  The two low notes beneath the Stylophone’s normal lowest note don’t come out too well, though.  I’ll have to see if something can be done about that.

Describing a Hong Kong made Stylophone, the Stylophone Collectors Information Site says ‘Problems were experienced by the Dübreq company regarding patent infringments, but licences were apparently also granted, so it is very difficult to categorise this particular model.’  Perhaps the same can be said for the Melophone: it definitely isn’t a Stylophone, but it seems to me reasonably built and with some very close similarities – was it somehow produced under licence, or just a clever copy?  If anyone has any further information, please let me know.

10
Feb
16

Sample Manipulation 3

In an earlier post in this series I passed comment on the program ‘REplay PLAYer’, mentioning its creator, Karlheinz Essl, and describing it as ‘ a multi-featured program for manipulating a single sound sample’.

I was talking in that post about programs suitable for manipulating a group of four short samples, so I didn’t go into ‘REplay PLAYer’ in more detail.  However, I thought it would be worth adding a post on programs for manipulating a single longer sample.

‘REplay PLAYer’ is my favourite of these – it costs a bit to buy it, but I’ve found it very useful in the past, and it has a couple of features which make it particularly versatile in use.

It’s described on its webpage, http://www.essl.at/works/replay.html, as a ‘generative sound file shredder . . . based on the paradigms of granular synthesis. The program de-constructs a given sound file and re-composes it by using realtime composition algorithms [and] can be used as a tool to generate an infinite and every-changing sonic stream from a single sound file for artistical, compositional or mere recreational purposes. It can also be regarded as a computer based instrument for live performances, as an interactive sound installation or a generator for ambient music.’

The following screenshot indicates some of the program’s important features:

REplay PLAYer1

First of all, the sound file of your choice can be imported into the program, via the ‘Shredder’ menu, and settings can be adjusted affecting changes to the samples’ volume, pitch, EQ, panning and stereo spread which are automatically made, tailoring the way in which the file is ‘shredded’.

Better still, three of your favourite VST or Audio Unit plug-ins can be imported and used alongside the built-in effects – the picture shows two that I often use, brainworx bs_solo (Stereo imaging) and GSi TimeVerb (Reverb).

In this way you can allow your sample to run while small or large changes are made to it.  At any time you can change, for example, the range of pitch, volume or panning variations, turn them off or set them to move randomly from one value to another.

In addition to this, what makes ‘REplay PLAYer’ – as described – a ‘computer based instrument for live performances’ is the ability to control a number of the parameters in real time via MIDI.

I didn’t feel I needed to control all the possible features, but programmed my trusty Korg NanoKontrol to alter Volume, EQ, crossfade, glissando (i.e. pitch) and the amount of signal sent to the three plug-ins.  All knobs and sliders had to be set to CC#7; the following parameters could be set by assigning the knobs and sliders to the following MIDI channels:

Channel 1: granularity
Channel 2: density
Channel 3: glissando
Channel 4: minimum pitch
Channel 5: maximum pitch
Channel 6: crossfade between original and shredded sound
Channel 7: volume range
Channel 8: mix into plug-in 1
Channel 9: mix into plug-in 2
Channel 10: mix into plug-in 3
Channel 11: EQ low
Channel 12: EQ mid
Channel 13: EQ high
Channel 14: panning
Channel 15: spread

As the Menu suggests, ‘REplay PLAYer’ will also record the results of its work to a file (aiff, ulaw, wav or raw data) on your hard drive.  It’s important to note that the program is set to start or stop working in the ‘Shredder’ menu, and recording is set to start or stop separately in the ‘Record’ menu; audio is turned on or off in the ‘Audio Status’ window.

This is a recent track created using REplay PLAYer, and a picture of  my set-up in action:

Replay

*

Another program I’ve used on occasions for manipulation of a single file is ‘Metamix’.  This program gives the user less control than ‘REplay PLAYer’ – a deliberate choice on the part of the designer, Jason Freeman – but works well with some sound files.

As described here: http://www.generativeart.com/on/cic/papersGA2003/b16.htm, the way ‘Metamix’ works is that a ‘simple generative process remixes an audio track, using an infinite integer sequence to reorder and layer chunks of the original audio . . . The program includes twelve such sequences, chosen from Sloane’s exhaustive collection, The On-Line Encylopedia of Integer Sequences.’

These three screenshots of ‘Metamix’s control windows shows the elements you can choose – the twelve number sequences are given names, as can be seen, such as ‘Wide Exponential Slow’, ‘Up and Down’ and (my favourite) ‘Joy Ride’.

metamix1
metamix2
metamix3

As the document above explains, ‘To remix the audio track based on an integer sequence, the software first marks the audio track at equal-length time intervals and labels those markers with the natural numbers. Each time it obtains the next number in the integer sequence, it begins audio playback at the correspondingly-numbered marker.

‘When a new number from the integer sequence triggers audio playback at a marker, one or more previous layers of audio playback may continue uninterrupted. This layering renders the discrete generative process in a smoother, more fluid manner. To further this effect, MetaMix also gradually fades each playback layer in and out over the course of its lifespan, creating gradual crossfades between old and new playback layers.’

In other words, ‘Metamix’ can create quite a dense sound, with short, overlapping sequences, or a more spacious sound with longer extracts from the original source file.

The following example is typical of the way I’ve used Metamix.  At the beginning is a short extract from an existing piece, beginning with assembled street sounds and continuing with a repeating marimba theme.  Other instruments were omitted from the old piece in creating the new one.  This is followed by an extract from the new piece, after the old one has been worked on by Metamix:

*

I haven’t yet attempted to produce a Pure Data patch which will work on a single file in these ways.  If I do, you can be sure I’ll be writing about it here!

16
Nov
15

The Superstylonanophone 2 – Foot Controller

[Note: this post was originally a comment on the post ‘The Superstylonanophone‘, but it was hard to find there and the images disappeared when I changed my website. where they were stored.  So I’ve trashed the comment and transferred the text and images here].

I mentioned in the above post that a foot controller would be useful for playing drums via the Superstylonanphone, and that I had added a 15-pin socket to the back of the device for this purpose.

This is the controller I made for it:
Footswitches1

Yes, it looks like a length of plastic guttering – but I did say somewhere on the blog that I was looking for low-cost ways of achieving things . . . I found this in my garden shed: it was an offcut left over from a length I bought some time ago at a car boot sale.

The player side is to the left, and the 4 single-pole momentary switches are inclined slightly this way, for ease of use. The two on the left are for hi-hat sounds, the two on the right for bass drum sounds. The 15-pin cable is plugged in on the right hand-side, away from the player’s feet.

Inside you can see the simple connections from the switches to the socket – no electronics required, the Superstylonanophone recognises the switch presses and outputs MIDI instructions accordingly.

Footswitches2

(When I connected wires inside the Superstylonanophone, I made a diagram to show which notes or which drums were connected to which of the 15 pins, so I knew which pin to connect to which switch in the foot controller).

This, together with the two styluses, has made playing MIDI drums a little more natural on the Superstylonanophone.

16
Nov
15

Alternative Keyboards 5 – postscript

[Note: this post was originally a comment I appended to the post ‘Alternative Keyboards 4‘, which was about my double QWERTY keyboard instrument.  In that place it was hard to find, and the illustrations disappeared when I changed my website, so I’m trashing the comment and transferring the text and images here].

In order to play the ‘blue’ keyboard (the left-hand one) properly, the Shift key needs to be pressed down so that it outputs different ASCII codes to the ‘red’ (right-hand) keyboard. Using ‘Caps Lock’ doesn’t work, as this only affects the letter keys, not the numbers or other characters.

It would be awkward to have to press the Shift key at the same time as pressing a note key every time, so this keyboard needed something to keep the Shift key pressed while playing. I didn’t want to do anything permanent to the keyboard, like gluing the key down, so I looked for a suitable clip, which could be slid on and off when needed.

There are two types of clips that do this job: a drawing board clip, used by artists and architects; and a table cloth clip, as used in the home. They all look something like this:

drawingboardclip1
For a drawing board or table, the flat side would be on top and the bent side, which acts a spring, putting pressure on the end and holding it tight, would be out of the way underneath. For my application, I needed to use it the opposite way round, with the flat side underneath, so the keyboard could still stand on the desktop in the usual way.

I liked the look of the drawing board clip best, but in the end I found some table cloth clips in the sale in a local home shop, and bough those. They looked like this:

Shiftclip1
Because i thought they stuck up rather high and might interfere with playing, I experimented with bending them into flatter shapes. This is the one I currently use:

Shiftclip2
In this way, the ‘blue’ keyboard outputs different ASCII numbers from the ‘red’ keyboard, and can be interpreted separately by the program Pure Data which I use with the ‘double-keyboard’ arrangement.

26
Sep
15

Guitar FXBOX – Part 3, developments

After finishing the FXBOX foot controller, I started to use the FXBOX and soon decided on a few changes to the software.  There are now 3 areas in which there are differences from the original description of the software in Part 1 of this series of articles.

1  I had been using external pedals to add and change pitches, so I decided not to implement the ‘Pitch’ function.  I’ve left a reference to it on the main FXBOX screen, as it’s still for the time being referred to on the foot controller – and I may decide to bring it back in future.

ishot-1*

2  The next change can be seen in the bottom right-hand corner of the main screen.  In order to enhance the shimmering effect of the spectral delay and the freeze I added a simple looper.  This would enable the delay and freeze effects to be repeated continuously, providing a background for melody or other sounds.

ishot-5I added a half-speed and double-speed playback facility, to allow for some variation in the sound produced.  The double-speed is particularly effective for higher-pitched ‘tinkling’ sounds.

Section 11 of the foot controller, which wasn’t being effectively used, was altered to allow for hands-off control of the various loop functions.

*

3  I added MIDI control for changing the variable parameters – volume, mix, chorus rate, depth, and so on.

I have a set of the original Korg ‘Nano’ controllers, NanoKeys, NanoPad and NanoKontrol, so I used the NanoKontrol for this application.  (This is a great device – very useful and usually quite cheap on eBay.  Versions 1 and 2 seem quite different in various respects, but I don’t think it would matter which you used for this application.  Version 2 doesn’t have the ‘scenes’ concept, but something else instead, I believe).

First of all I used Pure Data’s [ctlin] object to separate the incoming MIDI Channel, Continuous Control (CC) Number and Value information:

ishot-7then sent that information to control the values which would normally be set when the program opened, and altered by hand on the main screen –  a fiddly operation, on  top of having to stop playing in order to do it.

Here are a couple of examples of how it was done.  The calculations after the receipt of ‘midivalue’ are to translate the MIDI scale of 0-127 to the scale of the parameter being changed, which might be 0-1, 1-100, 1-128  or anything else.  The [loadbang] instruction ensures that, in this case, envelope sensitivity is only affected when CC Number 14 is received, and envelope attack is only affected when CC Number 15 is received.

ishot-9

As well as the CC Numbers having to be carefully specified, it was also important to ensure that the FXBOX responded only to messages on its own MIDI channel.  I used Scene 1 on the NanoKontrol; I can’t remember if MIDI Channel 11 was the default, or if I changed it to that using the Korg Editor:

ishot-10

In any event, it was set to Channel 11, and I amended the Setup screen so that the MIDI Channel received by the FXBOX could be changed:

ishot-3The revised files required to operate the FXBOX (the foot controller and MIDI control are entirely optional) are here:

http://www.andymurkin.net/Electronica/FXBOX/abswitch~.pd

http://www.andymurkin.net/Electronica/FXBOX/crossfader~.pd

http://www.andymurkin.net/Electronica/FXBOX/expression.pd

http://www.andymurkin.net/Electronica/FXBOX/FXBOX22.pd

http://www.andymurkin.net/Electronica/FXBOX/Guitar_specdelay~.pd

http://www.andymurkin.net/Electronica/FXBOX/LoopGenerator.pd

http://www.andymurkin.net/Electronica/FXBOX/midiin.pd

IMG_0399IMG_0400

*

This edited improvisation gives an idea of the sounds the FXBOX makes:

13
Mar
15

Guitar FXBOX – Part 2, the hardware

In my previous post on the FXBOX, I described a series of PureData patches used for guitar effects, and the need for a Foot Controller to operate it.

I happened to have a suitable case for this project – the remains of a previous mixer project which was never entirely finished. It was a large console-style case, about 18″ square, which I had already drilled with about 80 or 90 holes. The holes were too close together for all of them to be foot controller buttons, but about half of them could be used.

Outside of box DSCF0003

There were to be 4 sections to the controller, which would be: 1. Audio in/out and Audio to USB; 2. Audio to MIDI and MIDI to USB; 3. Keyboard Letters and Numbers, output via USB; and 4. Also via USB, Buttons and Potentiometers from a game controller.

*

1. AUDIO

The audio section was slightly more complicated than it might have been, as I’ve been using a twin-necked (6 and 12-string) guitar, and at some point intend to separate the output of the two sets of pickups.  For this reason, I added two audio input channels to the Controller.

The system basically works so that it can accept inputs either via a 6.35mm stereo socket or separate 6.35mm mono sockets, and can be routed either to a 6.35mm or 3.5mm stereo output, or two 6.35mm mono outputs. Each channel has a separate mono Send and Return, and there is stereo Send and Return covering both channels.

Audio DSCF0012

The 3.5mm output was included simply because this is the normal type of audio input socket on a laptop – which I was using to run Pure Data – and this would remove the need for a 6.35mm to 3.5mm adapter. Internally, there are connections to a Sonuus G2M Audio-to-MIDI converter – described in the next section – and an Audio-to-USB converter.

I took a chance on a cheap Audio-to-USB converter. I tried a few of the very cheapest type (99p on eBay), which worked OK, but I experienced too much latency, and these can only be used when the delay between playing and sounding isn’t important – on automatic or aleatory devices, for example. In this case, the next cheapest type (£2) seemed to work fine.

audio_usb

The intention of the Controller was that all four elements (the Audio to USB , the MIDI to USB, the keyboard numbers and letters, and the gamepad controls) would all be capable of output via a single USB socket. To accomplish this, I added an extremely reasonably priced (£3.95) 7-input USB hub. Given the number of items it would need to cope with, I got a powered one, which came with a 2-amp 5v mains adapter.

The inside of the box was going to be a bit like an enclosed pedalboard, and I simply velcroed this unit in position inside the case.

7 port hub

The hub was connected to a double USB socket unit – the type that would be fitted on a PC – with one socket connected to the type B output socket on the hub, the other one serving as an extra external input.

*

2. MIDI/USB

I added the MIDI section for two reasons: the first was that although MIDI implementation wasn’t really the point of this Controller, it could, I thought, come in handy for later applications, and be a convenient place to house my Sonuus G2M – a monophonic guitar-to-midi converter. The G2M, like the USB hub, was velcroed in place and linked up via internally-connected plugs.

G2M 27589983

Secondly, I’d successfully used a very cheap MIDI-to-USB converter in a previous project (‘A new use for USB keyboards‘), and decided for £3 or £4 that one could be included here. In this case, I didn’t even remove the outer casing as I had done the previous time, but simply shortened the IN, OUT and USB leads to fit and velcroed the unit to the inside of the case.

MIDI Inside box 1 DSCF0001

Audio and MIDI inputs would normally be via internal connections, but I added two 5-pin DIN sockets to the outside of the case. The first was for MIDI Out; the second, via a DPDT toggle switch, allowed input to the converter to be internal or external in case I wanted to connect a MIDI instrument or controller, such as my Behringer FCB1010, use another audio-to-MIDI converter, or decided not to use the G2M inside the case.

MIDI DSCF0012

*

3. LETTERS & NUMBERS

I had worked out for the previous project referred to above how to use the PCB from a defunct Apple keyboard as a means of outputting ASCII codes. The [key] function of Pure Data can be made to interpret and take action on these in any way required. I wanted to include this feature to help in using my looping program, Jesse Chappell’s Sooper Looper.

sshot6

As well as being controllable via MIDI, many of the Sooper Looper functions are controllable by input from the computer keyboard.  I wanted to include a simple system which would output some of the keyboard letters required to record, overdub, reverse and so on.

A 10×4 matrix would output all the letters in the alphabet, and the numbers 0-9, so I could put up to 40 buttons on the Controller (including a couple which represented punctuation marks), but I wouldn’t need anything like 40 buttons for this application.

I started confidently, as before, disassembled one of my collection of broken keyboards and took out the PCB.  It was very similar to the one I had used before: very wide, and with two USB input sockets on the ends – but it was a completely different make! So, I plugged the USB out cable into the computer, got the crocodile clips out, started up Open Office and began touching the matrix points together to see what letters came out – it had an entirely different layout from the one I’d used before!

However, after a certain amount of testing, it became clear that the matrix lines were essentially the same, but just in a different order on the board, which meant I could still get the 40 letters and numbers I wanted, and the pinouts on the sockets I planned to use (15 pin DIN HD) would still be compatible with the unit I had previously built.

In fact, it didn’t really matter about compatibility, as this would – at least as initially conceived – be a self-contained Controller unit, but I wanted to keep things consistent across my range of devices, and perhaps at a later date allow for an alternative or supplementary control unit to be connected to the Foot Controller.

I carefully connected the appropriate pins of the matrix to a ‘break out’ board, to which I connected a 15-way PCB header.

Apple PCB DSCF0004

This would make it a relatively simple job to connect buttons later.

*

4. GAME CONTROLLER

Again, I had used a game controller before, for the Theresynth/Cybersynth project, using the PureData [hid] function; but this time I needed to be more ambitious and use the joystick potentiometers as well as the buttons.

Of course, there are companies which produce USB controller modules, mainly for arcade controller enthusiasts, for example Ultimarc: http://www.ultimarc.com, and GroovyGameGear: http://groovygamegear.com.  The best value seemed to be the ZD (Zero Delay) Arcade controller, which is readily available on eBay.

Arcade Controller

I bought a couple of these two years ago at £8 each, but they seem to be even cheaper nowadays.

Good though they are, however, these units are limited to 12 buttons and two potentiometers.  Game controllers tend to have quite a large number of buttons – especially if you include the hatswitch buttons – and potentiometers on a single circuit board.

I needed 18 buttons, so I decided to use a game controller board for this part of the project.

There are a number of explanatory articles on the internet, such as this one: http://kevinreems.com/WorkShop/Joysticks//, and a lot of valuable information on this forum: http://forum.arcadecontrols.com/, as well as a few videos on YouTube. I like this one, which, although not captioned in English, is nicely visual: http://www.youtube.com/watch?v=9Y6ZqgT4Uk0.

Even Nic Collins’ classic book Handmade Electronic Music [http://www.nicolascollins.com/handmade.htm] has a chapter on the subject.

There are many different makes and models of gamepad, and one thing I’ve learned is that they’re all different – or liable to be different – in their electrical connections, so a certain amount of cautious experimentation is required to find out, for example, whether button connections are made to ground or some other voltage value in the circuit; if they’re arranged in a matrix; or if there’s a mixture of different systems. Sometimes this can readily be determined by looking closely at the circuit board and following the tracks around, sometimes it can’t.

So, if you’re reading this for hints on how to make the connections, use it as a guide to the type of thing you may need to do, but you may not necessarily be able to copy the steps precisely.

The other thing to note is that the connections on these PCB’s are usually very delicate, so you need to proceed carefully to avoid the narrow copper tracks coming away from the board.

As far as my gamepad was concerned, I used a Nyko Airflo, which was around £5 on eBay.

I removed the outside and an internal plastic piece which supported the two main PCBs and the fan which gives the Airflo its name.

Disassembled 2 IMG_1647

The idea was to reconnect the gamepad’s buttons to buttons on the FXBOX foot controller, so I detached the fan and looked for the button connections on the PCBs.

PCB 1 & 2 IMG_1650

Four of the 12 buttons were on their own mini-PCBs, connected by wires to the main board; the function of the wires was marked on the board, so I cut off the small PCBs and left the wires.

The various hatswitch connections and 6 of the remaining buttons were on the main board. These all had suitable spots in the copper tracks where it would be possible to solder wires.

The remaining two buttons were part of the joystick assembly on the second main board. It was easy to see the connections, and as the buttons were normally open (not connected), it would just be necessary to connect wires to the two sides of each one – or one side if the buttons all proved to have a common side, which is the usual practice.

I also needed to use the 4 potentiometers, two on each joystick, and wasn’t looking forward to de-soldering them, as I was anxious about damaging the tracks on the board. It doesn’t look too difficult on the videos, but I noticed on mine that there was small gap above the board where you could see the three legs of each potentiometer – the small ‘preset’ type – just enough room to insert a hacksaw blade and cut them off.   This is what I planned to do.

pots

First, as with the other devices in the Controller, I needed a much shorter USB out cable to connect to the hub, so I shortened the lead, but reconnected it before going any further, as this would be needed for testing.

The next step was to bring out the button connections to a ‘breakout’ board and find out exactly which ones I needed.

In most cases – perhaps all – I was sure that it wouldn’t be necessary to use 2 wires per button, as I had done with the Cybersynth; one side of the button connection would usually be Ground, and I hoped it would be possible to use one Ground connection for all of the 12 buttons.

This did prove to be the case, and I didn’t have the problem reported by some others of the unit not working at all without the joysticks connected.

I connected the 13 wires (one for each button + one for Ground) from the gamepad board to the breakout board, and a 13-way PCB header to give easy access to them.

The hatswitch connections looked as if they might be the same – except that there were 4 buttons, and I knew that 8 separate outputs are available from a hatswitch, meaning that 4 outputs were available from the 4 buttons individually and 4 outputs were available by connecting adjacent buttons simultaneously.

To make it easy to access these 8 outputs with 8 separate buttons, I connected diodes like this: hatswitch diodes

The connections at the top go to buttons in the Controller, and connections 1, 3, 5 and 7 at the bottom go to the 4 button positions on the circuit board; connections 2, 4, 6, 8 and 9 don’t need to be connected directly to the board.

This arrangement means that, for example, pressing Button 1 activates only Button 1, and pressing Button 3 activates only Button 3, but pressing Button 2 activates both Buttons 1 and 3 at the same time.

Only adjacent buttons are meant to be connected at the same time, which is why a hatswitch has 8 different outputs; but I discovered that connecting any two non-adjacent buttons on this particular board produced a ninth different output, recognised by PureData, which is why a ninth button is shown.

As a Ground connection was already available on the breakout board, I only needed 9 further connections for the 9 hatswitch buttons. This meant that 21 separate buttons would be available altogether.

*

The next task was to replace the two 2-axis joysticks with 4 potentiometers. Two of these would eventually be footpedals so that certain settings – volume and pan, for example – could be adjusted while playing.

I started by cutting through the legs of the existing potentiometers, as described above.  Once cut off, the potentiometers were easy to remove, exposing the three connections for each one.

Tracing the lines on the PCB, I could see that the ‘top’ and ‘bottom’ connections of each one were the same: only the middle pins had individual connections.

The bodies of the joysticks didn’t need to be removed from the board – and in fact were best left where they were, as some Ground connections from one part of the board to another appear to made through them.

I knew the potentiometers were likely to be more difficult to make use of than the buttons, but I was puzzled that I wasn’t able to get them working easily when I connected them to the board. For some reason they didn’t move smoothly from zero at one end to 255 the other as they were supposed to; on occasions they would return to zero and then refuse to move.

In the end, I read something that doesn’t seem to be mentioned much in articles on gamepad hacking, which seemed to be the root of the problem: joysticks are sprung to return to the centre of their travel, so a gamepad is expecting a midway reading on each one when it’s plugged in, and calibrates itself at that point to make sure the joysticks go back to the middle when let go. If potentiometers are used, and left at random values when the unit is plugged in, then the gamepad will get confused, try to calibrate itself wrong, and consequently fail to work properly – or at all.

The value of the joysticks in my gamepad was 100k, and they looked to be connected as voltage dividers, with the ‘top’ and ‘bottom’ tags all connected together, so, assuming these were +v and 0v (although it doesn’t really matter what they are) – I created a midpoint 50k from the top and 50k from the bottom (two 100k resistors in series = 50k). This would be connected to the centre tags of the potentiometer inputs to the board when the unit was turned on, the circuit would be calibrated, then the actual potentiometers could be connected and would correctly produce values from 0 – 255.

The writer of the article quoted above [http://kevinreems.com/WorkShop/Joysticks//] had a neat solution to this, using switched jack sockets, but I wasn’t able to use this method, as I wasn’t always going to be plugging into sockets. Instead, I connected the centre tags of the four potentiometer inputs to the centre tags on a 4 pole, two-way switch: this switch would be in the ‘off’ position when the unit was plugged in, which would connect the inputs to the ‘halfway’ voltage, enabling them to be calibrated, then when the unit was ready to be used the switch would be moved to the ‘on’ position, where the potentiometer inputs would be connected to actual potentiometers.

As a result, I ended up with a breakout board with 12 pins representing the 12 buttons numbered on the board, 9 pins representing the hatswitch buttons, 4 pins representing the 4 potentiometer outputs, and 3 pins representing +5v, 0v and +2.5v.

I also used 2 further pins for the game controller LED which lit up when the USB connection was made: I connected these to an LED on the outside of the case where I could see it and verify that the board was working.

That made 30 pins. Even when I calculated that I needed only 6 of the 9 hatswitch buttons, that still made 27 pins, plus 15 pins from the Apple keyboard PCB described earlier.

All the connections needed to be in place while the case was still open, so I needed to join all these pins on one side of the box where the circuit boards were to connectors on the other side of the box where the buttons were. To bridge this gap, I decided to use 40-pin ATA cables, normally found inside a desktop PC, which are inexpensive and compatible with the PCB connectors I was using.

ATA cables

These cables (as in the above picture) frequently have two separate connectors quite close together at one end. This made it easier to make connections not only from one side to the other, but also to special output sockets on the back of the case.  These could be used if alternatives were required to the buttons on the unit.

The 15-way socket on the back of the Controller has the same pin designations as my previous keyboard PCB-based project; the 25-way socket is a new arrangement, specific to the game controller:

Keybd & HID out DSCF0012

*

Finally, there was one downside with internal fixing of the Sonuus G2M ‘Guitar to MIDI’ unit – it runs off a PP3 battery: this would mean firstly that the ‘Battery low’ indicator couldn’t be seen from outside the case and secondly that the battery couldn’t be changed without taking the case apart. As this is held together with about 10 self-tapping screws, this would be too much trouble.

The main electrical supply was the the 5v adaptor that came with the USB hub, so I bought a small step-up voltage module for a couple of pounds to provide a 9v supply for the G2M.

voltage converter

I adjusted it to slightly over 9 volts, to make sure the G2M would be operated reliably and added a second power on/off switch for the 9v supply.

*

This is the almost finished base of the unit, showing the 7 elements.  All the connections are in place, except the power connector lead, which runs from connector 7 in the picture over to the power switches on the front of the unit:

Inside captioned IMG_1397

1: MIDI to USB

2: 7-port USB hub

3: Audio to USB

4: Apple keyboard PCB

5: Sonuus G2M, Audio to MIDI

6: Gamepad PCB

7: Power connector

This is the almost complete top section:

Top captioned IMG_1395

I gingerly put the two halves of the case together, and all the functions seemed to work, so I screwed it firmly together.

Now, with minimum use of the laptop keyboard, I was able to control the Looper with the buttons on the Top Panel:

Top Panel DSCF0009

and the FXBOX PureData program with the buttons on the Front Panel:

Front panel DSCF0010

I left space for additional button descriptions as the unit isn’t limited to controlling the Sooper Looper and FXBOX: in fact, it could be used to control any PureData patches which required [key] or [hid] inputs.

In addition to this, I had made provision on the front of the case for 4 footswitches which could duplicate the effect of any of the buttons on the panels:

Front DSCF0011

So far, I have just implemented two of the four possible: Footswitch 1 duplicates the ‘Overdub’ control in the Looper; Footswitch 4 duplicates the FXBOX ‘Freeze’ control.

I obtained some very nice momentary footswitches for only about £3 each from eBay.  They are apparently intended to operate tattoo machines, and have the advantage of coming with 1/4″ (6.35mm) standard mono jack sockets attached, perfect for this application.

tattoo switches

As for the footpedals, I haven’t implemented those yet.  When I do, I’ll describe this in a further post.

06
Mar
15

The X-Terminator, Part 2 – ORAC

After finishing the X-Terminator, which worked exactly as described, I began to think of additions that could be made to it – two in particular, which I thought might be useful.

This extract from the circuit diagram shows the one slight change I had made from the original circuit of the Cacophonator – replacing the latching switch and the momentary push button with a single toggle switch, latching in one direction, momentary in the other:

Cacophonator Power

It also shows the very big capacitor, C7, which enables the X-Terminator to keep sounding for some time after being charged by a quick press of the momentary switch connected to +V.

First of all, the original description mentions that ‘the discharge period for C7 [i.e. how long it keeps sounding] is affected by the load at the audio output, which should therefore be a high impedance in order to obtain this period.’

Rather than rely on the vagaries of whichever unit the X-Terminator might be plugged into, I decided to provide it with its own high impedance circuit to maximise the period for which it would sound.  This circuit would be a completely separate unit, connected to a different power supply, so as not to interfere with the working of the X-Terminator.

*

Secondly, I thought it would be handy to have a method of automatically retriggering the device after a set interval: a variable, but fairly long interval – up to a couple of minutes – to give it time to finish ‘winding down’.

In order to provide an external method of doing this,  I added a socket in parallel with the switch, which would connect to the new unit:

Cacophonator Power Rev

*

I was intending to use a suitable Dr Who-related case for the project, but couldn’t find a model of K9 which was big enough.  The only K9 I could get hold of was very small, and not really of sufficient size to contain any worthwhile circuitry.  So, in the end I had to be satisfied with adding a second 2.5mm socket which would allow a button on the small K9 to operate another of the samples in the Dr Who talking keyring which had been incorporated into the X-Terminator case (the Dalek).

Dalek_rear_IMG_1514

New sockets on the back of the X-Terminator

The button was a tiny tactile switch connected to to a 2-way cable which terminated in a 2.5mm mono plug.  This fitted into a new socket on the back of the Dalek which was wired to the keyring PCB.

The K9 model itself was not only small – approximately 7cm from nose to tail – but rather too light, so I added some weights to give it a bit more body.  These could be useful in other situations where a case might not be heavy enough to resist being dragged about.

wheelweights2

Originally intended for tyre balancing, these were either 5g or 10g and were sticky on the back, so they could be cut from the strip and easily fixed in place.  I used one of each in the base of the K9 before gluing it back together:

K9 IMG_1511

When the button is pressed, the response ‘Affirmative’ is given.  This, of course, comes from the speaker in the base of the Dalek.

*

When it came to the audio section of the unit, I had a clear plan, which would use a quad op-amp: at first an LM324, of which I had several lying about, to be replaced by a TL074 if the audio quality of the LM324 wasn’t good enough, as I had read might be the case. These two chips have exactly the same pinout, so a swap would be perfectly possible once the circuit was up and running.

The reason I wanted a quad op amp was because the first would be used as a high impedence buffer (or non-amplifying amplifier), while the other three would form a phase-shift-type stereo simulator.  The circuit looked like this:

Phase shift Pseudo stereo2

I connected it up, but for some reason it wouldn’t work, the output was mono and the cacophonator would still not continue sounding for more than about 15-20 seconds. I removed the battery to do some further testing and . . . the circuit worked perfectly: a noticeably stereo sound and up to a minute of cacophony while the big capacitor slowly discharged . . .

I tried removing the LM324, but the sound reverted to mono . . . I noticed the input signal and 0v leads were connected the wrong way round so I changed them . . . but the sound reverted to mono . . . so I just left the chip in and removed the power leads.  I really have no idea why it worked – at least to an extent – in this condition: maybe the collection of components forms a kind of filter network, affecting one channel differently to the other . . . however, it worked, so that was fine by me.  Perhaps I’ll go back to it later and try and sort it out properly . . .

*

So much for the audio section.  Turning to the auto-trigger section, the requirement here was for a circuit which would briefly close the switch to charge up the big capacitor, wait for a certain length of time for the resultant cacophony to subside, then repeat the process, and continue repeating at intervals until turned off.  The sonic results of this would be more interesting than leaving the switch permanently on.

As previously mentioned, this could only be done by a circuit kept separate from the X-Terminator circuit if the latter was to run as intended.  So I decided to use an electronic switch, one of the four such switches in a 4066 integrated circuit:

4066 pinout

The two sides of the charging switch  – brought into the unit via a 2.5mm mono socket – would be connected to, for example, pins 1 and 2 in the above pinout diagram.  Normally, pins 1 and 2 remain unconnected, as their control pin, pin 13, is held low – i.e. connected to 0v by a 100k resistor.  The lines to pins 1 and 2 can be connected together, like throwing a switch, by inputting a +V pulse into pin 13.

In the final version I used pins 10 and 11, rather than 1 and 2, with the control signal going into pin 12, but the effect was exactly the same: a +V pulse into pin 12 would connect the switch and trigger a new cycle of cacophony from the  X-Terminator.

I planned to add a push-button on the top of the unit and a 6.35mm mono socket for a momentary footswitch.  These would both be capable of sending a +V pulse into pin 13 and trigger the charge switch as an alternative to the switch on the X-Terminator itself.

However, my main objective was to have this done automatically.

The way to do this, I reasoned, was to use a very common timer or oscillator chip, the 555.  A 555 set up in astable (‘continuous’) mode, but running very, very slowly, with a variable control to go from 0v to +V at intervals of between 10 to 15 seconds minimum and one or two minutes maximum.  In addition, the ratio between the ‘on’ (+V) time and ‘off’ (0v) time would be set so that it was mostly off, and turn on briefly for a suitably short length of time to operate the trigger.

The typical connections for a 555 in astable mode are like this:

ORAC Timer circuit diagramThe frequency at which the circuit oscillates (goes from 0v to +v and +v to 0v) is determined by the three components Ra, Rb and C.  The way to allow the circuit to oscillate at a range of frequencies is to put a potentiometer in place of Rb.

The version of the circuit I used has an extra component which isn’t normally necessary.  This is the diode in parallel with Rb, between pins 6 and 7.  The purpose of this is to allow the time the circuit spends at +v to be much shorter than the time it spends at 0v.  The effect of this will be that if it’s oscillating at a very slow rate – say once a minute – there will just be a short pulse at the beginning of the minute to trigger the X-Terminator, and then the trigger signal will remain off until the next minute begins.

A preset variable resistor in place of Ra can be used to increase or decrease the length of the pulse, to make sure the X-Terminator is reliably triggered.

There are numerous places on the internet to find out more about the very useful little 555.  Some of my favourites are www.555-timer-circuits.comwww.talkingelectronics.com/projects/50%20-%20555%20Circuits/50%20-%20555%20Circuits.html and www.electroschematics.com/555-circuits/.

*

As for the case itself, this ended up less as Dr Who, more like ORAC from Blake’s 7.  Not very like ORAC, really . . . but it was transparent and had flashing lights in it, which was near enough for me!

While researching a suitable 555 timer circuit for the automatic trigger, I came across (here: http://www.instructables.com/id/LED-cube-using-4020-Ic-and-555-IC/) a circuit for turning 9 groups of 3 LEDs on and off in sequence, using another 555 and a 4020, a counter with up to 14 stages.

LED circuit

The 27 LEDs are typically arranged in a cube shape, and I thought something like this would be an attractive indicator that the automatic trigger was on.  So along with the circuitry I began supergluing LEDs on the inside of the transparent plastic box.

Just to make it different – and to cut down slightly on the number of LEDs – I used 4 red-blue bi-colour LEDs.  These have 3 legs, so each would have to be last in a series of 3, enabling each of the two outer (anode) legs to be the end of a series of 3, and the centre (cathode) leg to be connected to ground.

*

So the timer/flashing light part of the circuit needed two 555’s, a 4020 and a 4066.  Rather than use two 555’s, I used a 556 – a dual 555 – and the final circuit looked like this:

ORAC Circuit Diagram

Wiring all the LEDs together was quite tricky, but gradually it all began to come together . . .

IMG_0329

. . . and I was delighted when I connected a battery and the lights began to flash!

IMG_0332

I needed to protect some parts with bubble-wrap, to avoid short circuits, but when the lid was back on, and the trigger and audio were connected to the X-Terminator, it operated exactly as intended.

This has added some extra and very useful functionality to the original ‘Cacophonator’ circuit.

The finished ORAC:

ORAC FINISHED

*

ORAC in use with the X-Terminator and the Taurus amplifier:Orac & X-Terminator

and with the external footswitch attached:

ORAC & FootswitchHere’s what they sound like:

*

Incidentally, it was only shortly before I began on this series of posts that the inventor of the 555 died in Los Altos, California.

Born in 1934, Hans Camenzind came to the United States from his native Switzerland in 1960.  At first he worked for various companies in the newly developing semiconductor industry, such as Transitron, Tyco Semiconductor, and Signetics, then in 1971 formed his own company, InterDesign,  specializing in semi-custom integrated circuit design.

It was there, working under a contract with Signetics, that he invented the 555 timer, one of the most successful chips in the history of the semiconductor industry, and one which is still widely used today. Versions of the device have been or are still made by dozens of major semiconductor vendors, including Texas Instruments, Intersil, Maxim, Avago, Exar, Fairchild, NXP and STMicroelectronics.

Camenzind also introduced the idea of phase-locked loop to design and invented the first class D amplifier.  Altogether he was named as inventor in 20 patents.  He was a prolific author with interests as diverse as electronics textbooks and the history of the semiconductor industry, to a book on God and religion.  He also lectured at the University of Santa Clara.

His last book, Much Ado About Almost Nothing, subtitled A history of electricity and electronics, written for the non-expert, sounds quite interesting.  You can read about it at www.historyofelectronics.com.




andymurkin

May 2017
M T W T F S S
« May    
1234567
891011121314
15161718192021
22232425262728
293031  

Enter your email address to follow this blog and receive notifications of new posts by email.