XJ music engine  1.9.6
In-game runtime engine for XJ music.
Public Member Functions | List of all members
XJ::Engine Class Reference

#include <Engine.h>

Public Member Functions

 Engine (const std::optional< std::string > &pathToProjectFile, std::optional< Fabricator::ControlMode > controlMode, std::optional< int > craftAheadSeconds, std::optional< int > dubAheadSeconds, std::optional< int > deadlineSeconds, std::optional< int > persistenceWindowSeconds)
 
void start (const std::optional< std::string > &templateIdentifier)
 
void finish (bool cancelled) const
 
std::vector< AudioScheduleEventRunCycle (unsigned long long atChainMicros) const
 
SegmentEntityStoregetSegmentStore () const
 
ContentEntityStoregetProjectContent () const
 
ContentEntityStoregetTemplateContent () const
 
WorkState getWorkState () const
 
std::optional< MemeTaxonomygetMemeTaxonomy () const
 
std::vector< const Program * > getAllMacroPrograms () const
 
void doOverrideMacro (const Program *macroProgram) const
 
void doOverrideMemes (const std::set< std::string > &memes) const
 
void setIntensityOverride (std::optional< float > intensity) const
 
std::filesystem::path getBuildPath ()
 
WorkSettings getSettings () const
 
 ~ Engine ()
 

Constructor & Destructor Documentation

◆ Engine()

Engine::Engine ( const std::optional< std::string > &  pathToProjectFile,
std::optional< Fabricator::ControlMode controlMode,
std::optional< int >  craftAheadSeconds,
std::optional< int >  dubAheadSeconds,
std::optional< int >  deadlineSeconds,
std::optional< int >  persistenceWindowSeconds 
)
explicit

Construct a new Engine

Parameters
pathToProjectFilepath to the .xj project file from which to load content
controlModethe fabrication control mode
craftAheadSeconds(optional) how many seconds ahead to craft
dubAheadSeconds(optional) how many seconds ahead to dub
deadlineSeconds(optional) audio scheduling deadline in seconds
persistenceWindowSeconds(optional) how long to keep segments in memory

◆ ~ Engine()

XJ::Engine::~ Engine ( )

Virtual destructor

Member Function Documentation

◆ doOverrideMacro()

void Engine::doOverrideMacro ( const Program macroProgram) const

Go to the given macro program right away https://github.com/xjmusic/xjmusic/issues/197

Parameters
macroProgramto go to

◆ doOverrideMemes()

void Engine::doOverrideMemes ( const std::set< std::string > &  memes) const

Manually go to a specific taxonomy category meme, and force until reset https://github.com/xjmusic/xjmusic/issues/199

Parameters
memesspecific (assumed allowably) set of taxonomy category memes

◆ finish()

void Engine::finish ( bool  cancelled) const

Stop work

◆ getAllMacroPrograms()

std::vector< const Program * > Engine::getAllMacroPrograms ( ) const
Returns
all macro programs in alphabetical order

◆ getBuildPath()

std::filesystem::path Engine::getBuildPath ( )

Get the path to the build directory

◆ getMemeTaxonomy()

std::optional< MemeTaxonomy > Engine::getMemeTaxonomy ( ) const
Returns
the meme taxonomy from the current template configuration

◆ getProjectContent()

ContentEntityStore * Engine::getProjectContent ( ) const

Get all the content loaded for the project

Returns
source material

◆ getSegmentStore()

SegmentEntityStore * Engine::getSegmentStore ( ) const

Get the entity store

◆ getSettings()

WorkSettings Engine::getSettings ( ) const

Get the work settings

Returns
the settings

◆ getTemplateContent()

ContentEntityStore * Engine::getTemplateContent ( ) const

Get all the content for the working template

Returns

◆ getWorkState()

WorkState Engine::getWorkState ( ) const
Returns
the current work state

◆ RunCycle()

std::vector< AudioScheduleEvent > Engine::RunCycle ( unsigned long long  atChainMicros) const

Run the tick cycle (1-3 times per second) This returns the list of audio that should be queued up for playback in a structured way

◆ setIntensityOverride()

void Engine::setIntensityOverride ( std::optional< float >  intensity) const

Set the intensity override to a value between 0 and 1, or null if no override

Parameters
intensitythe intensity to set

◆ start()

void Engine::start ( const std::optional< std::string > &  templateIdentifier)

Start work with the given template identifier.

  1. Clear the segment entity store
  2. Reload the project content
  3. Load the template content
  4. Begin fabrication work
    Parameters
    templateIdentifieridentify the template to fabricate

The documentation for this class was generated from the following files: