With a lot of difficulty because I don’t understand anything about scripts, I succeeded in creating an “ON/OFF” button to make or not the script running on rackspace activation.
I have also tried to create a “TIME” widget to select the duration of the fade-in, but I did not succeed in applying it to the SetGeneratorLength() function which seems to only accepts an integer…
Is is there a way to do this ?
Here is the script with some lines where I tried to insert timing elements but unfinished.
And the gig file Auto Fade-In .gig (82.4 KB)
AUTO : Widget // A button widget USED TO ENABLE THE RAMP
TIME : Widget // A knob widget USED TO SET THE GENERATOR LENGHT
GAIN : Widget // A knob widget used to trigger the ramp
myRamp : Ramp // A generator that moves smoothly from 0.0 to 1.0 over some specified time
StartValue : double // This remembers the initial value of the knob so that when we start again
// the knob will be reset to this value
Timevalue : double
Running : Boolean // Keep track of whether we are currently running the ramp
SetGeneratorOneShot(myRamp, true) // Generator will only run once when triggered
myRamp.SetGeneratorLength(5000); // MILLISECONDS ONLY???
On Activate // A new rackspace is selected
StartValue := GetWidgetValue(GAIN) // Get the initial level of the knob (NB make sure it's not already 0
// otherwise nothing will happen
Timevalue := GetWidgetValue(TIME)
On WidgetValueChanged(newValue : double) from AUTO
If newValue > 0.1
myRamp.EnableGenerator(True) // Arm the ramp function generator
SetTimersRunning(true) // The ramp function generator will now start producing values
On TimePassing(timeX : integer, amplitudeY : double) from myRamp // This gets called by the ramp generator as time passes
SetWidgetValue(GAIN, StartValue + StartValue *70 *amplitudeY) // start value = 0.1 *70 to reach end value = 70
(formatted the code as “code” for better readability - schamass as Mod)
As I encountered the same issue, I decided to find a solution to crossfade from one rackspace to another with 3 conditions:
with a different sound in each rackspace,
with no level changes.
This is a morphing function.
This annotated image shows the scripted transitions in yellow and the non-scripted in green.
I don’t know GP well enough to say if there is a solution other than the script to achieve this regular level, but in the meantime, this one works fine except for the transition time which I can’t get to work.
Yes when no script is applied, because previous input fading is added to sound played on next rackspace, so the signal is increased sharply at the beginning then decreases while input muting progresses .
With the script, as the sound played in new rackspace increased from 0 while previous input fading decreases, it works like a kind of constant level crossfade.
It is obvious to hear in the gig file: just insert a media file player in the 2 rackspaces with i.e. a 440Hz continuous signal playing and go from one rackspace to the other: you will hear a peak level on activating the rackspace with no script.
There’s no reason why the level would not increase for a short period in this scenario.
You’re playing one rackspace then you switch to a new one while playing. The new rackspace plays full volume immediately as it should and the old one has 5 seconds to quiet down. That’s how you set things up. If you used hardware units you’d hear exactly the same thing.
During that time both rackspaces “ring” with the old one quickly quieting down.
I’m trying to explain the process once more to make sure that we all understand that this is working as designed and, more importantly, as it should. There’s no magic bullet that would allow you to determine how quickly one wants the new rackspace to start playing and there is no algorithm that would do that for you. The only option is to play it immediately.
Consider the scenario where you play rackspace1, then stop playing and there’s no sound. Now you switch to rackspace2 - should the sound play full volume immediately or should it slowly come up for the duration of x number of seconds?
I’ve used this, on stage, for many years as have many other users, blasting the sound through some heavy PAs and this was never an issue. You could set the tail to 0 if you want to quiet the previous rackspace immediately.
To get back to the problem I’m having with the script: is there any way to assign a variable to SetGeneratorLength()?
Or do I have to enter an integer? This would not be a problem as I only use this script occasionally and the value set in this function will not change for the rackspace concerned.
To tell the truth, until now, I never needed a x-fade transition between two Rackspaces and so never read the manual with this need in my mind. But I supposed that the « fade out » does a fade out transition from current volume to 0 during x seconds starting when switching to another rackspace. This seems to be the case. I also supposed that the « fade in » does a fade in of x seconds starting when entering the rackspace, such that if combined with another rackspace using a fade out, we could expect a smooth transition. So it seems I don’t understand what this « fade in » does and will have to check the manual.
@djogon has explained perfectly the transition mechanism that increases the volume during the release time of the input muting.
Before the arrival of GP4, I used to use a volume pedal to smooth out - when necessary - the attack of my guitar sound when changing rackspace.
Now, with the ability to use the input muting, the temptation is great to get a smooth morphing from one rackspace to another when necessary. I was used to using this crossfade function between presets on a Digitech multi-effects unit many years ago.
I recall that I have from a long time integrated this technique in my music within the same rackspace thanks to firstly Melda’s MRatio plugin then @Davidsan’s scriptlet x-fader and I can get now the same result between rackspaces thanks to the fade-in script.
I fully understand that this may not seem to you to be of essential use, but in the context of the music I play live, being the only instrumentalist accompanying a literary reader in total silence, the slightest difference in dynamics and sound level may be offensive. I try most of the time to stay in the same rack when it is necessary to do such a crossfade but sometimes I am forced to change rackspace when a lot of amps, fx and synths have to be replaced.
I don’t think it is necessary to continue this debate and to mobilize your time on this subject which remains very anecdotal compared to the expectations of the community. The essential point is that it works fine for me and I can even do without tweaking the rise time through a widget, just by typing it straight in the script. It concerns only a few rackspaces - though it is essential.
And I am really happy with GP, not only because of the functions it offers, but also thanks to the possibility to do things I would have thought impossible… such as this fade-in effect
And many thanks again to all the devs and all those contributing to this wonderful adventure