Showing posts with label bidule basics. Show all posts
Showing posts with label bidule basics. Show all posts

Tuesday, May 27, 2014

Bidule Basics 5: Parameter Modulation via Linking

This post assumes that you have read the previous Bidule Basics posts. There is no Live session or Bidule patch associated with this post.



Modulating Parameters
This post will introduce the concept of modulating parameters directly within Bidule for cases where a Bidule device is lacking an inlet for a specific parameter.

This applies to many different Bidule devices. However, this post will cover a specific example. 


In this example, a Bidule device effect (the Buffer Granulator) will have its minimum pitch parameter (which is only accessible via a slider within the setup for the Buffer Granulator) modulated via an LFO. In the diagram above, the Min Pitch parameter is a slider in the Buffer Granulator window.

Lets start with a blank Bidule patch.

Delete the cables that connect the Bidule input to the mixer objects.

Add the Buffer Granulator object from Palette > Effects. Connect the inlets and outlets of the Buffer Granulator to the Bidule input and the mixer respectively. Note that the parameters of the Buffer Granulator do not have any inlets (rather only sliders for control when you double click on the object)


Add a basic oscillator object from Palette > Building Blocks > Oscillators, and rename to LFO.


Add a variable from Palette > Building Blocks > Math > Variable. Rename to LFO Freq and connect to the first inlet of LFO. Add a variable from Palette > Building Blocks > Math > Variable. Rename to LFO Amp and connect to the second inlet of LFO.


Add a Parameter Modulator (Absolute) from Palette > Modulation. Rename to Modulating Parameter. Connect the outlet of LFO to Modulating Parameter.


Now, the above may seem counter-intuitive so far, because there is no explicit or implicit link between Modulating Parameter and any parameters contained within Buffer Granulator. We must create this link.



Linking
Click on the Parameters button in the main Bidule window.

In the left hand column ("Source"), find the Modulating Parameter device. Expand the device by clicking on the triangle. Select the Modulation element. In the right hand column ("Target"), find the Buffer Granulator. Expand the device by clicking on the triangle. Select the Min. Pitch element.

Click on the link button, below the two columns. A new entry should appear in the Source / Target linking list. 

As a result of this linking, any value that is sent into the inlet of Modulating Parameter will modulate the Min Pitch parameter of the Buffer Granulator device.

The LFO signal will modulate the Min Pitch parameter. Adjust the LFO Freq and LFO Amp, and listen and watch how the parameter modulation changes the incoming audio.

Wednesday, May 30, 2012

Bidule Basics 4: Parameter Automation in Ableton Live and Parameter Linking

This post assumes that you have read the previous Bidule Basics posts. There is no Live session or Bidule patch associated with this post.



Parameters Galore!
One of the strengths of Bidule is the way in which you can easily map and manipulate parameters.

Previously, we've looked at using MIDI notes to control parameters as well as modulating a parameter with an LFO.

Beyond these options, Bidule also lets us map parameters in a number of ways.

This post will explore two related concepts:
• How to set up parameter automation in Ableton Live, so that any parameter in Bidule can be automated like any other parameter in Live (i.e. in its own track lane and via automation recording).

• How to link one parameter of Bidule to one or more than one other parameter, thereby creating "macro" controls that allow the control of multiple parameter easily.



Automating Parameters from Ableton Live
As you can imagine by now, we can create very complex Bidule patches if we want to. These patches might include many parameters, easily into the hundreds.

Although this may be great for control within the Bidule patch itself, it makes things more complex outside of the Bidule patch.

Imagine that we have a reverb effect within Bidule, and we want to control a given parameter within that reverb effect from Ableton Live, via plugin automation.



With any other Ableton Live plugin, every parameter that can be automated is readily available with its own track automation, ready for writing / recording automation data.

However, this is not the case with parameters inside of Bidule patches - these are contained "within" Bidule.

As a result, we need to manually create a 'bridge' between Live and Bidule. This tells Live that we want to automate one of the parameters found within Bidule, and which parameter it is that we want to automate.

To manually create this 'bridge':
• Click on the 'parameters' button at the top of the Bidule patch window.
• You will see a list of Bidule objects within your patch in two columns: source and target
• Locate the 'Bidule Plugin_0' reference in the source column
• Expand this reference so that you see a long list of 512 parameters in the source column
• Choose the first parameter (named Parameter 1) in the expanded list of Bidule Plugin_0 items
• In the target column, click on the parameter that is to be automated. You might need to expand a Bidule object to see all of its parmeters
• Click on the 'Link' button below the two columns
• You should see the new link listed at the bottom of the linked parameters list below the two columns

In the example below, we've selected Parameter 1 from the Bidule Plugin_0 as our source parameter. The target parameter that has been selected is the Room Size of the Freeverb_0 Bidule object. 





Now, when we look at our Bidule AU plugin device in Ableton Live in our Audio Effects area of our track, we can see a slider and a reference to "parameter 1", which is mapped to the Room Size of the Freeverb_0 object.


We can move this slider in the same way as any other Live plugin parameter. This also means that this newly-created Parameter 1 has its own automation lane, as you might expect.


This means you can draw in automation within the automation lane using Live's pencil tool, or you can record automation by moving the slider in the plugin itself. Very handy!

The process outlined above can be repeated for up to 512 parameters, giving us an extraordinary level of control over our Bidule patch. Consider this when using various parameters within Bidule and when creating different settings. 





Linking Parameters within the Bidule Patch
Besides automating parameters as shown above, Bidule also allows us to link multiple parameters within a given patch.

This lets us create macro controls, where you can control multiple parameters by moving just one slider or changing one variable. Let's go through a simple example of this!

Consider the following simple Bidule patch. We have audio coming into the patch at the top. This audio is routed through a Freeverb object. The output of the Freeverb object is then routed to the mixer. So far so good.

However, there is a simple Variable object (see the object palette under Building Blocks > Maths > Variable) that has been renamed to 'Variable_0 - Macro Control 1'.


The aim of this Variable object is so that we can control more than one thing from the one slider. In fact, we don't even have to connect anything within Bidule using patch cords.

What we have to do is link the value parameter of our Variable object (i.e. the value of our slider / number that we enter when we double-click on the Variable object). We can link this parameter to other parameters, such as the level parameter and panning parameter of channel 1 of the Mixer object.

Once we have created these links, whenever we move the value of the Variable_0 - Macro Control 1 slider, this will automatically change the value of the channel 1 volume fader and channel 1panning control of the Mixer object.

To create these links:
• Click on the 'parameters' button at the top of the Bidule patch window.
• You will see a list of Bidule objects within your patch in two columns: source and target
• Locate the Variable_0 - Macro Control 1 object in the source column, and expand it
• Select the Value parameter
• Locate the Mixer object in the target column, and expand it
• Select the Volume Channel 1 parameter, and click the Link button below the two columns
• Scroll down to the bottom of the linked parameters list below the two columns - you should see the newly created link
• Now to repeat for the panning control!
• Locate the Variable_0 - Macro Control 1 object in the source column, and expand it
• Select the Value parameter
• Locate the Mixer object in the target column, and expand it

• Select the Pan Channel 1 parameter, and click the Link button below the two columns
• Scroll down to the bottom of the linked parameters list below the two columns - you should see the newly created link








Once you have finished, close the Parameters window. Move the value slider of the Variable_0 - Macro Control object (you will need to double-click on the object to open the object window).

Check the value of the volume fader and the panning control of channel 1 of the Mixer window - you will see the values change accordingly!

Although this is a simple demonstration of this concept, we can take this idea much further. 



It's All About Control
Hopefully this short post gives you some ideas about what is possible with the parameters inside and outside of Bidule. Once again - like all of these posts - this should be taken as a starting point more than anything else, in that experimentation is always encouraged.

Monday, May 28, 2012

Bidule Basics 3: MIDI Control of Audio Effects

This post assumes that you have read the previous Bidule Basics posts. The Bidule file and Live session and samples used in this example can be found here.



Take Control!
The aim of this post is to provide a simple example of using MIDI note data from an Ableton Live MIDI track to control parameters of audio effects inside of Bidule.

This example represents just one possible data mapping, and a very simple method of control. The setup presented here can be expanded upon extensively.

Nonetheless, we can break the process down into several easy steps:
• Set up MIDI routing
• Create a MIDI track and sequence relevant MIDI data
• Add routing and setup the Bidule patch

Let's assume a starting point from the end of the previous Bidule Basics post about parameter modulation. 


Here, the frequency of the Biquad Filter objects was controlled by an LFO, and the Q was controlled by a standard Variable object slider.

Every MIDI note has two data components - pitch and velocity, both of which have a data range of 0 - 127. Velocity can be thought of as a representation of volume / note strength.

The aim for this post is to use MIDI notes to control these two parameters of the Biquad Filters - mapping the note pitches to the frequency and mapping the velocity to the Q.




Setting Up The MIDI
The first thing we need to do is actually let Ableton Live know that we want to use the virtual MIDI inputs that are created when we add an instance of Bidule to our session.

First, go to Ableton Live > Preferences and navigate to the MIDI Sync tab. Make sure that the input and output ports for the Bidule AU 1, 2, 3 and 4 devices are set to ON for the Track column, as shown below.


The next stage is to create a MIDI track and route the output of the track to the Bidule plugin. In Ableton Live, go to Create > Insert MIDI Track. Go to the Session view by pressing tab and route the output of the MIDI track to Bidule AU 1 - Channel 1, as shown below.


On the MIDI track, create a new MIDI region and sequence some MIDI notes, as shown below.



Create the Connection
Within the Bidule patch, delete the LFO and associated variables. Create a Bidule MIDI Input device by dragging and dropping an object from MIDI Devices > Input > Bidule AU 1.

This object represents data coming in that is routed to the Bidule AU 1 virtual MIDI port (such as the MIDI track that we just set up).

This one, single outlet can contain all sorts of data - from MIDI notes and velocities, to MIDI continuous controllers, pitch bend data and more. 

Note that the outlet of the Bidule AU 1 object is white - this means that it carries MIDI data. Many Bidule connections are blue in colour - this means that they carry sample-based audio.

You cannot connect MIDI data directly to the blue connections - we need to convert the MIDI data into a format that we can use with the majority of Bidule objects (such as the input for our filter frequency, which is blue). 





Extracting Note Data
We now need to actually extract just the data that we are interested in - in other words, we need just the note data (i.e. pitches and velocities) and we don't need any other types of data (CC, pitch bend etc). 

The perfect object for this is the MIDI Note Extractor object, which listens to a stream of MIDI data and then extracts only note data. Once the note data has been extracted, pitches and velocities are converted to more useful data types and ranges. 

The pitches (that are normally numbered notes from 0 to 127) are converted to actually frequency number values. The velocities (that are normally numbered in the range of 0 to 127) are converted and scaled to an amplitude range from 0 to 1. Connect the output of the Bidule AU 1 object to the inlet of the MIDI Note Extractor object.

The Note Extractor object has four outlets. These are: 
• Frequency
• Amplitude
• Gate
• Trigger

Of interest to us are just the first two outlets - frequency and amplitude. Connect the frequency outlet directly to the filter frequency inlets of the Biquad Filter objects. 

Thus, any notes that are sent to the Bidule AU 1 MIDI port will be routed to the Note Extractor and then pitches are converted to frequencies, eventually controlling the frequency of the Biquad Filter objects.




Controlling the Bandwidth / Q
The next stage of the process is to make a connection between the velocity of the notes and the Bandwidth / Q of the Biquad Filter objects. Delete the simple Variable object that is currently connected to the Biquad Filter object and controlling its Q parameter. 


 The Bandwidth / Q inlet of the Biquad Filter expects a data range of 0 - 10 or so.

However, the output of the MIDI note extractor converts the velocity to an amplitude value from 0 - 1. Beyond this issue, the Q / Bandwidth and velocity have an inverted relationship. 

A low Q / Bandwidth represents a steeper / more obvious filter, whereas a low velocity represents a quieter / more subtle note. 

So, we need to transform our amplitude values to: 
• Become within the range of 0 - 10
• Become inverted with respect to their original value range

We can use the Function object, and easily scale and invert our velocity amplitude values. Add a Function object and type in a suitable expression with respect to X, such as: 10 - (x * 10). 

Connect the output of the amplitude values from the MIDI Note Extractor outlet to the X input of the function object. Connect the output of the function object to the Q / Bandwidth of the Biquad Filter objects


Thus, the velocity of any note that is sent to the Bidule AU 1 MIDI port is converted to a value of 0 - 1, then scaled and inverted to a value of 0 - 10, then eventually routed to the Q / Bandwidth of the Biquad Filter objects.



Mapping
The most important thing to take away from this is the fact that MIDI data - whether notes or other types of data - can be mapped easily and quickly to parameters within a Bidule audio effect plugin, allowing for musical control of the patch. 

Some things to consider: 
• MIDI CC can be used alongside pitchbends and note data
• Explore using the trigger and gate outlets of the Note Extractor
• Any MIDI effects found within live can be added to the MIDI track in question for added control / interest.

Bidule Basics 2: Parameter Modulation

This post assumes that you have read the previous Bidule Basics posts. The Bidule file and Live session and samples used in this example can be found here.



Oscillations
Consider the humble sine wave as we normally might hear and see it. Digitally, this waveform has a range of -1.0 to 1.0. These two extremes represent the maximum and minimum excursions of our speakers, but these values also represent the maximum signal that our digital to analog sound converter can deal with before we get nasty digital distortions.


However, in Bidule we can use our oscillators for control purposes. Rather than just listening to sine tones, we can use sine functions and other waveforms to easily control parameters of various objects.



Process
We can break this process down into a number of easy to understand steps:
• Create an oscillator setup
• Decide where it should be mapped to (i.e. which parameter should be controlled using the oscillator)
• Work out the data range for the mapping (i.e. what are the maximum values that are required for that particular parameter)
• Scale the output of the oscillator so that it is creating a signal that is within our desired data range, and connect the output to the parameter



Creating An Oscillator
Let's work with an example, and use the Biquad Filter from the previous setup, as seen below.

The perfect parameter for us to modulate of the filter is the frequency, of course! The first stage in this process is to create a simple low frequency oscillator (LFO). In Building Blocks > Oscillators, grab the Basic Oscillator object. This is our starting point to creating an LFO.


Rename the oscillator object 'LFO'. We are interested in the first two inlets - so create Variables for each of those inlets, and name them 'Variable Oscillator Frequency' and 'Variable Oscillator Amplitude'. Connect them to the oscillator object.

Set the data range for these tow variables to [0 - 20] and [0 - 1], respectively. This gives a frequency range of 20 Hz and an amplitude gain range of 0 to 1.




Why Should We Transform The Data Range?
Although the frequency parameter is obvious, the gain / amplitude parameter may not be. This parameter represents a multiplication factor that is applied to the oscillator's waveform. An amplitude setting of 1.0 means that the output of the waveform is multiplied by one.

Our sine wave's signal range goes from -1.0 to 1.0; therefore, an amplitude setting of 1.0 will leave this range at -1.0 to 1.0. However, if our amplitude setting is at 0.5, then every point along the sine wave is multiplied by 0.5, resulting in a signal range of -0.5 to 0.5.

Compare the two sine waves shown below as an example - the lighter wave has a range of -1.0 to 1.0, whilst the darker wave has a range of -0.5 to 0.5.



Finally, we need to scale and transform the output of our waveform in terms of the data range that the signal occupies - in other words, a data range of -1.0 to 1.0 may not be suitable for every parameter and every application.

For instance, our frequency input on our Biquad Filter object expects a data value range of 0 to 20,000. If we currently connected our oscillator to this inlet, we would be feeding it with a data source that has a range of -1.0 to 1.0, whereas we need to change our oscillator to sit within the appropriate range.





Scaling the Oscillator Data Range
The most useful object for this purpose is found in Building Blocks > Math > Function. Basically, this object takes up to three inputs - named X, Y and Z - and performs a mathematical function on them, and then sends the resulting data to the outlet.



Don't worry! This sounds complex, but it's really easy - as we're only going to be dealing with the X inlet (the first inlet), and we're only going to be doing simple things to it like addition and multiplication.

Now - let's consider the data range that we have, and the data range that we might like to end up with!
• Our oscillator is currently outputting a signal from -1 to 1
• Our frequency input from the Biquad Filter object has the range of 0 - 20,000 Hz
• However, we might only want a filter that sweeps from 0 Hz to 2000 Hz

So basically, we want to end up with an oscillator that has the signal range of 0 - 2000 instead of -1 to 1. We need to do two things: add something to our oscillator's output, so that we always stay in the positive with our signal (i.e. doesn't go below 0), and also multiply or increase our signal so that it goes all the up to 2000.

Logically, we can think about it this way: let's add 1 to the oscillator signal, and then after that, let's multiply the oscillator signal by 1000.

Double click on the Function object, and enter the expression as an expression of the X inlet. We can write that in the Function object like so: (X + 1.0) * 1000.

What we are saying by typing this into the Function object is: 'Perform this equation on every data value that arrives at the X inlet, and send the resulting value to the outlet'.




Connect the LFO to the Parameter
Now that our oscillator signal is properly scaled, it's time to connect the output of the LFO to the frequency inlet of the Biquad Filter objects, as shown below:

Of course, we can perform this same exercise with any parameter that we normally control with a variable control, opening up many possibilities for control.

Beyond this, also try to experiment with:
• Controlling LFOs using other LFOs
• Send more than one LFO signal to one parameter, but change the frequency, amplitude, etc independently
• Use filtered and scaled audio signals to control parameters of objects

Bidule Basics 1: Serial Versus Parallel Routing

Let's Begin!
To add Bidule as an audio effect to a Live set, go to the Live Devices browser and choose Audio Units > Plogue > Bidule FX, and add to an existing audio track as per any other audio plugin.



When you open up the Bidule plugin, you are greeted with the default patch. This patch is very simpler. It consists of three Bidule objects:
• An object that represents audio going into Bidule
• A mixer object for setting levels, panning and soloing of multiple audio signals
• An object that represents audio coming out of Bidule.

The signal flows from top to bottom in Bidule - audio enters via the top objects, is routed down through the mixer and then leaves via the lowermost object. 

It is important to note that, although Bidule is capable of surround sound processing, Live will send and receive the signals going into and out of Bidule as stereo only. This means that only the first two (representing left and right) inlets and outlets of the plugin input and output object must be used.



Object Parameters
Double clicking on any object will display any parameters associated with that object. For example, we can double click on the mixer object to bring up the Mixer parameters, including eight channel strips. Each channel strip controls one pair of the sixteen individual inputs. Every odd input is a left signal. Every even input is a right signal.





Adding Objects
To add an object, simply connect the outlets of an existing object to the inlets of the object in question. Then, connect the outlets of the object in question to an input. Place the mouse over an outlet or an inlet to determine more information about the inlet type (displayed in the lower left hand of the Bidule plugin window) - whether it expects an audio signal or a data range for a certain function or parameter.



Delete the connections between the Bidule input object and the mixer object. Click on palette to open the object palette, and navigate to Effects > Freeverb. Drag and drop multiple Freeverb object into place, as shown below. Also add two 4-tap Delay Lines into place. Connect as shown.



Double click on the Freeverb objects to change their parameters.



The Freeverb object process sound in stereo (L and R). The 4-Tap Delay objects process sound in mono - hence, two are needed for a stereo signal. Connect the output of the two 4-Tap Delay objects to the first pair of left and right inlets of the mixer object.



Serial Versus Parallel Routing
The example shown previously is a serial example of audio signal processing, in that the output of one effect is routed to the input of another effect - Input > Freeverb > Freeverb > 4-tap Delay > Output. However, with Bidule, we can process multiple streams of the same signal simultaneously - i.e. the output of one of the Freeverb objects can be routed to more than one place for additional processing.

This opens up many more possibilities than would be possible with simple serial connections. A simple example of parallel routing is shown below.




Variables
Many objects in Bidule allow for controlling parameters or functions via an inlet. Data can be sent to these inlets to control that particular parameter. By inserting a Variable object from Building Blocks > Math > Variable, a slider and a range of values for the slider can be used as an interface to control effects.



By double clicking on the Variable object, we can set the output value via the slider, in addition to the value ranges of the slider. The default slider data range is 0.00 to 1.00, however these values can be changed.



Consider the Biquad Filter object (Building Blocks >  Filters > Biquad Filter). This object has four inlets and one outlet:
• The first inlet is the audio input (for the signal that is to be filtered).
• The second inlet is a data inlet for the frequency control.
• The third inlet is a data inlet for the Q / bandwidth control.
• The fourth inlet is a data inlet for the filter gain control.
• The outlet is for the filtered audio coming out of the filter.



Connect the output of the Variable object to the frequency control inlet of the Biquad Filter. Obviously, we need to change the useable range of the slider - as the default data range is useless. Set the min to 0.00 and the max to 20,000.00, to correspond to a range of 0Hz to 20KHz.



Add variables for the Q and the gain. Set the range to [0 - 10] and [-20 to 20] respectively. The Q is simply in bandwidth amount, and so a range of 0 - 10 makes sense. The gain is simply in dB, and so a range of -20 dB to +20 dB for the filter gain make sense. You can rename Variable objects by control-clicking on them and selecting rename.