memory effect for routing of audio clip, and simple implementation suggestion

Post your ideas and suggestions here

Return to “To Do”

[You can only see part of this thread as you are not logged in to the forums]
Grae_
Thu Aug 18, 2022 5:33 pm

x

memory effect for routing of audio clip, and simple implementation suggestion

Hi all,

Situation and problem:
memory routing.png
Solution proposed: memory of the previous routing using a stack.

Explanation using words:
Say audio clip1 is routed to mixer insert X, and you drop it accidentally to the audio track 93 as on the screencap.
The consequence is: unfortunately audio clip1 is routed to 93 instead of X.
Good or bad ?
> Good if it was intentional (but even if it is the case, we will see why it is a problem below)
> Bad if it is an accident

Now say we want to take audio clip 1 to a different playlist lane again, maybe the one above for instance which is neither instrument/audio track.
As it is implemented now, FL would leave untouched the routing of the audio clip 1, and thus it would be insert 93 in our example.
Good bad ?
Bad Now we have no way to know what the audio clip 1 was formerly routed to, unless we know it by memory (on named it maybe). If we do not fit in either scenario, we are just annoyed by losing the routing we had before only for passing by the audio/instrument track ever so briefly. Plus I would add that the point of an audio track is that it concerns the track only, it is in its name after all...

Solution in words:
I propose we revert back to the previous routing using a simple routing stack.

Pseudo code (C++ like):

Code: Select all

// in some file like: audioClips.cpp
//--------------------------------------------
// Clip is on a audio or instrument track ?
if	 (currentClip.location == instrumentOrAudioTrack)
{ 
	 push(instrumentOrAudioTrack.insertNumber, currentClip.routing) ; 	// Basically applying the routing to the clip based on the track it lies on
}

/* Here we already know the clip does NOT lie on an audio or instrument track
We check the size to know if the clip just got "pushed" a value on its routing stack */
else if (size(currentClip.routing) > 1)
{
	 pop(currentClip.routing) ;		// The top of the stack, which was the previous audio/instrument track insertNumber is removed, and now the stack size is 1 again, and the routing corresponds to its prior value
}

// No need for an else statement as a clip which is not on a instrumentOrAudioTrack can only have a stack size of 1, and thus its routing is left untouched. This is also undo-function compatible, just by swapping the top and bottom of the routing stack together.
//--------------------------------------------

// This is what I have in mind for the currentClip routing stack:
// in some file like: audioClips.hpp
//--------------------------------------------
class audioClip
{
	public:
		//stuff
	private:
		//stuff
		std::vector<unsigned int> routing ;	// Here we assume integer values from 0 to 125 given the current mixer count, so an unsigned int is wasting memory, but whatever, you get the point. 
}
What do you think of this idea ?
I find that to be pleasantly simple yet it would solve an otherwise annoying problem.
Of course this is a mere suggestion, I doubt actual implementation would ever look like that, but the concept seems interesting.
You do not have the required permissions to view the files attached to this post.

Return to “To Do”