Logic Studio apps Trigger a Really Long Fade In?

paulnajar

Logician
Hi Folks,

I’ve been scratching my head trying to figure a way to trigger a really long fade in - like 90 - 180 seconds from zero to 100% volume where all I have to do is play a note/s and keep holding it.

The message could be MIDI or it could be an audio plugin. Closest I’ve come is using MainStage’s MIDI modulator plugin mapping a 32 bar triangle wave (for a linear response) to expression which is mapped to volume in the patch I need to control. I also set the patch tempo to something slow like 90 BPM or lower which extends the rise time the slower the tempo.

There are two problems with this approach. One is the LFO won’t retrigger at the bottom of it’s cycle (so that the volume rises from zero) and the other issue is once the top of the triangle shape is reached it starts to descend again as an LFO should but of course I don’t want that.

I am simply looking for a long fade in triggered by me playing a keyboard. Maybe there’s an AU plugin one of you know about or another solution?

Kind regards
 

Peter Ostry

Administrator
Staff member
This is an automatic fader, so you need a triggerable single ramp with start- and end values, adjustable speed and one or more curves.

I don't know a plugin for that. The only plugin for volume ramps I know is "Volt" from Cerberus Audio, but although it is MIDI triggerable, it needs automation to work. I cannot get it running in Mainstage.

  • It should be possible with the Logic/Mainstage Scripter MIDI FX plugin but it may not be trivial to get the curve, which is necessary from my experience. I don't know if we have people here who know to write an automatic fader with curves for the Scripter.

  • The quick and dirty solution is Max.
    The most sophisticated solution with additional features is, well, Max again ...
    If you don't have Max – a Max patch can be compiled to run as a standalone app without the main program. A Max/MSP programmer can make you such a thing. I could do it.

  • Another solution would be running Logic beside Mainstage, just to deliver the fader values. You can trigger Logic from Mainstage to start and stop and use an automation curve to send the values to Mainstage. But I think a better option is to use only the Logic Environment which can be triggered, generates events and makes curves.

  • Plogue Bidule should be able to do it. The Bidule plugin does not work in Mainstage here. Most likely you would use the standalone version. I cannot program this ramp in Bidule but I am not very familiar with it.

  • If you have a sequencer with enough steps that can do a "one shot" and can be inserted as a MIDI FX plugin, you could use the Modifier plugin afterwards to send parameters to some gain plugin. My Thesys step sequencer has enough steps but does no "one shot" so far I know.
 

paulnajar

Logician
Thanks for your thoughtful reply Peter.

I’ve decided to try using the scripter and shake off my resistance to getting to know it.

My application is for performing live so for just one thing like this it seems like a benefit to keep background apps to a minimum.


I’ll let you know how I get on.

Kind regards
 

paulnajar

Logician
So I got the script to work perfectly but it turns out there is a bug in MainStage when running scripts that access clock information and the CPU jumps straight to 100%. I've reported it to Apple. I've verified this on 2 different macs running 10.13.4 and MS 3.3.2.

The same scripts do not have any issues inside of Logic.

FYI this is the script I used:


var fullLevel = 127;
var totalBeats = 90;

var cc = new ControlChange;
cc.channel = 1;
cc.number = 11;
cc.value = 0;

var NeedsTimingInfo = true;
var startBeat = 0;

function ProcessMIDI() {
var ctx = GetTimingInfo();
if(ctx.playing && startBeat > 0) {

var level = Math.round(((ctx.blockStartBeat-startBeat)/totalBeats) * fullLevel);
if (level != cc.value) {
cc.value = level;
cc.trace();
cc.send();
}
}
}


function HandleMIDI(event) {

// if this is first note press, then start the timer
if (event instanceof NoteOn && startBeat==0) {
startBeat = event.beatPos;
cc.value = 0;
cc.trace();
cc.send();
}
event.send(); //Pass MIDI events through the plug-in.
}

function Reset() {
startBeat = 0;
}
 

Peter Ostry

Administrator
Staff member
Nice. But he script runs far beyond value 127.

You may want to change line 17 from this:
if (level != cc.value) {
to this:
if (level != cc.value && level <= fullLevel) {
to avoid running over the defined fullLevel:

Don't know if this is the best method for termination but at least it stops.
 
Top