16
Jun
17

The Black Widow Mk III MIDI

I described first of all the creation of the Black Widow Sample Player and Manipulator, and then some significant improvements in The Black Widow Mark II.

The improvements made in the Black Widow Mk III are not quite as significant, but add to the ease and accuracy of use by adding MIDI control.

*

The particular device I had in mind was my trusty Korg Nanokontrol v1, which I use for a number of other applications such as  the FXBOX and the REplay PLAYer .

With 9 sliders, 9 rotary controls and 18 buttons, the Nanokontrol gives access to a large number of parameters. All I had to do was link the CC  numbers output from the Nanokontrol to the inputs of the controls in the Pd (Pure Data) patch for the Black Widow.

In this case I didn’t need to use the Korg Editor application to reassign any of the default CC numbers, I just needed to use the default numbers appropriately in the Pd patch.

For the most part, this just meant creating a duplicate set of controls accepting MIDI input from the Nanokontrol, alongside the controls accepting ‘hid’ (Human Interface Device) input from the Black Widow throttle/joystick.  These are typical examples:

In the same way as the ‘hid’ inputs, all 4 samples can be operated by the same button, slider or rotary control; exactly which sample is to be affected is chosen beforehand.  Due to the complexity of the selection page relating to the ‘hid’ controls, the MIDI controls have been placed separately, but the typical output – e.g. [s filter1], [s filter2] etc. are identical to the outputs of the ‘hid’ controls elsewhere.

The main page of the Black Widow Pd patch has been changed to reflect the new additions:

At the same time, there have been a few other updates, including provision for the file names to be displayed on the Sample Monitor screen and improvements to the Track Active and Reverb/Echo on/off indicators:

These various updates have taken the current version number to 37.  This or a later version of the patch can be found here.  [Click ‘Save Link As’].

16
Jun
17

Sample Manipulation 4 – Databending

I started talking about manipulation of samples by describing The Black Widow, a PureData patch for controlling up to 4 samples using a flight simulator-type joystick control, and the Black Widow II, with improved features and an automatic mode.  I also described two other applications by Karlheinz Essl and Kevin Holland (Sineqube) which work similarly, manipulating 4 samples in real time.  The third post in the series described two applications which work in real time to manipulate a single, longer sample.

This post covers some non-real time methods of working on samples, often known as ‘Databending’.

The basic idea of databending is very simple: open a sound file with an application it’s not meant to be opened with, change the file in a semi-random way, then save it.  When you play it again as a sound file, it will sound different from the way it sounded originally.  Often quite a lot different.  Some good advice on how to do this can be found at http://www.intelligentmachinery.net/?page_id=29.

*

First of all, what sort of files does it work on?  I’d say you should always start by trying different formats of the same sound file – certainly an uncompressed format like aiff or wav, and a compressed format like mp3 or flac.  There can be a big difference in the results.  Once you’ve tried a particular technique on two or more formats, you might decide it generally works better on one of them, and then concentrate on that one; the next technique you try might work more effectively on another type.

*

Secondly, try some files with different musical content: one file with, say, fast percussive content, another with slow, sustained passages.  A particular technique might suit one style, but not another.

*

Next, what ‘other’ applications could you try?

Text applications are always good.  All files can be displayed as text, as you will have noticed if you’ve ever had occasion to read one – trying to open a pdf in Word by mistake, for example.  It generally looks like gobbledygook most of the the way through, although there’s occasionally a ‘header’ at the beginning with some readable stuff in it.

Sometimes, even the mere act of opening a sound file in a text program and immediately saving it can make significant changes to the way it sounds when you play it back again.  Notepad in Windows or Text Edit on a Mac can be used in this way.  Provided you save the file as ‘text’ and keep the extension (e.g. ‘.wav’ or ‘.mp3’) the same, you’ll be able to play it back.

The first example shows this.  The first extract is from the original sound file I used; the second extract is the file opened and saved in Notepad on a PC; the third extract is the file opened and saved in Wordpad.

Once you’ve got the file in a text editing application, however, there are many things you can do with it.  I’ve tried the following and got some interesting results: changing all lower case letters to uppercase; changing all zeroes to 1’s; changing 1’s to zeroes; cutting and pasting text from other places into the middle of the file; and swapping bits of the file around.  Occasionally you’ll end up with a file that won’t play at all, occasionally a file that sounds exactly the same as it did before – which is particularly disappointing – but usually you’ll have changed something about it in a hopefully interesting way.

Incidentally, I normally use ‘Save As . . .’ rather than ‘Save’, and give the new file a name which reminds me what I’ve done to it.  This has the double advantage of helping me to achieve the same effect again by working out what I did to the file, and ensuring that I don’t lose an original which I might need again – either in its original form, or as the source for more experimentation.

*

Some of these files that you end up with can be rather unstable and may sound different depending on which application you choose to play them back in.  So my next piece of advice would be to try some different applications to audition the results of your work – Windows Media Player, Audacity, VLC, Quicktime, and so on.

If you have a way of re-recording them as you play them, this would be good, as you can then save a stable file which will sound the same whenever you use it.

The second example illustrates this.  The first extract is the original sound file I used; the second extract is this file after processing in BBEdit Lite, played back using Videolan VLC; the third extract is exactly the same BBEdit Lite file played back using Apple Quicktime, producing a significantly different result.

Both files were re-recorded to preserve these differences permanently, as described above.  I use an excellent application called Wiretap Studio for this, but it isn’t freeware.  There are ways to do it without having to buy extra software – free applications like Soundflower (which I think only exists for Mac) or Jack will enable you to route the output of one application, which plays the sound file, to the input of another (like Audacity, for example), which records it.

*

Another, less obvious, way to ‘bend’ sound file data is to open the file in a picture editor like Photoshop, apply an effect and save the file.

This is slightly more complicated; I don’t know about other applications, but Photoshop won’t recognise sound files as pictures, so you have to do a couple of things to persuade the application to try opening it.

First of all, make sure to choose ‘All Documents’ (as opposed to ‘All Readable Documents’) from the ‘Enable’ list.  This makes all files, even sound files, potentially openable.

In my experience the ‘Format’ option was greyed out, but make sure it shows ‘Raw’ to enable a dialogue box like this to open up:

Clicking ‘OK’ should enable Photoshop to open the sound file, and give you a visual representation of it.  It’ll look something like this:

If it doesn’t open and you get the dialogue box at the top of the following picture – which happened to me a lot – reduce the numbers indicated until you get the dialogue box at the bottom, then it will open.

After that, you can apply some effects to the file, then save it.  As mentioned above, I would keep the suffix – usually .aif or .mp3 – the same, but change the file name to reflect the process it had been subjected to.  I had some success with Gaussian Blur, Noise and Despeckle, but any one of the many effects could do something to the sound.

The first example here shows the original sound file; this file with a Gaussian Blur filter applied; then this file with a Despeckle filter applied.

The second example shows an original .aif file with a Noise filter applied; and an original .mp3 file with a Noise filter applied, to show the different effect an identical filter may have on a sample which was identical in every way except the file format.

*

If you have problems opening a sound file saved by a graphics application such as Photoshop, the free Audacity can probably help.  Even if you get the dialogue box shown at the top of the following picture, you can still use ‘Import’/’Raw Data…’ to open the file, and then save it in the format of your choice.

Using the above methods you should be able to make some random, unpredictable and interesting changes to your sound files.

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:




andymurkin

June 2017
M T W T F S S
« May    
 1234
567891011
12131415161718
19202122232425
2627282930  

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