Tuesday, 8 September 2020

USB to 9V 'Pedal' Cable

Histories of Electronic Music often  concentrate on hardware, in an 'insider' code: TR-808, DX7, MPC, D-50, RC-505, EIV, etc., or on bands/perfortmers/artists, again very 'insider' in nature: NIN, Erasure, Daft Punk, Deadmau5, Kraftwerk, Bassnectar, BT, Mili, Fluke, etc. Another possible method of categorisation might be recording technology, wire, tape, multi-track, portastudio, DAT, CD, mp3, SD card, etc. 

But there's one pivotal hardware technology that most people assign to the sidelines...

Power cables. Yep, those IEC mains leads, USB cables, the often-unloved wall-wart adapters and their captive leads, and... guitar pedal cables. At the risk of sounding like a movie trailer (remember going to the movies pre-lockdown?): 

In a world where data seems to be going wireless and enabled by lithium-ion batteries, distributing power to gear is still physical wires. 

Allegedly, the world nearly had wireless power via Nikolai Tesla's Wardenclyffe Tower experiments funded by J.P.Morgan (yes, that J.P.Morgan!), and magnetic induction on the grand scale may now be impossible because of the way we have developed electronics, but applications like mobile phone charging are viable, albeit over very short distances. Instead, we have mains electricity, or batteries. Batteries are increasingly not the throw-away zinc-carbon et al cells, but rechargeable lithium-ion et al, and the current knowledge of physics suggests that there aren't any huge leaps in energy density - so significantly smaller/lighter batteries with huge power storage will require huge advances in physics. Lithium-ion batteries are increasingly used in power-banks that can power more than just phones, and USB has become a pretty ubiquitous delivery mechanism.

However, guitar pedals are different...

Unfortunately, guitar pedals come from an era of 9V batteries made up of stacks of six 1.5 Volt cells: PP9s as they were called before the modern obsession with renaming battery sizes every few years started, which sounds a bit like the way that USB connectors and video connectors get changed every few years. But modern pedals often no longer have any provision for a removable 9V battery, instead a centre-negative 2.1mm barrel connector provides the DC power. - from the mains! But that DC power is 9V, not the 5 Volts that you get from USB...

Up until very recently, that was the end of the story. Pedals were 9V, (not USB!) and you used a wall-wart power supply to convert mains to 9V DC, with daisy-chained connectors for pedal boards (or better, but more expensive: isolated outputs). However, the last decade has seen a lot of advances in Power Converter chips, and they have got smaller and lighter... To the point where you can put them into connector plugs. So it is now possible to convert the 5 Volts that you get from a USB charger to 9V with what appears to be just a cable.

A Deluge of Ideas

It was the Synthstrom Deluge FAQs that reminded me about USB-to-9V cables. The Deluge groovebox is quite unusual because it can work of an internal lithium-ion battery (Yep, it really is very close to the 'Novation Circuit on steroids, or Circuit 2' that many people have wanted for some time...). I've got a small 'classic' Boss BCB-30 pedal board that is mains powered, plus several pedals (An OWL, a Poly Digit and various other 'boutique' pedals that might get put onto a board eventually (none of which have 9V batteries!). But power has always been the problem, and it goes well beyond the usual 'serious' pedal board design advice:

'Don't daisy-chain one adaptor: Use a power supply with multiple isolated outputs.'   

Synthstrom Audible suggest that one way to power the Deluge is to use a lithium-ion USB power-bank with a USB-to-9V cable to do the voltage conversion. So I ordered a couple of cables from Songbird FX...

BirdCords from Songbird FX

Here's what I got: two bags (everything is in bags these days!) with the ubiquitous stickers! What looks like a cable with a 2.1mm barrel connector on one end, and a USB plug on the other end, is the USB-to-9V converter cable. It can provide a peak of 1 Amp, which means that as long as your USB power-bank (or USB charger/mains adaptor) can provide enough current, then you can power quite demanding devices. I tried my Deluge, and with my usual 'LEDs almost at lowest brightness' setting, the current consumption was just over 300mA, and with full LED brightness, it went up to around 425mA. The Default 'full brightness' LEDs on the Deluge is very bright, by the way:

Deluge LED brightness illustrated
The Deluge can be very bright!

I powered the Deluge through the USB-to-9V cable for just under an hour in an ambient temperature of 25 degrees Centigrade, and the plug only got slightly warm, so it looks like there's no problem with providing about half an amp continuously. 

The cable is disarmingly small and light - the plug isn't a big heavy blob at all! I then tried it with a pedal, captured here in an 'action' shot:

As you can see, the 9V connector is plugged into a pedal, and I'm just about to power it via the USB connector. Stunning cinematography, eh?

I'm very pleased with my BirdCords. They are small, neat, do what they say, and are useful gadgets to have around for emergencies, as well as a perfect way to reduce the proliferation of different mains adaptors. 10/10 from me.


Okay, so the Deluge already has a battery inside, but there's lots of gear that doesn't! And none of my boutique pedals have batteries inside! So having USB-to-9V cables means that I can remove my dependence on mains power, by using power banks, which is great for live performance - especially unreliable mains power.  Even if mains power is available, then having just USB adapters/chargers means that I have more interchangeability in case something goes wrong... Losing power mid-set isn't my favourite experience: the thumps and clicks in the audio are bad, but having a laptop still powered up when your synths, drum machine and effects are all rebooting to an unknown state is pure stress and embarrassment. 

So my aspirational mobile rig would have a high power (20,000 mAh or more) USB power bank to power USB-powered gear, with USB-to-9V cables powering my pedal board. But my 'ideal' mobile rig would be to have two power banks with auto-switching between them... I'm trying to find something that does this...


Songbird FX - BirdCords, including the USB-to-9V cable featured here.

https://synthstrom.com/product/deluge/ - The Synthstrom Audible Deluge web-page...

http://n.wikipedia.org/wiki/Lithium-ion_battery - Info about lithium-ion batteries...


If you find my writing helpful, informative or entertaining, then please consider visiting this link:

Synthesizerwriter's StoreSynthesizerwriter's Store
 (New 'Modular thinking' designs now available!)

Monday, 31 August 2020

Decoding a 'ParamName Value' control string in MaxForLive...

Over time, Max and its 'Ableton Live' cousin, MaxForLive, have iteratively added functionality to do music, MIDI and audio-related tasks. 

Me, I'm not so good with new functions. I tend to use the same Max objects over and over again, because I know them, I'm familiar with how they work, and so I use them. 

The problem is, sometimes this means that I struggle to solve problems when there's a perfect solution just waiting, not hidden but overlooked, already in Max. This happened recently when I wanted to decode a 'ParamName Value' control string, and string processing is not one of Max's greatest strengths. I have used quite a few of the 'zl.' list processing functions, but there are a lot that I've never used as well. Searching through the 'zl.' help pages, I found 'zl.sub', where the example shown isn't very exciting:

Okay, so for the first number, '1', then it will output the number '1' indicating the first position in the list. And 2 for the second item, and so on. But then I realised that the numbers were distracting me, this is a list processor, and so it could be any 'symbol': numbers or text. It suddenly dawned on me (Duh!) that the 'sub' in the name meant 'Sub-set', and it all became clear. All of those convoluted 'If' objects that I had struggled with previously to process text strings were instantly rendered obsolete. 

Yep, a face-palm moment.

So here's an example that should make it much clearer what you can do with zl.sub in a more musical  'MaxForLive' type of context:

At the start is a control string: a parameter name, followed by the value of that parameter. The sort of string that is human-friendly... The 'fromsymbol' object turns it into a list containing a string symbol ('Cutoff') and an integer ('100'). This is then split into two separate fragments by the 'unpack' object. The symbol goes into zl.sub, which reports back that 'Cutoff' is the 5th item in the list, and the integer is the value of that parameter. 

Human-readable input becomes programming-friendly name and value pair. It's not a click-bait headline, but it makes quite a few of my abandoned projects much more possible now. 

So that's a face-palm turned into a light-bulb moment. Not bad for a Max command I'd always overlooked. My Day: Made. Happy face.

(Yep, one of the shortest blog posts so far, I think...)


If you find my writing helpful, informative or entertaining, then please consider visiting this link:

Synthesizerwriter's StoreSynthesizerwriter's Store
 (New 'Modular thinking' designs now available!)


Sunday, 30 August 2020

Customising a Yamaha RM1x Groovebox Floppy Disk Emulator

Vintage gear can develop a number of problems. There is already a lot of material available online about replacing electrolytic capacitors, which heat and age can dry out causing them to lose capacitance. Unsoldering capacitors is fiddly work, really needs a good quality desoldering station, and can take a lot of time if there are lots of capacitors to change (replace with higher temperature rating and higher voltage if there is space...) Backlit LCD displays are another common problem, where the electroluminescent backlight drivers fail over time, and the LED backlights gradually seem to go dim. If you can find OLED replacements then these are arguably the best, but I haven't been able to find out much about the real-world long-term life of them - after all, 90s gear is nearly 30 years old! And then there are 3.5 inch floppy disk drives - particularly the ones which use belts instead of direct drive. It seems that old drive belts go loose, or go sticky, or go brittle, and all of these tend to result in a floppy drive that doesn't work. 

I've been gradually replacing the backlit displays and floppy drives on my vintage gear. To be more accurate, I mean 'what used to be backlit' displays. When you start replacing displays, you quickly discover that the difficulty of doing it varies enormously. Some synthesizer expander modules (the Yamaha TX7, for example) are very easy, whilst some keyboard workstations can require quite extensive amounts of disassembly. Here's a link to a pretty detailed description from a blog post describing the process for a Korg Wavestation: https://jaryic.livejournal.com/11778.html . As it says, 'not for beginners'. I couldn't find any way to backlight my Roland TR-505, though, so if anyone has any ideas, just let me know...

Floppy drives tend to be easier to replace, but there are sometimes complications. For example, the Yamaha SY99 uses a 26 pin floppy drive interface cable, rather than the more usual 34 pins, and that has long been a topic of much discussion on the relevant Yamaha forums. Most of the better companies that sell floppy drive emulators are well aware of this complication, and have their own reliable, verified and tested adapters. 

My own description of the pinouts of the 26 and 34 pin connectors is still available on the Interweb: http://www.martinruss.com/sy99adapter.html Then there is also my description of replacing a failed SY99 floppy with the long-discontinued official Yamaha replacement, complete with Yamaha adapter board: http://www.martinruss.com/sy99.html This article is probably rapidly becoming 'vintage' in its own right!

But my Yamaha RM1x floppy drive proved to be a different type of challenge. The floppy drive is accessed via the front panel of the RM1x, whilst the main control surface of the RM1x is the top surface. 

When the only control on the floppy drive was the 'Eject' button, and the writing on the floppy label was easy to read as it ejected, this was fine, but for modern floppy emulators, there are more controls, and a display. The simple 7-segment LEDs are not my recommendation - OLEDs which show file names are much better, if a little tiny. But the display is on the front of the floppy emulator... 

This means that the OLED display of the floppy emulator is not easy to see when you are using the RM1x. You only need to bend down and lean back a few times so that you can see the display before you realise that it is very awkward. So I moved the display so that it was easy to read when you are using the top 'control' surface of the RM1x!

But, first things first. I got my floppy disk emulators from CPMagneticMedia on ebay.co.uk: https://www.ebay.co.uk/usr/cpmagneticmedia , who are very knowledgable, and have a wide range of floppy emulators, backlit LCDs, and lots of other useful stuff for customisers/upgraders, etc. 

The first thing I did when I had the floppy emulator installed and working was to remove it, open it up and thus void the warranty! The OLED was held in place with hot glue, which is easy to remove if you have a hot glue gun...

But before removing the OLED display, I got a 'potting box' of about the right size and worked out how much I needed to cut it down with my trusty Dremel...

Then I removed the OLED display (Carefully! They are very delicate - note the black foam used to hold it in place...) and removed the remaining hot glue with snipe nose pliers.

Then I cut the potting box to size and cut out a window in the top surface the correct size for the OLED display - using the existing hole in the floppy emulator as a guide. 

One of the actions to keep doing when making mods like these is to check and re-check. So I now checked that the OLED, the mounting foam and the new potting box all fitted together nicely.

I then extended the four way cable to the OLED, so that I could push it through the hole in the floppy emulator front panel.

I then mounted the OLED display in the potting box, using the mounting foam and more hot glue, then glued the potting box to the floppy emulator front panel.

And from the top, things are a lot neater in appearance.

From the remains of the potting box, I then made a cover for the underside of the box, to hide the extender cable... and glued it in place.

The finished result looks very nice!

Now you can easily see the display when you are controlling the RM1x.

Full disclosure: before I extended the display into the potting box, I did explore using a prism to try and twist the display so it would be visible, but this suffered from the 'mirrors only swap one direction, not both' problem and I got reversed text on the display.

I would like to thank CPMagneticMedia for all their help with this project!

As with any mod, you are almost certainly going to invalidate warranties, and you may break rare or custom parts that are hard to find. So you do any mods at your own risk! Only do mods if you are confident and experienced. 


If you find my writing helpful, informative or entertaining, then please consider visiting this link:

Synthesizerwriter's StoreSynthesizerwriter's Store
 (New 'Modular thinking' designs now available!)

Friday, 21 August 2020

Customised Synthstrom Audible Deluge

One of my background tasks for the past few months has been researching mid-to-high-end 'grooveboxes'. Whilst the marketplace has lots of low cost (sub $500~) examples of 'single portable boxes that can create music using MIDI and samples' (aka grooveboxes, although there are much more sophisticated and complex definitions), from Teenage Engineering's Pocket Operators, OP-1/Z, the Roland MC-101, Novation's (hard to beat) Circuit, Korg's Electribe 2, Elektron's Digitone/Digitakt and Model:Cycles, Polyend's Tracker, the 1010 Music Blackbox, plus many more, the next level up is significantly more sparsely populated and much more diverse in approaches. Doubling the budget ($500-$1000 and more) can get you a much more capable device, but I wanted to know which one was best suited to my way of thinking? 

(The title of this post kind of gives away the end result, of course!)

Many years ago, I remember being greeted with a certain amount of disbelief when I expressed my opinion that the major deciding factor in choosing a DAW should be the workflow and its alignment with your own internal mental model of how to make music. It seemed that brand-name, who else used it, resolution, number of tracks, latency, bundled plug-ins and many other factors were far more important to many people. My opinion hasn't changed, although I have found that I have increasingly moved to the 'boutique' end of the market: small, independent manufacturers who tend to be musicians and technologists. As an example, my most sophisticated pedal is a Poly:Digit, which isn't exactly mainstream...

The other vitally important word in that brief definition is 'single'. When I go away from a DAW with access to external hardware synths and effects, into the 'live performance' scenario, then I'm looking for ideally one box, and probably three boxes maximum. I've played the game of having lots of equipment to set up and tear down, and like most people who have done that more than a few times, I have decided that:

Simplicity Means Less To Go Wrong! 

But back to those 'next level up' grooveboxes. So what are the main contenders? I whittled the list down to these:

- Elektron Octatrack (mk1 or mk2 (mk2 is a makeover that is probably more like a 1+))

- Roland MC-707

- ModDuo X

- Synthstrom Audible Deluge

- Akai Force

- plus a few others that were fighting for attention (MPCs!), and I even considered a few no-longer-current devices - even though trying to find second hand gear can be stressful... 

As always, your favourite is probably missing from this shortlist. Note that I deliberately rejected these whole categories:

- hardware 'sequencer-only' devices (no Squarp Pyramid or Polyend Seq or Social Entropy Engine...) 

- hardware controllers that require a DAW or computer (NI Maschine, Ableton Push...)

- modular 'sequencers plus a few modules'. (Creeping module purchases means your rig is never quite finished...)

My opinions

After months of careful research, here's my personal opinions:

- Elektron Octatrack. 

The Octatrack has been bubbling under on my GAS list for a long time. And that's probably the main issue - it has been around for so long that it may be about to be replaced, and I hate buying something which is immediately replaced by something much better for less money! 

Pros. Flexible sample playback, a song-mode sequencer (the Digitone and Digitakt lose points because of their lack of song support), and some neat processing. The eight channle scan also be used as a mixer, which is interesting. Looping support is also good. The Mark II's slider control is definitely a good reason to go for this in preference to the Mark I.

Cons. Seems to be difficult to learn. This might be the classic 'I will say it is hard to use because that makes me look good!' situation, but the YouTube video's of people using Octatracks seem to reinforce the amount of learning that is required. Is complexity what I want in a live environment? Probably not. Also, most people seem to use other gear with an Octatrack, so that's a concern. Finally, there's the nagging doubt that there's probably a Mark III in the pipeline, or maybe even a total revision.

- Roland MC-707

My first album was recorded using a TB-303, a TR-606 a Sequential Pro-One and a Casio CT-1000, and I've currently got a heavily modded TR-505, so I'm no stranger to Roland gear. The MC-707 is kind of what I reckon an Elektron Octatrack 3 might be like, although with a different workflow...

Pros. Ableton Live-style grid is a plus. Lots of immediately editable sounds without any need for a computer (probably the top feature request for the Novation Circuit 2). 

Cons. No song-mode is a major disadvantage. At the sub-$500 price-point then this is acceptable, but I've spent too long with old school drum machines to want me to be constantly controlling what is happening. No way to send MIDI CCs might also be a problem if I was going to use it with anything else... No 'Scale' mode for the buttons is weird when most of the sub-$500 group have this! Having to effectively sacrifice a track to sequence external MIDI is strange, but again, for a single box then this is not as important as it might be if I was using this as the centre-piece of a studio. 

- ModDuo X

I've been trying to buy one of these for over a year now, and it seems to be permanently out of stock, with pre-orders all being consumed in a few seconds of the site accepting them. So I've more or less given up on this one. I talked to Mod at one of the Ableton Loop events, and they seemed very confident, maybe not in a good way. Given their apparent supply chain problems, maybe my gut feeling was correct... 

- Synthstrom Audible Deluge

Definitely a 'boutique' device, this goes against the grain in all the right ways. No display - well, not a display in the conventional sense, although if you scaled up a Novation Circuit, it could well look a lot like this. An interesting design, with unusual/novel controls that make a lot of sense. 

Pros. Small, light, song-mode (plus arranger functions), Subtractive and FM synths, sample replay, and looping. Comprehensive features and a very good firmware update policy (frequent!). Seems to think the same way that I do!

Cons. Using the display as the main control means that you can spend a lot of time jumping in and out of song mode. As with the Octatrack, there seem to be a lot of shortcuts that require muscle-memory to learn. 

- Akai Force

I immediately thought of a 'DAW in a box' when I first saw this, and this is too much like a Push and Ableton Live. I would struggle to say that I was 'DAWless' if I used one of these.

The result?

I went for a Synthstrom Audible Deluge (a 'Deluge' from this point onwards). It offered the features I wanted, the size and weight and convenience, and a pretty good 'single box' solution. When it arrived, the adapter envelope had a note on it:

So I took the 'Martin :)' and turned it into a label for the top panel:

So if you ever see a 'Martin :)' where you were expecting a Deluge, then that will be me!


I will report on my progress with the Deluge as I get familiar with it... So far, I'm definitely enjoying it!


If you find my writing helpful, informative or entertaining, then please consider visiting this link:

Synthesizerwriter's StoreSynthesizerwriter's Store
 (New 'Modular thinking' designs now available!)



Friday, 10 July 2020

16 steps is not Old School...

The Liverpool Empire theatre - a classic rock venue in the North of England (which is kind of in the middle of the UK, curiously...). The 1970s. An impressionable teenager goes to see Tangerine Dream. Dry ice, mist curtains. LOUD! Edgar Froese does a guitar solo and maybe, almost maybe, acknowledges the headbanging crowd of long-haired, bejeaned youths. The lasers are turned on the mirrorball and the audience gets the full 'spoke effect'! Oh, and there's a lot of 8-bit sequences. Yep, that was me. It was a very different world to the one we inhabit now.

Different? Well, we have 16-step sequencers now, and so it gives me great pleasure to announce the release of MIDIdifferentTWO16, which doubles the number of steps, shuffles and skips, turning the 'Old School' 8-ness into 21st Century 16-ness. Oh, and we now have DAWs, and putting a sequencer inside a DAW is allowed. Oh yes, is it allowed! Dit dit dit dit boom tizz dit dit boom tizz dit dit... (Did you know that Zang Tumb Tumb came much earlier, as well as later, as ZTT...)

16 steps to heaven...

There's a hidden difference in this dual step sequencer from version 0.07 of the 8 bit original. It now has two rotary controls to set the lengths of the sequences. The previous version used up/down nudge buttons and looked cool. I loved it (or I lived it, as my iPhone auto-corrects it to). But then I realised (sinking stomach) that it was tricky to map what Ableton call a 'control voltage' to the Step Length, because I had used the live.tab object to implement the nudginess. Rotary controls are sometimes better!

8 steps to heaven..
And yes, I do know that Ableton's MaxForLive developer guidelines do say that devices should not be wide! But my Probably sequencer is way wider than either of these...

The Advert

Hopefully, by now, this style is starting to take on a life of its own. I've made quite a lot of versions of this infographic up to now, and there are more on the way...

Getting MIDIdifferentTWO16

You can get MIDIdifferentTWO16 here:


Here are the instructions for what to do with the .amxd file that you download from MaxforLive.com:


(In Live 10, you can also just double-click on the .amxd file, but this puts the device in the same folder as all of the factory devices...)

Oh, yes, and sometimes last-minute fixes do get added, which is why sometimes a blog post is behind the version number of MaxForLive.com...

Modular Equivalents

In terms of basic modular equivalents, then implementing MIDIdifferentTWO16 is just two step sequencers, giving an ME of 2 if you can find 16-step sequencers, or 4 if you can only find (or afford) 8-step. It all depends on how GAS affects you, I suppose. The ability to control step values and skips may vary with the specific sequencer, but if implemented, then it is just more patch cables. As I said for the 8-step version: perhaps MEs should also include some sort of measure for the number of patch cables that are required?


If you find my writing helpful, informative or entertaining, then please consider visiting this link:

Synthesizerwriter's StoreSynthesizerwriter's Store
 (New 'Modular thinking' designs now available!)


Wednesday, 8 July 2020

Note Count Processor in Max For Live for Ableton Live

After I described the 'Triple Transposing Delay' with three different ways of connecting the delays together, as 'experimental', people seemed to like that, so my latest release is 'extremely experimental'!

Although it isn't a reliable guide, I've not seen anything like MIDIoneOF before, although, of course, you could do some of it using clip envelopes. In fact, I reckon that you can do almost anything by using clip envelopes, and I'm sure that those people who produce YouTube videos with apparently click-attracting titles like: 'Powerful Advanced Generative Techniques For Ableton Live', in huge white block capitals will be busy making yet more of those videos as I type, although they don't seem to use clip envelopes... When I did release a YouTube video on using Clip Envelopes, it got a wonderful review (Thanks, Darwin!) and over a hundred views, so maybe I should make some more...


MIDIoneOF is the first of a series, because people seem to like it when there is more than one of something, and actually that's part of where the name comes from. I wanted to called it 'n of m' because it is based on permutations and modulo arithmetic, but mathematical notation like 'n of m' isn't very good for naming Max For Live plug-ins, and 'Nofm' sounds like onomatopoeia for eating food, rather than a cool M4L device. So 'One of' got the most votes, and may well be followed by 'Two of' when I have time to finish it. (I have no idea what the third might be called...) Me? Busy? I've been doing several major projects over the last few months (the TR-505 was just one of them) and I can't talk about some of them, but they might even see the light of day at some time. Over the years, I've become rather used to doing stuff that never has the media spotlight turned onto it, and I'd probably be surprised now if a glimmer of limelight ever appeared on any of my stuff. But hey, It means that sometimes I can hint abut something rare and unusual!

(*) MIDIoneOF counts notes as they arrive at the input, and then processes those notes in various ways. The main process is muting: you can set notes to be muted depending on two criteria: the note count length (from 2 to 16 notes), and the 'Mute Pattern' which you can set in the 16 light purple boxes (although you can only set ones which are within the note count length!).

The Mute buttons mute the note if they are grey, but let the note through if they are light purple, by the way.... 

So if the note count is set to 7 notes, then you can set mutes for note counts between 1 and 7 notes. There are 'Speedup' buttons to set all the mutes on ('AllOn') or off ('AllOff'), as well as a random selection.

The muting affects the notes as they pass through the device, and all of the timing is derived from those notes... Despite appearances, the mute buttons are only indirectly connected to the timing transport of Ableton Live - and if you don't quantise your notes, then there's no real connection at all. So what may look like a simplistic rhythmic accenting utility isn't quite that at all... It may look like a step sequencer, but the steps are the notes, not the transport timing. It's kind of a step sequencer turned inside out...

This is probably a good time to revisit the start of a previous paragraph (*). When I say: 'as they arrive', I mean that if you have a clip with 8 notes in it, then MIDIoneOF will get those 8 notes, and will process them in the order in which they arrive. So if the note count length is set to 7, then the first 7 notes will be processed (and muted or not, depending on the settings of the numbered buttons in the Mute Pattern. The eighth note will then be processed as the first note of the second set of 7 notes, and MIDIoneOF will continue processing in groups of 7 notes, until you stop Ableton Live.

The clip (or live playing) can include single staccato notes, legato notes, or chords, although there are limits to the speed and quantity of notes which it can deal with! Remember that I did say: 'Extremely experimental!'. Note also that this behaviour isn't what you probably associate with a step sequencer, but as I said, this isn't...

The second bit of processing is the 'AutoRandom' button, which saves you from the effort of clickng on the Mute buttons. You set a number (between 2 and 16 - a motif in this series) and after that number of multiples of note counts (so every n x 7 notes in the example I have used so far), the Mute buttons will be randomised. Properly random, and not one of those 'tailored randoms to make random more suited to human beings', so you can have everything muted, nothing muted, and these can repeat several times. Real random is like that, although in a lot of modern software it has been 'tailored' to suit people's expectation - the classic example is iTunes, where the Shuffle function does not play the same track twice, even though a random selection might play it twice, or even thrice, or even... It seems that people report it as a problem if a random shuffle plays the same thing twice... So you set the number of multiples of the note count length, and click on the 'AutoRandom' button, and off it goes. Setting the multiple to 4, 8 or 16 sounds kind of musical, because too much exposure to popular music seems to have convinced many people that everything happens every 4, 8 or 16 bars at 120 bpm in 4/4 time. Since the example so far has been every 7 notes, then try 7 as the multiple and you will find that it might feel slightly early.

The second processing is MIDI velocity. Since the note count and Mute Pattern know which number each note is, then we can do interesting things to the velocity value of the notes. The clue is the 'Rise/Fall' button, and this has an Offset rotary control on the left side, and a Scaling rotary control on the right hand side. Rise increases the velocity value as the note count increases, whilst Fall decreases the velocity value as the note count increases. This means that, as with lots of stuff that I do, velocity matters! You should try MIDIoneOF with an Instrument that is velocity sensitive... The important thing to remember is that the velocity processing happens depending on the note count length, so with the 7 note example and a Fall button setting, then the first note will have the largest velocity value, then the velocity will drop over the next 6 notes to the 7th note, which will be the quietest (lowest MIDI velocity value), and finally, the 8th note will then be loud again, after which it will drop for th next 6 notes, and so on. The 7 note cycle will repeat until you change it.

Note that all of the processing happens based on just the notes themselves. MIDIoneOF takes all of its timing from thosee notes, not from the bars and beats within Live. So if your clip has notes in a complex rhythm, then MIDIoneOF will process the notes in that same complex rhythm. As I said, you can feed your own playing through MIDIoneOF if you wish... And I'm not going to mention Olafur Arnalds here...

The final processing is Probability, which is independent of the note count length! One thing that I have realised is that 100% is not enough, and I'm looking at this to see if there is anything I can do, but adding in extra notes is quite tricky in real time...

There's also the slightly red '!' "All Notes/Sounds Off" button in case you need to stop errant hanging notes. This may well signpost this as an 'experimental' device regardless of how I tag it in MaxForLive.com...

And that's the MIDIoneOF device. Hopefully you haven't seen anything quite like it before... because I much prefer not to repeat things that other people have already done. There have been a lot of Max For Live devices recently which are just people re-making a device which is already on Max For Live. I think that time is too short to waste it re-coding something which is already available!


I won't bore you with a counter, and I won't bother explaining why the count is from 2 to 16 and not 1 to 16 (1 is the obvious minimum, but it is really boring using a count of one!). Instead, this is probably a good place to do another in the occasional series of 'Things that Max doesn't have a pre-made object for...'

In this case, it's those 'Mute Buttons' that are the source of the problem. To mute the MIDI note when any of the mute buttons are highlighted requires what I call a 'wide' OR function - a 16-input OR gate. This isn't standard in Max...which is not hugely surprising... Now I know that you can use Boolean logic to transform the gate, but as far as I can see,  this doesn't really do anything other than mean that a different 'wide' gate and extra inversions are needed. So what did I do? I made a 16-input OR gate using a tree hierarchy of 2-input OR gates. Yep, I resorted to 'brute force and ignorance' to save time and effort. Sorry.

Two things are probably notable in this sub-patcher. First, there's the left-most input, which sets all of the outputs to zero. I've had all sorts of 'difficult to track down' problems caused by the gswitch object when there's no input on one of the two inputs (This would be a 'floating input' if this was hardware, which it isn't...), and so this ensures that that won't happen. Second, there's my standard 'use a blink to make both inputs trigger the output' approach, which enables the ORs to ripple downwards from either side. I'm sure there's a better way to do this whole 'Wide OR' functionality, but I have't had a flash of inspiration yet... It works well enough for my purposes.


YouTube video on using Clip Envelopes - Features Clip Envelopes - in a video!
All Things Modular - Inspired by Modular - Darwin's blog has some interesting posts in it! Including this one where it refers to the above video on clip envelopes.

Getting MIDIoneOF

You can get MIDIoneOF here:


Here are the instructions for what to do with the .amxd file that you download from MaxforLive.com:


(In Live 10, you can also just double-click on the .amxd file, but this puts the device in the same folder as all of the factory devices...)

Oh, yes, and sometimes last-minute fixes do get added, which is why sometimes a blog post is behind the version number of MaxForLive.com... and pictures may not always be the current version... but Schrodinger's cat's status is permanently uncertain...

Modular Equivalents

In terms of basic modular equivalents, then implementing MIDIoneOF in a modular synth is just a step sequencer (or a ring counter in old parlance) driven by gates or triggers instead of a clock, some toggle switches for selecting the steps, and some velocity processing in a CV utility. About 5 modules by my count, giving an ME of 5. I hope that this blog post makes more people think about pulling out that patch cable from the clock input of the step sequencer and connecting it to a gate instead of an LFO or a Clock Generator. Modulars synths have cliches too! 


If you find my writing helpful, informative or entertaining, then please consider visiting these links:

Synthesizerwriter's StoreSynthesizerwriter's Store (New 'Modular thinking' designs now available!)


Thursday, 25 June 2020

Triple Flexible Routing Probabilistic Transposing Delay in Max For Live for Ableton Live

Sometimes, a MaxForLive device is right on the edge of not working, and normally I put it to one side for 'further investigation'. But every so often, an 'almost working' device is so cool that it goes along a different route: an experimental device with warnings. MIDIdelA3 is just such a device...

For a while now, I have been exploring the edge of the musical map that has 'Probability' on it, off to one side of a region called 'Generative'. But it wasn't until I combined probability with a much older topic, echoes, that things started to get really interesting. One of my very early echo effects was called 'Missing Echo', because it didn't put an echo on every note, and updating the concept with probability, as well as moving the delay into the MIDI domain, started to produce some useful results.

People have been playing around with echo and delay effects for a long, long time. One of the current 'leading lights' is Olafur Arnalds, an Icelandic multi-instrumentalist who has been using custom 'smart delay' software in live performance, and who recently collaborated with Spitfire Audio to release 'Stratus', a toolkit of software and a linked sample library that uses complex delays to augment live performance.


MIDIdelA3 isn't complex, and it isn't anywhere near the functionality of Stratus, but it hovers at the edge of what my 2008 Macbook Pro can reliably accomplish in MaxForLive. It might be generously described as being 'far from perfect', and isn't really suitable for 'mission critical' use, but it is a fascinating glimpse into what is possible with MaxForLive. It has three identical processing sections, each with a delay, a transposer, a probability control, a velocity scaler and a loop switch. You can connect the three sections together in three different ways: in series, in parallel, and in a mix of serial and parallel. There are 20 memories, and a large rotary control that lets you select from those memories, so once you have set up the memories, then it can be used as a 'single control' device if you wish.

Setting up the memories sounds easy, but there's more to it than meets the eye. Having three different topological connections between the three sections is quite hard to get your head around, and the probability control has more effect that you might think, because when a note has an 80% chance of passing through a section, then that drops when it goes through a second section with 80% probability, and if it goes through a third section, then another 80% probability means that you aren't going to hear that triply-delayed note very often. Then there's the velocity scaling, which reduces the velocity of notes, and which is particularly important when you loop a section, because it keeps things stable, or almost does. Yep, this is one of those delays that can run away with itself...


I haven't used the MIDI Delay that Ableton include as one of the MaxForLive demos because it is too much like 'a maze of twisty little passages, all different'... Instead I have coded it myself using a different approach, and this probably explains why it 'almost' works - my programming is not very advanced, I'm afraid. But it does get close enough to being usable to be worth revealing, because I'm sure that there are better programmers out there who can improve on the concept...and like all of my software on MaxForLive.com, it is free and unencumbered by rights licensing restrictions.

The way that you are supposed to do operations on time-critical events is to time-stamp them as they arrive, and then work your way through a time-based list, so that they are dealt with in strict time order. If you look inside the Ableton MIDI Delay example MaxForLive code then that is exactly what you will find - and there's quite a lot of code in there...

I chose to do it using the much simpler 'cheat's' way. I used two 'pipe' objects, one for the MIDI Note Number values, and the other for the MIDI Velocity values. Normally, when time-stamping a pair of values like Note Number and Velocity, you would group them together as a single event, and give that pair of values a time-stamp. When using two separate pipe objects, then the Note Number becomes one event in a time-delay, whilst the Velocity becomes a different event in a different time-delay. You can probably see why this isn't a perfect solution! But, for 'quick and dirty', it kind of works, and it requires very little coding!

So for the three processing sections (Time Delay, Transpose, Probability, Velocity Scaling, and Looping) there are six pipe objects, arranged in pairs (Note Number, Velocity). These three sections are connected together using a set of 24 switches that do all of the routing for the three different ways that the three sections can be connected (serial, parallel, and a mix). The three connection diagrams look a little bit like the FM 'Algorithm' diagrams that the Yamaha DX7 had on its top panel, and they kind of show the same sort of routing, but nothing more than that.

Using it

Depending on the way that the three processing sections are connected, the basic explanation goes like this:

Connection 1 - the serial (top diagram) connection sends the MIDI messages through section 1 (and outputs delayed notes), then section 2 (and outputs delayed notes), then section 3 (and outputs delayed notes).

Connection 2 - the mix of serial and parallel connections (middle diagram) sends the MIDI messages through section1 and outputs delayed notes), and then through section 2 and 3 at the same time (in parallel) (and outputs delayed notes from both sections).

Connection 3 - the parallel (lower diagram) connection sends the MIDI messages through sections 1, 2 and 3 at the same time (and outputs delayed notes from all 3 sections.)

Each section has a separate Loop button, and the Velocity Scaling rotary control acts like the 'Feedback' control in an ordinary audio delay or echo effect. If the Velocity Scaling is set too high, then the processor will quickly become overwhelmed with too much data, and will stop working. This may cause strange noises, which may be loud! Please use the Loop buttons with care. If the device does become overwhelmed, then the 'All' button can be used to turn off any of the Loop buttons.

The Loop buttons can be turned on whilst the device is operating. So you can set up the controls, and then turn on looping for just one of the sections - this is very effective for creating rhythmic 'motifs' and other repeating sounds. The recommendation is that you normally have all of the Loop buttons set to Off, and turn one (or more) on to get a repeated motif for a short time, and then to turn the Loop button off again. This will keep the device stable.

If you have a transpose control set to anything other than the middle 'zero' setting, then using the Loop buttons will quickly cause very low or high MIDI notes to be produced - because the transposition accumulates for each repeat. If you set it for an octave, then after only a few repeats the notes will be at the limit of the MIDI range. Please use the Loop buttons with care when using the Transpose rotary controls.

The Time, Probability and Velocity Scaling rotary controls are not linear - half way round is not half the effect. This is deliberate, and is intended to provide the most control where it is needed. For example, the Velocity Scaling you will use most will be at around 70 or 80%. 100% may cause the effect to be overwhelmed, and is not recommended. Less than 60% will tend to produce only a small number of repeats (echoes).

Note that the Probability rotary control prevents notes from passing through a section. This applies to repeated echoes, so the Probability rotary control and Velocity Scaling rotary control will both reduce the number of repeats (echoes), and will help to prevent the device from being overwhelmed.

To store settings that you like in a preset 'memory', shift-click on the relevant grey square in the lower left hand corner. To recall a 'memory' preset, just click on the relevant square (it will change to white), or use the 'Preset' rotary control. If you use the 'Save' icon on the upper right of the device, then you can save your settings in a file inside Ableton Live, ready for use next time.

MIDIdelA3 is a sophisticated MIDI delay unit. It is capable of some interesting effects, including some that are not normally found in echo or delays that process audio signals (digital or analog). Please be aware that too many notes played at once, or high settings of Probability or Velocity Scaling may cause the processor to become overwhelmed, so take care. The red '!' round button is a placeholder for a future method of stopping the processing from becoming overwhelmed.

MIDIdelA3 sometimes behaves strangely with some instruments, and you may experience 'held' or 'stuck' notes. I am still trying to find out why this happens... For your first testing, please use a percussive sound that decays to nothing relatively quickly, rather than a sound that sustains.

Remember that this is an experimental MaxForLive device, and it is not perfect. Some of the links below may provide more robust, similar and more advanced versions of the effects that MIDIdelA3 produces, and should be researched if you want to explore this type of MIDI delay further.


Since version 0.03 was published, I have spent a lot of time trying to find out why sustained notes caused so much trouble to this plug-in. Here's what I found...

The development of this MaxForLive plug-in started out as an experiment to see what it was like to have delay, transpose, and probability in a single device. Somewhere in there, the idea of putting feedback around it came up, and so I added the velocity scaling in an attempt to ensure that it would be stable. Adding feedback revealed some interesting things that I hadn't noticed up until that point: first, my bright idea to scale the velocity each time a note went round the delay loop, so that it would stop the device from running away, worked, but it didn't do quite what I thought it would. (My assumption (never assume anything!) had been that when the velocity value got scaled down to 1, then eventually a subsequent repeat would have the value zero, which is a note off, and that this would then stop the audio neatly. What actually happened was that it got down to a velocity value of 1, and then sat there, repeating over and over again.

This sort of situation often happens in programming, and there's a great temptation to just fix that aspect. Yep, that's what I did. I added extra code so that when the Note On MIDI message happened, the next note would have a velocity value of zero,  (which is the same as a Note Off MIDI message (, and hoped that everything would be fine. the problem with is is that the Note Off message is still in the pipe objects somewhere, and so you get two Note Off messages. And we know that Note Off messages are ignored...

There's a trap here. This is no longer a delay. It has become a Note Off message generator - and those Note Off messages just go round and round and round the feedback loop. And here's where I made the big mistake. I added more code to fix the problem that I had just created. I detected when a velocity value of 1 or less occurred, and then killed that whole message, so that Note On message never got turned into a Note Off message.

What I didn't test was what happened when a note was played that was shorter than the delay time. When I did test this in detail, I discovered that I got hanging notes because the Note Off messages were missing! And why were they missing? Because I was killing Note Off messages! The difficulty here is that Note On and Note Off messages should always be in pairs, and if you start to remove Note Off messages, then you have too many Note On messages and you get hanging notes. Worse still, I was turning Note Ons into Note Offs, so I had no way of keeping track of pairs of On and Off messages. There's no difference between a Note Off message and a Note Off message that used to be a Note On, except that one of these should be followed by a Note Off, and the other should not be!

If I removed all of the Max code that messed around with turning On messages into Off messages, then everything was fine when the Loop was turned off, but as soon as I turned the Loop on, then I got messages going round and round the feedback loop, eventually getting the velocity scaled down to zero, and then the Ons became Offs... For one moment, I did consider putting in a switch connected to the Loop button, so that when Looping was off, I didn't mess about with the Note Ons, but when looping was on, I did mess about. Then I realised that this would probably create a device that created hanging notes only when Loop was on...

At this point, I realised that I was trapped inside the loop of 'You have created unwanted behaviour by fixing unwanted behaviour...'.

A little bit of SWOT analysis told me that the expected behaviour of an echo with feedback was that it would go wrong if there was too much feedback. Unexpected behaviour was that an echo would cause hanging notes. Unexpected behaviour is bad, and so I ditched it. I took out all of the additional Max code that tried to remove the 'runaway' effect when you turned up the feedback too far. And this is version 0.04.

Oh, and I also fixed a few bugs in the horrendously complicated switching - you know those three diagrams that show the three ways of connecting the three processing sections together? Well, surprise surprise, there were bugs in there! For a single, relatively simple device, it is quite impressive that I could get so many things so wrong... 

I think version 0.04 should have less hanging notes...   

Other MIDI processing devices may exist...  

One thing that I have now noticed in other MIDI processing devices is that some of them only operate on the MIDI Note On messages, and so you have to pre-define the length of the notes that are produced. This way of doing MIDI processing had never occurred to me! It avoids any requirement for the processing of Note Off messages, and this should simplify the coding task, I think. If I ever get the time, then MIDIdelA3F may one day get released!                       


Stratus, from Spitifre Audio, is probably the leading edge of current 'smart delay' technology, and combines it with a sophisticated sample library.
Midihub, from blokas.io, is a very nice MIDI event processor, patchbay and interface. (Yes, I know it should be MIDIhub, but they never asked me.)
BomeBox, from Bome Software, is a sophisticated MIDI processing, mapping and patching interface that can link a computer and MIDI devices over 5-pin DIN, USB, Ethernet and Wifi, and is also a MIDI host.

Getting MIDIdelA3

You can get MIDIdelA3 here:


Here are the instructions for what to do with the .amxd file that you download from MaxforLive.com:


(In Live 10, you can also just double-click on the .amxd file, but this puts the device in the same folder as all of the factory devices...)

Oh, yes, and sometimes last-minute fixes do get added, which is why sometimes a blog post is behind the version number of MaxForLive.com... and pictures may not always be the current version... but Schrodinger's cat's status is permanently uncertain...

Modular Equivalents

In terms of basic modular equivalents, then implementing MIDIdelA3 can be approached from two different directions. A purist will use MIDI processing utilities to delay, transpose, probability-ise, and velocity scale the MIDI information, then connect it to a modular sound generation chain. A pragmatist will use three delays plus some additional processing and work in the analogue domain. Purists will require 3 or maybe 6 MIDI processing utility modules and may need to write some code for some solutions, giving an ME of 3 or 6. Pragmatists will require about three sets of 4 modules (voltage processor for transpose and velocity scaling, delays for the delay, utility for the probability, and a switch for the loop button), giving an ME of 12.


If you find my writing helpful, informative or entertaining, then please consider visiting these links:

Synthesizerwriter's StoreSynthesizerwriter's Store