11namespace tracktion {
inline namespace engine
14static Engine* instance =
nullptr;
23 propertyStorage = std::move (ps);
28 uiBehaviour = std::move (ub);
33 engineBehaviour = std::move (eb);
47void Engine::initialise()
49 Selectable::initialise();
68 if (engineBehaviour->autoInitialiseDeviceManager())
69 deviceManager->initialise();
71 pluginManager->initialise();
74 externalControllerManager->initialise();
85 temporaryFileManager->cleanUp();
90 backgroundJobManager.reset();
91 deviceManager.reset();
92 midiProgramManager.reset();
94 MelodyneFileReader::cleanUpOnShutdown();
95 pluginManager.reset();
97 temporaryFileManager.reset();
98 projectManager.reset();
100 renderManager.reset();
101 externalControllerManager.reset();
102 propertyStorage.reset();
104 engineBehaviour.reset();
105 audioFileManager.reset();
106 midiLearnState.reset();
107 audioFileFormatManager.reset();
108 backToArrangerUpdateTimer.reset();
109 bufferedAudioFileManager.reset();
112 engines.removeFirstMatchingValue (
this);
117 return "Tracktion Engine v3.0.0";
125#if TRACKTION_ENABLE_SINGLETONS
126Engine& Engine::getInstance()
135 jassert (projectManager !=
nullptr);
136 return *projectManager;
141 jassert (audioFileFormatManager !=
nullptr);
142 return *audioFileFormatManager;
147 jassert (deviceManager !=
nullptr);
148 return *deviceManager;
154 return *midiProgramManager;
159 jassert (externalControllerManager !=
nullptr);
160 return *externalControllerManager;
165 jassert (renderManager !=
nullptr);
166 return *renderManager;
171 jassert (backgroundJobManager !=
nullptr);
172 return *backgroundJobManager;
177 jassert (propertyStorage !=
nullptr);
178 return *propertyStorage;
183 jassert (uiBehaviour !=
nullptr);
189 jassert (engineBehaviour !=
nullptr);
190 return *engineBehaviour;
195 jassert (audioFileManager !=
nullptr);
196 return *audioFileManager;
201 jassert (midiLearnState !=
nullptr);
202 return *midiLearnState;
207 jassert (pluginManager !=
nullptr);
208 return *pluginManager;
213 jassert (editDeleter !=
nullptr);
219 jassert (temporaryFileManager !=
nullptr);
220 return *temporaryFileManager;
225 jassert (recordingThumbnailManager !=
nullptr);
226 return *recordingThumbnailManager;
231 jassert (waveInputRecordingThread !=
nullptr);
232 return *waveInputRecordingThread;
237 jassert (activeEdits !=
nullptr);
243 if (! grooveTemplateManager)
246 return *grooveTemplateManager;
259 if (! warpTimeFactory)
262 return *warpTimeFactory;
267 if (! backToArrangerUpdateTimer)
270 return *backToArrangerUpdateTimer;
275 if (! bufferedAudioFileManager)
278 return *bufferedAudioFileManager;
283 return p.edit.shouldLoadPlugins();
static void initialise()
Initialises the internal buffer list.
Manages a set of background tasks that can be run concurrently on a background thread.
Provides custom handlers to control various aspects of the engine's behaviour.
virtual bool shouldLoadPlugin(ExternalPlugin &p)
Should the plugin be loaded.
The Engine is the central class for all tracktion sessions.
CompFactory & getCompFactory() const
Returns the CompFactory instance.
MidiProgramManager & getMidiProgramManager() const
Returns the MidiProgramManager instance that handles MIDI banks, programs, sets or presets.
PropertyStorage & getPropertyStorage() const
Returns the PropertyStorage user settings customisable XML file.
RenderManager & getRenderManager() const
Returns the RenderManager instance.
WaveInputRecordingThread & getWaveInputRecordingThread() const
Returns the WaveInputRecordingThread instance.
AudioFileFormatManager & getAudioFileFormatManager() const
Returns the AudioFileFormatManager that maintains a list of available audio file formats.
WarpTimeFactory & getWarpTimeFactory() const
Returns the WarpTimeFactory instance.
static juce::Array< Engine * > getEngines()
Returns the list of currently active engines.
UIBehaviour & getUIBehaviour() const
Returns the UIBehaviour class.
ExternalControllerManager & getExternalControllerManager() const
Returns the ExternalControllerManager instance.
DeviceManager & getDeviceManager() const
Returns the DeviceManager instance for handling audio / MIDI devices.
AudioFileManager & getAudioFileManager() const
Returns the AudioFileManager instance.
EngineBehaviour & getEngineBehaviour() const
Returns the EngineBehaviour instance.
Engine(juce::String applicationName)
Constructs a default Engine with an application name.
ProjectManager & getProjectManager() const
Returns the ProjectManager instance.
GrooveTemplateManager & getGrooveTemplateManager()
Returns the GrooveTemplateManager instance.
BufferedAudioFileManager & getBufferedAudioFileManager()
Returns the BufferedAudioFileManager instance.
RecordingThumbnailManager & getRecordingThumbnailManager() const
Returns the RecordingThumbnailManager instance.
ActiveEdits & getActiveEdits() const noexcept
Returns the ActiveEdits instance.
static juce::String getVersion()
Returns the current version of Tracktion Engine.
MidiLearnState & getMidiLearnState() const
Returns the MidiLearnState instance.
PluginManager & getPluginManager() const
Returns the PluginManager instance.
BackgroundJobManager & getBackgroundJobs() const
Returns the BackgroundJobManager instance.
TemporaryFileManager & getTemporaryFileManager() const
Returns the TemporaryFileManager allowing to handle the default app and user temporary folders.
SharedTimer & getBackToArrangerUpdateTimer() const
Returns the SharedTimer instance.
EditDeleter & getEditDeleter() const
Returns the EditDeleter instance.
Keeps a list of external controllers and keeps them connected to the right MIDI in/out devices.
Looks after the list of groove templates.
Manages the Midi learn state and Listener interface to notify subclasses when the state changes.
Create a subclass of PropertyStorage to customize how settings are saved and recalled.
Holds a pool of Thumbnails that are populated whilst recording.
Manages a set of reference counted render jobs and can be used to retrieve matching jobs or create ne...
void cleanUp()
Cleans up any remaining jobs - should be called before the manager is deleted.
Holds info about where temp files should go, and tidies up old ones when needed.
Create a subclass of UIBehaviour to custom UI elements created by the engine.
A WarpTimeFactory manages WarpTimeManagers for Clips living in an Edit.
A list of all currently open edits.
Deferred Edit object deleter.