12
Oct
12

Bigfoot – automatic/remote stylophone control, Part 1

I’d made enough instruments for the time being, and it was time to construct some automatic controllers – sequencers, arpeggiators and the like – as an alternative to playing them by hand.

When I made the SoftPot Stylophone, I had added a socket which allowed external circuitry to replace the chain of resistors which govern the pitch of the instrument.  This project was to make a device which would be able to use this feature to operate the SoftPot Stylophone remotely, and this rather blurry photograph shows the result – Bigfoot:

DSCF0005

I got the inspiration from several places: the arpeggiator and sequencer from Fun with Sea-Mosshttp://milkcrate.com.au/_other/sea-moss/; the melodygenerator by Slacker described on the electro-music.com forum: http://electro-music.com/forum/viewtopic.php?t=27239&postorder=asc&start=50; and the Intro to Lunetta Synths at https://docs.google.com/document/edit?id=1V9qerry_PsXTZqt_UDx7C-wcuMe_6_gyy6M_MyAgQoA&pli=1,  All these sites are full of great ideas and practical examples.

The main chip used in the circuits described above is a 4051, which is basically a single-pole 8-way switch.  It’s usually depicted in circuits like this:

The way it works is like this: it’s an analogue switch, not a digital switch, meaning you can connect anything you like to the pole (pin 3, marked Z in the diagram) and the 8 switch input/outputs (on the right-hand side, marked Y0 – Y7).  It doesn’t have to be logic high or logic low (i.e. +v or 0v) , it can be any voltage, an audio signal, anything – just like a physical switch.  Any one of the 8 input/outputs can be connected – one at a time – to the pole, not by turning a physical switch, but by the logic high or logic low status of the 3 ‘Select’ inputs (pins 9, 10 and 11, marked S1 – S3).

You can have every combination of logic high and logic low on the three Select inputs, ranging from 0v on all of them, 0v on one of the three and +v on two of them, +v on two of them and 0v on one, or +v on all of them.   There are eight possible variations, starting with 0v on all of them, which you could represent as ‘0 0 0’ or the binary equivalent of the number zero, to +v on all them, which could be represented as ‘1 1 1’ or the binary equivalent of the number 7.

If you feed 0v to all three of the Select inputs, or ‘0 0 0’, this is lowest possible binary number, so the lowest or first input/output is connected to the pole (Y0, pin 13); if you connect, say the one on pin 9 (S3) to +v and the other two to 0v, this would be the binary number ‘1 0 0’, the equivalent of the number 4.  Because the sequence starts with ‘0 0 0’ , or zero, feeding in ‘1 0 0’  connects the 5th rather than 4th input/output to the pole (Y4, pin 1).  By connecting all the Select inputs to +v, or ‘1 1 1’ (the number 7), the 8th input/output is connected to the pole (Y7, pin 4).

In the circuits I looked at, a common type of connection would be to have the pole connected to the part of an oscillator circuit that determines the pitch, and 8 input/outputs connected to different value resistors.  This would mean that a different resistance would be connected to the oscillator and a different pitch would be sounded when each of the 8 input/outputs was connected to the pole.

You could determine whether each of the Select inputs was a ‘1’ or a ‘0’  with  three 2 way switches, +v one way, 0v the other way, and change the notes by moving different switches up and down.  But this would be rather tedious.  By adding a circuit that automatically changed the ‘1’s and ‘0’s, you have a melody generator, arpeggiator or sequencer.

This was the kind of circuit I was after.

However, 8 notes was bit restricted.  Not restricted because there are 12 notes in one octave, though: I reasoned that you could make life easier for yourself by only allowing notes in a single scale – the ‘do’, ‘re’, ‘mi’ approach so succinctly captured in the Rodgers and Hammerstein song from The Sound of Music (‘Do a deer, a female deer/Re, a drop of golden sun’, etc.).  There are only 8 notes in a  ‘do’, ‘re’, ‘mi’ scale, including the next ‘do’ up from the one you started from.  If you just use those, you’ll never get an ‘out of tune’ note in your arpeggio or sequence.

The proper name for the ‘do’, ‘re’, ‘mi’ system, by the way, is ‘tonic sol-fa’, and was invented here in East Anglia by Sarah Ann Glover of Norwich, who lived from 1785 to 1867.  This 1868 woodcut shows Sarah Ann teaching ‘do’, ‘re’, ‘mi’ to the musical children of Norfolk:

(Why this public domain picture  is held by Music Department of the Bibliothèque National de France is not adequately explained by the Wikipedia, where I found it.  I suppose the fame of ‘do’, ‘re’, ‘mi’ is international).

No, it was restricted instead because the SoftPot Stylophone has 12 ‘do’, ‘re’, ‘mi’ steps from the bottom of the keyboard to the top – and in any case could be made to produce notes outside the range of the built-in keyboard.

So I decided I needed 16 steps (2 octaves, including ‘do’ two octaves up from the start), and found a chip, the 4067, to do the job.  The 4067 is a single-pole switch like the 4051, but with 16 switches instead of 8.  The only way it differs in operation from the 4051 is that it requires 4 Select inputs in order to go all the way from ‘0 0 0 0’ (zero, meaning the first input/output is connected) to ‘1 1 1 1’ (15, meaning the 16th input/output is connected).

The 4067 usually appears in circuits like this:

It’s very similar to the 4051: there’s a Pole (pin 1, marked Z); 16, instead of 8, input/outputs (right-hand side, marked Y0 – Y15); and 4, instead of 3, Select inputs (pins 10. 11, 13 and 14, marked S0 – S3).

I also decided to make things slightly more complicated by considering alternative scales.  If you follow the ‘do’, ‘re’, ‘mi’ scale of the Rogers and Hammerstein song, this is a major scale.  If, on the other hand, you wanted to play, for example, a minor scale, you would find that ‘mi’, sometimes ‘la’ and sometimes ‘ti’ have to be changed to be a semitone lower.  And occasionally you might feel like making ‘re’ and ‘so’ lower as well.  (‘Do’ and ‘fa’ can be left alone!).

I’ll explain in a minute exactly what scales I had in mind when doing this, and where I got the idea from, but adding the ability to sharpen or flatten certain notes of  the scale meant that I needed 25 notes instead of 15, so the 4067 was wired up like this:

4067 1 Edit

The notes depicted are the notes that would be used in the key of A.  Since the SoftPot Stylophone has a tuning control (in fact two tuning controls!) on it, it can be made to play in any key, not just A; the circuit here doesn’t need to be changed, only the tuning on the SoftPot Stylophone itself.

Each of the 16 outputs of the 4067 is connected to a resistor in a chain.  The top of the chain is connected to the tip of a 3 way (‘stereo’) 3.5mm socket; the bottom of the chain is connected to the ring, and the sleeve is connected to pin 1 of the 4067 – the pole of the 16-way switch.  When plugged in, it takes the place of the Stylophone’s own resistor chain.

Note that switches allow you to choose between 1) major and minor 2nd (‘re’); 2) major and minor 3rd (‘mi’); 3) major and minor 5th (‘so’); 4) major and minor 6th (‘la’); and 5) major and minor 7th (‘ti’), as you see fit.  C1/C#1 and C2/C#2, D#1/E1 and D#2/E2 etc. use the same switch, so there are 5 of these switches, not 10.

The reason I chose to do it this way is because of an extremely interesting article – series of articles, actually – which I read on The Tonal Centre website, written by Andrew Milne.  I’m not in the slightest bit concerned that the theory described there is ‘unconventional and some of the concepts . . . quite novel’, as it seems to me to make perfect sense, and presents a coherent view of scales and chords which I’ve found quite easy to understand, and useful to use.  Furthermore, Milne’s motives for writing the articles are ones with which I would hope none of my readers could disagree: ‘not for theory to be an intellectual straight-jacket which smothers spontaneity, but as a springboard for creativity and, even more importantly, as a foundation for exploration’.

Essentially, the articles do precisely as the author says in his introduction: ‘convince you that there is a lot more for the tonal composer to experiment with . . . than just the major and the minor scale.’

I can’t explain everything in the articles because a) there is too much, and b) I don’t understand it all; but essentially, the points I want to draw attention to are these:

1. What constitutes a useful and versatile scale?

A scale should constitute ‘a unified collection of notes – a selection which is in some sense complete and to which any addition is heard to be extraneous’.

2.  What makes a scale useful as a melodic resource?

A scale should be ‘reasonably smooth and even, without sudden gaps which sound as if a note has been omitted, or sudden concentrations of notes which sound as if an extraneous note has been added’.

3.  What makes a scale useful as a harmonic resource?

Because three-note major and minor chords are the basis of our kind of western music (like C-E-G and C-Eb-G), a scale shouldn’t have any notes which aren’t part of a three-note major or minor chord.

Of all possible scales there are only five prime scales which satisfy Milne’s criteria, as above. (These are the main criteria, but see the full article for a couple of others).

All of these scales contain, as it happens, seven notes, and these are clearly the most useful and versatile scales to use.  This was good news for me, as the Bigfoot would inevitably use 7-note scales.

There are 8 different scales altogether in Milne’s system, not just 5, because of  differences between major and minor, and so on, and these 8 variations of the 5 ‘prime scales’ (in the key of C) are:

1.  The diatonic scale, major and ‘aeolian’:

C-D-E-F-G-A-B

C-D-Eb-F-G-Ab-Bb

2.  The harmonic minor scale:

C-D-Eb-F-G-Ab-B

3. The harmonic major scale:

C-D-E-F-G-Ab-B

4.  The melodic scale, major and minor:

C-D-E-F-G-Ab-Bb

C-D-Eb-F-G-A-B

5.  The double harmonic scale, major and minor:

C-Db-E-F-G-Ab-B

C-D-Eb-F#-G-Ab-B

So, there are 8 different scales you can use, which all allow you to make interesting melodies and chords.  Each one has its own ‘character’, and some are much more commonly used than others.

This series of articles seemed to me when I came across it to be an extremely good guide to useful scales, and could be a help to anyone: you could use the description above to work out what scale or scales you commonly use, and then try writing a composition or improvising a solo using a completely different one.  There’s bound to be at least one you’ve never thought of using before!

Bigfoot allows the 2nd, 3rd, 5th, 6th and 7th (D, E, G, A, B in the above examples) to be individually adjusted, so arpeggios and sequences in all – well, almost all! – of these scales are possible.  The double harmonic minor isn’t possible because Bigfoot can’t produce F# and G at the same time; but 7 out of 8 isn’t bad!

So, 16 individual intervals are available  from the Bigfoot, spread over two octaves; the tonic is repeated 3 times, at 3 octaves; the 4th is repeated twice, at two different octaves; the other 10 notes are switchable between a ‘normal’ or ‘flattened’ version, which is semitone lower.

Hang on, that’s only 15 intervals . . . Well, since all 16 Select input combinations from ‘0 0 0 0’ to ‘1 1 1 1’ could be used to produce notes, there might in some circumstances be no way of stopping the Stylophone from sounding; so what I did was to start with ‘0 0 0 1’ (the second output) and make that the lowest note, reserving ‘0 0 0 0’ (the first output) for a rest where no note would sound.  I added a switch so that the first and second inputs could be connected together for those situations when this would be better.

I also added a START/STOP switch, which is what pin 15 of the 4067 does: if connected to +v it stops, and all the switches are disconnected, regardless of the state of the Select inputs; if pin 15 is connected to 0v the switches start to work.  (The 4051 also has this feature).

In practice, I actually installed a second 4067, with the two 4067’s being connected only at the 4 Select inputs (pins 10, 11, 13 and 14).  I wanted to have an LED indication of which switch was connected, and had to separate this function from the resistor chain that produced the notes.

So the pole pin of the second 4067 was connected to +9v via two 1k resistors [not one, as shown in the diagram], and each of the 16 outputs was connected to a green LED (matching the green case the circuit was built into).

4067 2

In order to test the LEDs – and later to test the notes which were being produced – I needed some way of connecting exactly the right input/output to the pole of the switch, so I would know I was adjusting the right preset.  This meant feeding exactly the right combination of  +v (‘1’s) and 0v (‘0’s) to the Select inputs, to get exactly the right output.

I considered four 2-way switches, +v one way, 0v the other way, and changing the notes by moving different switches up and down, as I described before – but it turns out there is a device which does this job very simply, just like turning a rotary switch: a 4 bit binary (sometimes called hex) rotary encoder.  I wouldn’t say these are extremely easy to come by, but this is the one I got:  http://uk.mouser.com/ProductDetail/Alpha-Taiwan/RE2001F-40E2-20F-4B/?qs=yA6kp8fx8Y4fjZ7sDt2l6A%3d%3d.

rotary encoder2

(The above picture shows a typical rotary encoder made by Alpha Electronics.  RS online sell a couple, but looking at the product details, I don’t think the connections of the ‘Code 033’ version they sell is right.  There are lots of 2 bit encoders, and lots of encoders which are not binary or hex.  They won’t work – it has to be 4 bit binary with 16 positions, starting with ‘0 0 0 0’ at position 1 and stepping through the binary numbers 1 – 15, ending up at ‘1 1 1 1’ at position 16. These are referred to as ‘hex’ because the hexadecimal system has 16 numbers in it [usually written as ‘0 1 2 3 4 5 6 7 8 9 A B C D E F’ – a more user-friendly way of depicting ‘0 0 0 0’ to ‘1 1 1 1’]).

I needed to use the encoder for another part of the circuit, which I’ll come to later, but for the time being its 4 outputs were connected directly to the 4 Select inputs, ‘A B C D’, of the 4067s.  Its other connection, ‘Common’, was connected to + volts.  To test it, I used  4 LEDs, and could see that turning it from position 1 to position 16, it automatically output the binary numbers in order from ‘0 0 0 0’ to ‘1 1 1 1’.

It’s worth mentioning an important point, to avoid later confusion, which is that ‘D’ is actually the bit on the left in a binary number such as ‘1 1 0 0’, and ‘A’ is the bit on the right.  You might sometimes see ‘D’ referred to as the ‘Most Significant Bit’ (or ‘MSB’) and ‘A’ as the ‘Least Significant Bit’ (‘LSB’).  That means the number sequence goes like this:

D  C  B  A

0  0  0  0

0  0  0  1

0  0  1  0

0  0  1  1

0  1  0  0

etc.

The other thing about rotary encoders is that they don’t usually have a stop, they just go round and round.  This is fairly useless if you need to know where ‘1’ is, or where ’16’ is, and this is the main reason why I decided to incorporate the LEDs as a visual indication.  The other reason is that sequencers and so forth really ought to have flashing lights on them.

The rotary encoder is the knob on the right-hand side of the Bigfoot, just to the right of centre in this picture:

DSCF0003

I glued the LEDs in place on the top and connected up the rotary switch.  Sure enough, with each turn the LEDs lit up one by one, one at a time, and now it was possible to tell which was position 1, which was position 2, etc.

Not only that, with the lack of a stop at 1 and 16 – which you would expect with a normal rotary switch – if nothing else I had Method 1 of controlling the Stylophone remotely: a manual method of arpeggiation by spinning the encoder backwards and forwards! . . .

. . . Entertaining, but not the automatic method I was looking for, however, so I moved on to Part 2 of the construction.


0 Responses to “Bigfoot – automatic/remote stylophone control, Part 1”



  1. Leave a Comment

Post a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.


andymurkin

October 2012
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
293031  

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