Showing posts with label Audio Processor. Show all posts
Showing posts with label Audio Processor. Show all posts

Monday, 15 April 2019

Spectral auto-panning in MaxForLive for Ableton Live

My two recent MaxForLive audio devices have both been based around having 6 processing sections - hence the 'hex' in their names. But I realised that there was a much simpler device that uses the hex pan section, which could be used in many ways, and this blog post is devoted to it: a hex spatializer!

AUDhexSPATIAL 


AUDhexSPATIAL moves parts of sounds around in the stereo field. That's all. It is quite straightforward, but don't let that fool you into thinking that you can't do much with it.

The input audio is passed through three parallel filters, and then the outputs are auto-panned across the stereo image. The three filters can be used in several ways, but the most obvious way is to use them to split the audio into three separate bands: The high-pass filter outputs the high frequencies, the low-pass filter outputs the low frequencies, and the band-pass filter outputs the middle frequencies.

Each filter output can be panned to hard left or hard right, or can be Auto-panned - controlled by a three position switch: L/Auto/R. But the frequencies of each filter are independent, so there's nothing to stop you putting the high-pass filter below the low-pass, or the band-pass anywhere from low to high.

The filters are there just to provide different blocks of frequencies to the output section where the panning happens. And the three [X] toggle switches allow you to turn the outputs on and off, so if you want to have just the high-pass filter output, then just enable that toggle switch and turn off the others. The two stereo channels are separate, so if you want different filters and pans for left and right, then that is completely possible.

Naming

After a lot of agonising, I have finally decided to use a new and consistent naming scheme for my M4L plug-ins. From now onwards, and if I update anything, then I will strive to use three prefixes:

- AUD for Audio processing devices (aka effects)
- MIDI for MIDI devices (this took ages to figure out!)
- GEN for devices that generate audio

Of course, in an imperfect world, I may not always succeed in trying to be consistent, but I will try. Please let me know if I falter!

Applications

OK, so your imagination is probably your main limitation here. If you want to have the left channel quickly auto-panning the top end of a piano sound, whilst the right channel slowly pans the bass around and both channels have two different resonant filters panning at different speeds, then that's fine.

But there's more. Try putting AUDhexSPATIAL in front of a Ping-Pong Echo, or put it in between two Ping-Pong Echoes... It is very interesting to experience just how complex a simple sequence can sound when it goes through this sort of processing.

Limitations

You can't adjust the panning width directly - adding two extra rotary controls would make the centre section way too big, I reckon. (But let me know if you really want this, and I might schedule a '+' version...) You get full left-to-right panning, or else hard left or hard right. Of course, you could make a rack and use the Utility object to restrict the pan width of multiple AUDhexSPATIALs...

There are only 3 filters and three panners per channel. Making a version with more channels is not in my current plans, and my main concern would be trying to find a way to fit everything into the user interface...

Oh, and the filters are not animated - they are fixed graphics! Sorry...

MaxForLive

Recent blog posts have included details of what is happening inside my M4L devices, and this is no exception. This time, I'm going to look at the three-position switch that has been added to the output section.

Max and MaxForLive have a lot of ways of routing numbers, messages and signals around. There are lots of objects, with names like Gate, Switch, Route, Selector, Matrix, and more. Sometimes the objects that route signals around have different names, and work slightly differently to the objects that route numbers or messages, and they can work slightly differently. It's quite a lot to get your head around, and one of these days, I'm going to try to do a guide (a bit like the one I did on squeezing controls into limited spaces!). But in the meantime, here's the first of a little mini-series where I look at a few interesting ways to route stuff.

The three-position switch does two things simultaneously: it allows you to select between hard left and hard right pan positions, or it selects the auto-pan. These are very different things, although if you look at AUDhexECHO or AUDhexFrequencyShifter then you will see that by slowing the LFO to 'stopped' then the result is fixed pan positions. But that isn't a very practical approach for a three position switch. There is also the complication that the output of the LFO that does the auto-panning is a signal (so it has the yellow-striped connections in Max), whilst the more usual way to control a panner is with numbers, so there's going to be a conversion somewhere.

First off, let's look at the context. Here's the relevant part of the Max code for the audio output of  AUDhexSPATIAL:


And here's the 'pan_mr' object expanded out (this is a cheat to make things clear - in reality, you don't see the controls that are connected to the input ports, but I have removed the ports and added the rotary control and the 3-position switch control to make it obvious how things are connected):


The main audio processing is on the left hand side. Input port 1 (the square box with '1' in it) is the audio signal that is going to be 'panned'. It goes to two signal multipliers (notice the '~' after the '*') that are driven in anti-phase using the '!- 1.' inverter shorthand that I've mentioned before. (The formula inside the object just subtracts whatever you feed into the object from 1, so it really means '1-the_number', and so it inverts the value, so if you put 0 in then you get 1 out, and if you put 1 in, then you get 0 out, and linearly for all other values...). The pan value goes from 0 to 1 to pan from left to right, and so centre is a value of 0.5.

On the far right hand side, you can see how the left and right values re stored in message boxes that are triggered every time that the switch is changed. The 'LED" object with the round circle is a useful way to convert changes into 'bangs' that also shows you what is happening when you are debugging. The '0' and '1' messages that the message boxes output when they receive a bang are converted into signals using the 'sig~' objects.    

In the middle, starting from the rotary control, there is a 'cycle~' object that does the sine-wave LFO function, followed by a bit of maths to get the output into the 0<->1 range that is required by the multipliers that do the panning. The 'scaled and offset' sine-wave is then connected to the middle input of a 'selector~' object, which is a special switch for routing signals. The other two inputs are from the signals from the message boxes. So the selector switch can output:
- a signal representing 'left'
- a signal that is an LFO sine-wave
- a signal representing 'right'


And that's how you can make a three-position switch that has fixed values on two of the settings, and an LFO signal on the other.

Getting AUDhexSPATIAL

You can download AUDhexSPATIAL for free from MaxForLive.com.

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

     https://synthesizerwriter.blogspot.co.uk/2017/12/where-do-i-put-downloaded-amxd.html

(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 the blog post is behind the version number of MaxForLive.com...

Modular Equivalents

In terms of basic modular equivalents, then AUDhexSPATIAL requires six filters, six LFOs, six VCAs, and a mixer, plus some switching for the fixed pan positions, giving a total of about 20 ME.


Monday, 11 February 2019

Fun with Frequency Shifting

Here's a surprise entry from the 'rapid gestation' pipeline - a hex frequency shifter that is totally intended to mangle spectra! This is not a scientific instrument designed to move technology towards ever higher fidelity. It joins the 'Ironic Distortion' device and a few of my other devices on the 'noise' side of the audio processing 'sine to noise' axis.


So that's the advert - but what is happening inside? (I would say 'behind the front panel', but I can't see this ever making it into real hardware!) Well, this is a 'true' stereo device, and so there are two parallel audio paths, each with 3 frequency shifters, and so it definitely qualifies for the name: 'Hex'.


But rather than follow the path forged by the many other frequency shifters that have already been created in M4L, I threw caution to the winds and went free-form, so the routing between the frequency shifters is not preset. The outputs from the upper and lower sidebands of the frequency shifters, plus the inputs to the next shifter, and the input to the auto panned outputs, all go into two routing matrices where you can connect them together as you like. The default is 'no connections', so all of those [X] toggles are dark, and there is no audio output (unless you turn the rotary control to 'Dry', of course!).

Probably a good starting point is to click on the [X] toggles for the '+' in the Left and Right routing matrices. This will route the upper sideband output of the first frequency shifter into the input of the second, and so on, through all three shifters. You won't hear anything at the output until you also route the auto-pans, which are the extra [X] toggles in the centre section between the two channels. So select the lowest of those [X] toggles to hear the full 'hex shifter' sound! This is probably a good time to set all of those pan rate controls to different values so that the stereo output will be fully spatialised!

(The two [X] toggles with arrows allow you to patch across from one channel to the other, so you can send audio back and forth between the two channels as you wish. As with many things, turning on all of the toggles is not necessarily the best approach!)

Each frequency shifter has two modes:

'Freq'  mode:

'Freq' mode does exactly what you expect - it shifts the incoming spectrum. If you click on the 'Mod' button so that the LFOs grey out then you will get the 'fixed' frequency mode where there is just a single frequency control that sets the amount of frequency shifting. If you turn on the 'Mod' button then the LFO rate and modulation depth controls will appear, and you can then wobble that frequency shift instead of it being fixed. (Oh yes, and this diagram above kind of gives the impression that there is only one LFO per pair of Frequency Shifters, whereas actually there are two...)

'Rate' mode:

'Rate' mode is slightly more unusual, and I haven't seen anything quite like it in any of the effects units that I've played with... What it does is sample-and-hold the incoming audio, and use this to shift the frequency - and it sounds really interesting and different... The 'Mod ' button has the same effect: 'off' hides the controls and mutes the LFO, whilst 'on' shows the controls and allows the frequency shift value to be modulated by the LFO.

Applications

You can use HexFrequencyShifter as a 'drone' processor, where it can turn rather ordinary bland sounds into something altogether more complicated. Frequency shifting tends to be rather destructive to sounds that have to be in tune with other sounds, and so, at first sight, this is not a device to be used for processing an instrument that will then be played alongside other tuned instruments.

But if you use the 'Wet/Dry' rotary control carefully (less than 25%, for example), then you can add small amounts of non-harmonically related distortion to your audio, which can be rather like adding pepper to food. Now, back in the 1970s and 80s, devices that added 'carefully designed additional spectral information' to audio used to be called 'exciters', and were often used to compensate for the aggressive low-pass filtering that people used to try and control tape hiss. As it happens, the HexFrequencyShifter is quite good at producing 'additional spectral information', and even to jaded ears such as mine, having spectral components of distortion moving around and across the stereo stage is quite cool! (Most of the distortion I have heard is often quite boring spatially) I will see what I can do about an audio demo on Soundcloud... But in the meantime, here's a video demo on YouTube (complete with a video titling error because I was rushing!): https://youtu.be/jeg-XMnnDmM

Getting HexFrequencyShifter

You can download HexFrequencyShifter for free from MaxForLive.com.

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

     https://synthesizerwriter.blogspot.co.uk/2017/12/where-do-i-put-downloaded-amxd.html

(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 the blog post is behind the version number of MaxForLive.com...

Modular Equivalents

In terms of modular equivalents, then the 'Bode Frequency Shifter' was one of the modules that appeared on classic Moog modulars, although I'm not sure that they appear in many lists of 'basic' modules for a minimal modular synthesis setup! But since I added a 'Scale' device recently, then I'm going to add a 'Frequency Shifter' module as well. Based on this, then my estimate is that you are going to need 6 frequency shifters, plus 6 LFOs, plus three stereo auto-pans, which gives a grand total of about 18 ME.



Thursday, 1 November 2018

An audio version of the 'Quick Transpose BW' MaxForLive device for Ableton Live...

One of the questions about QuickTranspose BW was: 'Does it transpose MIDI or Audio?'. The answer was 'MIDI', but this set me thinking, and so here's a quick test of what happens when you put the enhanced (maybe 'over the top') user interface of 'Quick Transpose BW' over an audio-domain pitch shifter.


Above is a screenshot of what the result looks like. The left-hand side is 'Quick Transpose BW' just moved into a MaxForLive Audio device instead of a MIDI device, but the right-hand side isn't just a bolted-on pitch shifter, because when I played with the draft version, I got inspired. So those two big black 'DJ' effect 'ON' buttons are intended for live performance use (or you can map an LFO (etc.) to control them (etc.), and provide mouse-gated Detune (which is a chorus effect that you can just gate in and out, or the same sort of gating, but for a transposition. The idea is that you choose a transpose value, then press the 'Set button (and the value will appear in the purple box), and then you revert back to no transposition (all zeroes across the middle), but clicking on the 'On' button gates that transpose on and off. So that's two liver performance buttons... Oh, and the 'Glide' button lets you set how long the pitch transposition takes, so you can do all sorts of sweeps and drops on whatever audio you are processing. Overall I had great fun making this cross-dimensional variant!

Here's a video (updated) showing two LFOs mapped to the Octave buttons and the 'DJ' detune trigger button... For some reason, you need to choose '480p' to get better quality video playback than the default blocky '144p'... The source material is just a synth arpeggio, and there are no effects other than 'Quick Transpose Audio BW' - which just goes to show what you can do with a pitch shifter and 2 LFOs.

Getting Quick_Transpose_Audio_0v01

You can download Quick_Transpose Audio_0v01 for free from MaxForLive.com.

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

     https://synthesizerwriter.blogspot.co.uk/2017/12/where-do-i-put-downloaded-amxd.html

(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...)

Modular Equivalents

In terms of modular equivalents, then reproducing this functionality in my modulars required a pitch shifter, and whilst the Bose module was a part of some old classic modulars, it isn't exactly a 'basic' module in these 'interesting' times. So I'm temporarily extending my definition of 'basic' to encompass a pitch shifter, and then it requires just a couple of utility processing and button modules. Overall, the core is about 3 ME. I can't recall having ever seen a live modular performance using this kind of effect (although performers like Caterina Barbieri are imho, remarkably accomplished!), but I'm sure that the Interweb will provide lots of examples that I overlooked.

Buy me a coffeeBuy me a coffee