TracktionEngine
Loading...
Searching...
No Matches
Namespaces | Enumerations | Functions
tracktion_EditUtilities.h File Reference

Namespaces

namespace  engine
 

Enumerations

enum class  engine::CloseGap { engine::no , engine::yes }
 An enum to specify if gaps deleted should be closed or not. More...
 
enum class  engine::MoveClipAction { engine::moveToEndOfLast , engine::moveToStartOfNext , engine::moveStartToCursor , engine::moveEndToCursor }
 Enum to dictate move clip behaviour. More...
 

Functions

Project::Ptr engine::getProjectForEdit (const Edit &)
 Tries to find the project that contains this edit (but may return nullptr!)
 
ProjectItem::Ptr engine::getProjectItemForEdit (const Edit &)
 Tries to find the project item that refers to this edit (but may return nullptr!)
 
juce::File engine::getEditFileFromProjectManager (Edit &)
 Uses the ProjectManager to look up the file for an Edit.
 
bool engine::referencesProjectItem (Edit &, ProjectItemRef)
 Returns true if the ProjectItemRef is being used for any of the Edit's elements.
 
void engine::convertAllSourcePaths (Edit &, bool useRelativePaths)
 Converts all clip source paths in an Edit to relative or absolute paths.
 
void engine::insertSpaceIntoEdit (Edit &, TimeRange timeRangeToInsert, const juce::Array< Track * > &onlyTheseTracks={})
 Inserts blank space in to an Edit, splitting clips if necessary.
 
void engine::insertSpaceIntoEditFromBeatRange (Edit &, BeatRange)
 Inserts a number of blank beats in to the Edit.
 
EditItemengine::findEditItemForID (Edit &, EditItemID)
 Looks for an item in an edit with a given ID.
 
juce::Array< Track * > engine::getAllTracks (const Edit &)
 Returns all the tracks in an Edit.
 
juce::Array< Track * > engine::getTopLevelTracks (const Edit &)
 Returns all of the non-foldered tracks in an Edit.
 
template<typename TrackType >
juce::Array< TrackType * > engine::getTracksOfType (const Edit &, bool recursive)
 Returns the tracks of a given type in an Edit.
 
juce::Array< AudioTrack * > engine::getAudioTracks (const Edit &)
 Returns all the AudioTracks in an Edit.
 
juce::Array< ClipTrack * > engine::getClipTracks (const Edit &)
 Returns all the ClipTracks in an Edit.
 
int engine::getTotalNumTracks (const Edit &)
 Returns the total number of Tracks in an Edit.
 
Trackengine::findTrackForID (const Edit &, EditItemID)
 Returns the Track with a given ID if contained in the Edit.
 
AudioTrackengine::findAudioTrackForID (const Edit &, EditItemID)
 Returns the AudioTrack with a given ID if contained in the Edit.
 
juce::Array< Track * > engine::findTracksForIDs (const Edit &, const juce::Array< EditItemID > &)
 Returns the Tracks for the given IDs in the Edit.
 
Trackengine::findTrackForState (const Edit &, const juce::ValueTree &)
 Returns the Track with a given state if contained in the Edit.
 
AudioTrackengine::getFirstAudioTrack (const Edit &)
 Returns the first audio track in an Edit.
 
juce::Array< Track * > engine::findAllTracksContainingSelectedItems (const SelectableList &)
 Returns all the tracks containing the selected tracks or TrackItems.
 
ClipTrackengine::findFirstClipTrackFromSelection (const SelectableList &)
 Returns the first ClipTrack from the selected tracks or clips.
 
bool engine::containsTrack (const Edit &, const Track &)
 Returns true if the Edit contains this Track.
 
TrackOutputengine::getTrackOutput (Track &)
 Returns the TrackOutput if the given track has one.
 
juce::BigInteger engine::toBitSet (const juce::Array< Track * > &)
 Returns the given tracks as a BigInteger, with each set bit corresponding to a track's index in the Edit's array of all tracks (.
 
juce::Array< Track * > engine::toTrackArray (Edit &, const juce::BigInteger &)
 Returns an Array of Track[s] corresponding to the set bits of all tracks in an Edit.
 
template<typename TrackItemType >
juce::Array< TrackItemType * > engine::getTrackItemsOfType (const Track &)
 
ClipOwnerengine::findClipOwnerForID (const Edit &, EditItemID)
 Returns the ClipOwner with a given ID if it can be found in the Edit.
 
ClipSlotengine::findClipSlotForID (const Edit &, EditItemID)
 Returns the ClipSlot for the given ID.
 
int engine::findClipSlotIndex (ClipSlot &)
 Returns the index of the ClipSlot in the list it is owned by.
 
Clipengine::findClipForID (const Edit &, EditItemID)
 Returns the Clip with a given ID if contained in the Edit.
 
Clipengine::findClipForState (const Edit &, const juce::ValueTree &)
 Returns the Clip for a given state if contained in the Edit.
 
bool engine::containsClip (const Edit &, Clip *)
 Returns true if an Edit contains a given clip.
 
Clip::Ptr engine::duplicateClip (const Clip &)
 Creates a unique copy of this clip with a new EditItemID.
 
void engine::visitAllTrackItems (const Edit &, std::function< bool(TrackItem &)>)
 Calls a function for all TrackItems in an Edit.
 
TimeRange engine::getTimeRangeForSelectedItems (const SelectableList &)
 Returns the time range covered by the given items.
 
void engine::deleteRegionOfTracks (Edit &, TimeRange rangeToDelete, bool onlySelectedTracks, CloseGap, SelectionManager *)
 Deletes a time range of an Edit, optionally closing the gap.
 
void engine::deleteRegionOfClip (Clip &, TimeRange rangeToDelete)
 Deletes a time range of a Clip.
 
void engine::deleteRegionOfSelectedClips (SelectionManager &, TimeRange rangeToDelete, CloseGap, bool moveAllSubsequentClipsOnTrack)
 Deletes a time range of a Clip selection, optionally closing the gap.
 
SelectableList engine::splitClips (const SelectableList &clips, TimePosition time)
 Splits the clips at a given time.
 
void engine::moveSelectedClips (const SelectableList &, Edit &, MoveClipAction mode, bool alsoMoveAutomation)
 Moves the selected clips within their track.
 
SelectableList engine::getClipSelectionWithCollectionClipContents (const SelectableList &)
 Returns a list of clips.
 
juce::Array< ClipEffect * > engine::getAllClipEffects (Edit &edit)
 Returns all clip effects.
 
MidiNoteengine::findNoteForState (const Edit &, const juce::ValueTree &)
 Returns the MidiNote with a given state.
 
juce::Result engine::mergeMidiClips (juce::Array< MidiClip * >, SelectionManager *sm=nullptr)
 Merges a set of MIDI clips in to one new one.
 
juce::OwnedArray< MidiListengine::readFileToMidiList (juce::File midiFile, bool importAsNoteExpression)
 Helper function to read a file to a number of MidiLists.
 
MidiClip::Ptr engine::createClipFromFile (juce::File midiFile, ClipOwner &, bool importAsNoteExpression)
 Helper function to read a MIDI file and create a MidiClip from it.
 
Plugin::Array engine::getAllPlugins (const Edit &, bool includeMasterVolume)
 Returns all the plugins in a given Edit.
 
Plugin::Ptr engine::findPluginForState (const Edit &, const juce::ValueTree &)
 Returns the plugin with given state.
 
Plugin::Ptr engine::findPluginForID (const Edit &, EditItemID)
 Returns the plugin with given EditItemID.
 
Trackengine::getTrackContainingPlugin (const Edit &, const Plugin *)
 Returns the track for the track which the plugin is located on.
 
bool engine::areAnyPluginsMissing (const Edit &)
 Returns true if any plugins couldn't be loaded beacuse their files are missing.
 
juce::Array< RackInstance * > engine::getRackInstancesInEditForType (const RackType &)
 Returns all of the instances of a specific RackType in an Edit.
 
void engine::muteOrUnmuteAllPlugins (const Edit &)
 Toggles the enabled state of all plugins in an Edit.
 
void engine::midiPanic (Edit &, bool resetPlugins)
 Performs a "MIDI panic" on the edit, by sending all-note-off messages directly to all plugins in the edit, and optionally resetting them to kill any reverb tails, etc.
 
template<typename PluginType >
juce::ReferenceCountedObjectPtr< PluginType > engine::insertNewPlugin (Track &, int index=0)
 Adds a new instance of the given plugin to the track's plugin list at the specified index.
 
std::vector< AutomatableEditItem * > engine::getAllAutomatableEditItems (const Edit &)
 Returns all AutomatableEditItems in an Edit.
 
void engine::deleteAutomation (const SelectableList &selectedClips)
 Deletes the automation covered by the selected clips.
 
juce::Array< AutomatableParameter::ModifierSource * > engine::getAllModifierSources (const Edit &)
 Returns all the ModifierSources in an Edit.
 
juce::ReferenceCountedArray< Modifierengine::getAllModifiers (const Edit &)
 Returns all the Modifiers in an Edit.
 
template<typename ModifierType >
ModifierType::Ptr engine::findModifierTypeForID (const Edit &, EditItemID)
 Returns the Modifier with a given type and ID.
 
Modifier::Ptr engine::findModifierForID (const Edit &, EditItemID)
 Returns the Modifier with a given ID.
 
Modifier::Ptr engine::findModifierForID (const RackType &, EditItemID)
 Returns the Modifier with a given ID if the RackType contains it.
 
Trackengine::getTrackContainingModifier (const Edit &, const Modifier::Ptr &)
 Returns the Track containing a Modifier.
 
Trackengine::getTrackShowingParameter (AutomatableParameter &)
 Returns the Track that is currently showing an AutomatableParameter's curve.
 
juce::Array< MacroParameterList * > engine::getAllMacroParameterLists (const Edit &)
 Returns all the MacroParameterLists in an Edit.
 
juce::Array< MacroParameterElement * > engine::getAllMacroParameterElements (const Edit &)
 Returns all the MacroParameterElement in an Edit.
 
InputDeviceInstance::RecordingParameters engine::getDefaultRecordingParameters (const EditPlaybackContext &, TimePosition playStart, TimePosition punchIn)
 Returns the default set of recording parameters.
 
juce::Result engine::prepareAndPunchRecord (InputDeviceInstance &, EditItemID)
 Starts an InputDeviceInstance recording to the given target without any count-in etc.
 
tl::expected< Clip::Array, juce::String > engine::punchOutRecording (InputDeviceInstance &)
 If the instance is currently recording, this will stop it and return any created clips or an error message.
 
bool engine::isRecording (EditPlaybackContext &)
 Returns true if any inputs are currently recording.
 
InputDeviceInstance::Destinationengine::assignTrackAsInput (AudioTrack &destinationTrack, const AudioTrack &sourceTrack, InputDevice::DeviceType)
 Creates an InputDeviceInstance::Destination on the destinationTrack from the sourceTrack if possible.
 
template<typename Type >
requires (std::is_same_v<Type, Edit> || requires (Type t) { t.edit; } || requires (Type t) { t.getEdit(); })
Editengine::getEdit (Type &type)
 Returns a reference to the Edit if accessible by the given object.
 
TempoSequenceengine::getTempoSequence (auto &type)
 
juce::UndoManager & engine::getUndoManager (auto &type)
 
juce::UndoManager * engine::getUndoManager_p (auto &type)