Showing posts with label LFO Panning. Show all posts
Showing posts with label LFO Panning. Show all posts

Friday, 31 May 2019

Spectral chorus - another 'Hex' MaxForLive device

For a long time, I have been trying to find a good way to provide an intuitive user interface for 'Modulated Pan Position'. You can see me experiment with various ways to implement it in many of my MaxForLive devices - what I have always needed is a simple/obvious way of allowing control over pan position, but also allowing that pan position to be modulated by an LFO.

The 'traditional' way of doing this (and I have used it a lot: albeit unwillingly...) is to have a pan position (a slider is nice and intuitive) plus an LFO 'modulation depth' rotary control. That's two controls, and there is an implicit interaction between them where the LFO over-drives the panning so that the position goes to left or right and stays there, then suddenly pans across - it's because the LFO waveform (typically a sine wave) is over-driving the pan position, and the clipping of the waveform gives 'flat' spots in the auto-panning (Yuk!).


This is why, in AUDhexCHORUS, I'm introducing something that I have been working on for quite a while: a single UI widget that does pan position AND modulation depth combined together.


Here's the UI widget" The components are:

1. a 'thumb' (the bright white vertical bar) that you click with the mouse to control the setting of pan position and LFO modulation.
2. an LFO indicator (the big purple block) that shows the current pan position. (When the LFO modulation is active (as it is here) then this slides horizontally from left to right to show where the audio is in the stereo image.
3. two numbers that show the horizontal and vertical position of the 'thumb'. (These cn be used as mapping targets for other M4L devices)

The UI metaphor is very straight-forward: horizontal is pan position (Left is left, Right is right!), whilst up and down controls the depth of LFO modulation - and there's a triangle graphic that shows you where you need to position the 'thumb' to avoid over-modulation of the pan position. The 'thumb' that you click on is a vertical bright white bar, so when you move it horizontally it looks like a pan position slider, but when you move it upwards, then the LFO modulation is gradually increased, and if you move it all the way to the top of the triangle, then you get perfect side-to-side pan LFO modulation, with no 'hold' at either side. It makes using pan position/modulation SO much easier!


Here's a GIF that shows the UI widget in three modes.

The top example shows the 'thumb' in the 'sweet spot' position at the top of the triangle where the LOF modulation is maximised without clipping. Here the LFO modulation (the purple block) will move the pan position from hard Left to hard Right, without any major pausing at the Left or Right positions. If you move the 'thumb' to the left or the right away from the top of the triangle, then the LFO will spend time at that side (The waveform will be clipped), and may not go all the way across to the opposite direction. (The animated GIF has jerks in the way that the purple block moves - this is because of the looping in the GIF - in the actual device the purple block moves smoothly from sid to side, indicating the LFO-controlled pan position.)

The middle example shows the 'thumb' right in the centre, and so the pan position is only slightly modulated by the LFO.

The lower example shows the 'thumb' in the 'down' position, and this completely removes any LFO modulation, so horizontal movements of the 'thumb' just control the (fixed) pan position. The two numbers underneath the UI widget are the horizontal and vertical positions, and can be used as a target for mapping by LFOs and other M4L devices that use controller mapping. in this case, the 'thumb' is all the way to the left, and so the audio will be panned hard to the Left of the stereo image.

AUDhexCHORUS 

To accompany a neat pan UI widget, there's a neat device: AUDhexCHORUS (AhC for short, to save my fingers as I type!) There are lots of chorus devices out there, but this one has a few 'specials' that make it more interesting...

1. The 'Pan Position/Modulation Widget! (Of course!)

2. Spectral controls, as per some of the previous 'Hex' devices. You have three spectral 'bands' to play with, so you can have different chorus amounts/styles wherever you want across the frequency spectrum, and you can have different bands for the Left and Right stereo channels if you want.

3. Envelope tracking makes the chorus depth tracks the amplitude of the incoming signal... This is particularly good for dynamic sounds...

The actual chorus effect is achieved by using frequency shifting (Via ring modulation (which just multiplies two audio signals together) and can also be called a four-quadrant multiplier or a balanced modulator.) instead of using a modulated delay line. A future version might allow switching between the two methods - let me know if you would like this.

AUDhexCHORUS is a 'wide' device (It uses lots of screen 'real estate' in Ableton Live, so be prepared for some horizontal scrolling) - I'm not known for making 'one-rotary-control' devices!

In detail


AUDhexCHORUS is symmetrical, so both halves of the user interface are mirrored. Let's look at the left hand side - which covers the Left channel. Vertically, there are three similar rows of controls (one for each spectral band), and horizontally there are three similar processing blocks. Going across the blocks from left to right there are:

- The Frequency Shift block, which contains:
-- the frequency shift rotary controls,
-the envelope amount rotary controls (which increase the amount of frequency shift depending on the envelope of the incoming audio),
-- the vertical envelope depth indicator,
-- the smoothing rotary control (which smoothes the envelope control),
-- the 'sideband select' buttons (which select positive frequency shifts, negative or both),

- The Spectral Filter block, which contains:
-- the frequency rotary controls (high-pass in the upper row, band-pass in the centre row, and low-pass in the lower row),
-- the resonance rotary control (higher values get more 'peaky')
-- the 'Broad/Narrow' switches, which controls the number of filter sections that are used,

The Auto-Panning block, which contains:
-- the row output/mute switches (output when the 'X' is light, muted when the 'X' is dark),
-- the UI Widget for the pan position and LFO modulation, as described above,
-- the LFO rate rotary control (which is almost stopped at the slowest speed!).

On the far right hand side, common to both channels, then there is a Dry/Wet mix rotary control, as well as memory buttons which can be used to ave your favourite settings. Just shift-click on a red square to save (or a grey square to over-write), and click on a grey square to recall that memory setting.

Getting AUDhexCHORUS

You can get AUDhexCHORUS on http://www.maxforlive.com/library/device/5500/audhexchorus

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 AUDhexCHORUS would require two high-pass filters, two low-pass filters, two band-pass filters, six frequency shifters, six LFOs, six panners, some utility switches, and two mixers, giving a total of about 28 ME. It is interesting that this is also a 'wide' device in MaxForLive!




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.


Saturday, 19 December 2015

Sine3Generator

I've just published a new sound generator on the MaxForLive.com web-site. Here's the usual extended user guide...


Sine3Generator is a sound generator - and yes, I've done them before, and this is another one. Currently in a 'light' version with purple trim, I will update it to a 'dark' version over the next few weeks, and I may be unable to resist making a few tweaks too. 


This sound generator does not respond to MIDI inputs - it just sits there and makes noises continually...

What seems like a long time ago now, I wrote a series of 15 generators in 'Reaktor', and this represents a revisiting and updating of those ideas in M4L. There is lots of history to this type of stand-alone 'sound generator'. Modular synthesisers lend themselves quite well to this type of FM chaining, particularly if there are only a few VCOs... Back in the 1970s I built cascaded relaxation oscillators using injunction transistors, and discovered that frequency ability and tuning were very important, which is very apparent in some synthesisers of the time - the vernier dials on the EMS VCS3 are a good example, and the VCS3's matrix interconnection panel lends itself very well to complex chains of devices... 

More recently, Noisedrone .1 and Noisedrone2 have used Max For Live (M4L) to make sounds using cascaded chains of oscillators, and these have been popular downloads on the MaxForLive.com web-site. Another popular generator is my Noise Generator 0.4... So with 15 designs languishing on my hard drive, it seemed like a good time to blow the dust off them and try publishing them again.

The basic idea is very simple. A sine wave oscillator with LFOs that can modulate the pitch and the output is frequency modulated by another similar oscillator, which is modulated by another similar oscillator. It's a simple FM generator with a lot of controls, and a flexible output stage. The output allows mixing of three harmonically-diverse outputs: the third modulated oscillator itself ('Sine'), the ring modulated output of the third and second oscillators ('Ring') and the output of the second oscillator 'sample & hold' processed by the third oscillator, with LFO modulation of the mixing, plus LFO panning as well. 

A good way to start is to turn all the controls to the leftmost minimum position (and save this as a preset of course!), and then to select the Sine button, adjust the volume to your preference, and choose the pitch you want in Oscillator 3 (there's just a Pitch control there, so it is easy to find!). This is a good place to learn the output options: LFO modulation of volume, plus LFO panning. A lot of my M4L has similar approaches to things, so if you've seen one of my 'Pan' sections, then you will recognise the same controls across many of my devices. One variant here is that my 'usual' LFO has the ability to free-run or to sync with the Live timing, but for Sine3Generator, then you only get free running LFOs. 

Once you have the basic Oscillator 3 under your control (some ping-pong echo is very often applied to the output of this type of generator...) then there is the LFO modulation of the pitch of the oscillator to try out. 'Under control' is an interesting phrase. When I worked in a music shop we used to do listening exercises: someone would play a chord and the rest of us would say what it was, or someone would make a sound on a synth and everyone would have to recreate it from scratch. Rick Wakeman was famous for being able to set up a sound on a MiniMoog just by adjusting the knobs, and then playing it without the incremental audition/edit cycle that you often see, and of which I'm often a big user, particularly for FM synthesis. Which neatly brings me back onto the topic...

When you are comfortable with all of the controls for Oscillator 3, then you can try moving to the left and try exploring the pitch and modulation controls for Oscillator 2, then the LFO pitch modulation for that oscillator, and so on. (There's a bit of a theme here too - my devices often start in the middle and move outwards, but just to keep your awake, some of them start on the left and move to the right. Which format I use usually depends on the workflow...)

Because Oscillator 1 is at the top of a stack of FM then it can cause big changes to the oscillators underneath it, so be cautious at first with the pitch and modulation controls. If everything gets too much, then just go back to the 'all leftmost' preset that you saved and start again from Oscillator 3.

There's a lot to explore in Sine3Generator, and a lot of sounds waiting to be created. Recording the output and processing it further is thoroughly encouraged! Audacity is my editor of choice here, although mine is very customised...



(As always, my M4L stuff is a 'work in progress', so it may not be perfect (in fact, it probably won't be, because perfection is a rare thing indeed!), and early versions tend not to have very much help on controls included in the M4L. I know that this is a good thing to have, but I'm short on time an speed gets you fun things quickly, and none of my stuff is supposed to be professional, with timely support and detailed help inside. But please feel free to report bugs via the comments on MaxForLive.com, and I will try to fix them when I can find time. )


There is now also a 'dark' version...
Related articles