# For core

### Initialization

`Engine::init()` performs initialization process for the core of LMMS. It initializes the following classes:

* `ProjectJournal`
* `AudioEngine`
* `Song`
* `Mixer`
* `PatternStore`
* `Ladspa2LMMS`
* `PresetPreviewPlayHandle`
* `DummyTrackContainer`

It also calls some functions for initialization as well:

* `BandLimitedWave::generateWaves()` for creating/loading band-limited wavetables
* `ProjectJournal::setJournalling()` to enable journaling
* `AudioEngine::initDevices()` for opening Audio and MIDI devices
* `AudioEngine::startProcessing()` for starting audio rendering threads

### Cleanup

`Engine::destroy()` simply clean up things initialized by `Engine::init()`.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.lmms.io/developer-guides/core/the-structure-of-the-lmms-core/initializations-and-cleanups/for-core.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
