XJ music engine  1.9.6
In-game runtime engine for XJ music.
Classes | Typedefs | Enumerations | Functions
XJ Namespace Reference

Classes

class  ActiveAudio
 
class  AudioMathUtils
 
class  AudioScheduleEvent
 
class  ContentEntity
 
class  ContentEntityStore
 
class  Instrument
 
class  InstrumentAudio
 
class  InstrumentConfig
 
class  InstrumentMeme
 
class  Library
 
class  Program
 
class  ProgramConfig
 
class  ProgramMeme
 
class  ProgramSequence
 
class  ProgramSequenceBinding
 
class  ProgramSequenceBindingMeme
 
class  ProgramSequenceChord
 
class  ProgramSequenceChordVoicing
 
class  ProgramSequencePattern
 
class  ProgramSequencePatternEvent
 
class  ProgramVoice
 
class  ProgramVoiceTrack
 
class  Project
 
class  Template
 
class  TemplateBinding
 
class  TemplateConfig
 
class  BackgroundCraft
 
class  BeatCraft
 
class  Craft
 
class  DetailCraft
 
class  MacroMainCraft
 
class  TransitionCraft
 
class  Engine
 
class  ChainUtils
 
class  FabricationException
 
class  FabricationFatalException
 
class  FabricationWrapper
 
class  Fabricator
 
class  MarbleBag
 
class  NotePicker
 
class  RankedNote
 
class  SegmentRetrospective
 
class  SegmentUtils
 
class  TemplateUtils
 
class  MemeConstellation
 
class  MemeIsometry
 
class  MemeStack
 
class  MemeCategory
 
class  MemeTaxonomy
 
class  ParseAnti
 
class  ParseNumeric
 
class  ParseStrong
 
class  ParseUnique
 
class  Bar
 
class  BPM
 
class  ChordSynonym
 
class  ChordForm
 
class  Chord
 
class  Note
 
class  NoteRange
 
class  Root
 
class  SlashRoot
 
class  Step
 
class  StickyBun
 
class  Tuning
 
class  Chain
 
class  Segment
 
class  SegmentChoice
 
class  SegmentChoiceArrangement
 
class  SegmentChoiceArrangementPick
 
class  SegmentChord
 
class  SegmentChordVoicing
 
class  SegmentEntity
 
class  SegmentEntityStore
 
class  SegmentMeme
 
class  SegmentMessage
 
class  SegmentMeta
 
class  ConfigValue
 
class  ConfigSingleValue
 
class  ConfigObjectValue
 
class  ConfigListValue
 
class  ConfigException
 
class  ConfigParser
 
class  CsvUtils
 
class  EntityUtils
 
class  StringUtils
 
class  ValueUtils
 
class  CraftWork
 
class  DubWork
 
class  WorkManager
 
class  WorkSettings
 

Typedefs

using MapStringToOneOrManyString = std::map< std::string, std::variant< std::string, std::set< std::string > >>
 
using UUID = std::string
 

Enumerations

enum  Accidental { Natural , Sharp , Flat }
 
enum  PitchClass {
  Atonal , C , Cs , D ,
  Ds , E , F , Fs ,
  G , Gs , A , As ,
  B
}
 
enum  WorkState {
  Standby , Active , Done , Cancelled ,
  Failed
}
 

Functions

void from_json (const json &json, Instrument &entity)
 
void from_json (const json &json, InstrumentAudio &entity)
 
void from_json (const json &json, InstrumentMeme &entity)
 
void from_json (const json &json, Library &entity)
 
void from_json (const json &json, Program &entity)
 
void from_json (const json &json, ProgramMeme &entity)
 
void from_json (const json &json, ProgramSequence &entity)
 
void from_json (const json &json, ProgramSequenceBinding &entity)
 
void from_json (const json &json, ProgramSequenceBindingMeme &entity)
 
void from_json (const json &json, ProgramSequenceChord &entity)
 
void from_json (const json &json, ProgramSequenceChordVoicing &entity)
 
void from_json (const json &json, ProgramSequencePattern &entity)
 
void from_json (const json &json, ProgramSequencePatternEvent &entity)
 
void from_json (const json &json, ProgramVoice &entity)
 
void from_json (const json &json, ProgramVoiceTrack &entity)
 
void from_json (const json &json, Project &entity)
 
void from_json (const json &json, Template &entity)
 
void from_json (const json &json, TemplateBinding &entity)
 
Accidental accidentalOf (const std::string &name)
 
Accidental accidentalOfBeginning (const std::string &name)
 
int octaveOf (const std::string &text)
 
PitchClass pitchClassOf (const std::string &name)
 
std::string stringOf (PitchClass from, Accidental with)
 
void from_json (const json &json, ContentEntityStore &store)
 

Detailed Description

Utilities for working with segments

Typedef Documentation

◆ MapStringToOneOrManyString

using XJ::MapStringToOneOrManyString = typedef std::map<std::string, std::variant<std::string, std::set<std::string> >>

◆ UUID

using XJ::UUID = typedef std::string

XJ legacy application used UUIDs because networked data was a possibility. But since the domain of this application is now entirely local, we do not require globally-unique randomness. Instead, we use a simple counter, which provides guaranteed locally unique identifiers

In the future, all entity IDs should be simple integers– but that's a massive refactoring job See: https://github.com/xjmusic/xjmusic/issues/400

Returns
locally unique identifier

Enumeration Type Documentation

◆ Accidental

Expression of the "accidental notes" as either Sharps or Flats Note has an adjustment symbol (Sharp or Flat) to render the "accidental notes for a given name (e.g. of a chord, scale or key)

Enumerator
Natural 
Sharp 
Flat 

◆ PitchClass

PitchClass of pitch for a note (across all octaves) In music, a pitch class is a set of all pitches that are a whole number of octaves apart, e.g., the pitch class C consists of the Cs in all octaves.

Enumerator
Atonal 
Cs 
Ds 
Fs 
Gs 
As 

◆ WorkState

Enumerator
Standby 
Active 
Done 
Cancelled 
Failed 

Function Documentation

◆ accidentalOf()

Accidental XJ::accidentalOf ( const std::string &  name)

Accidental the adjustment symbol (Sharp or Flat) for a given name (e.g. of a chord, scale or key)

Parameters
nameto get adjustment symbol of
Returns
adjustment symbol

◆ accidentalOfBeginning()

Accidental XJ::accidentalOfBeginning ( const std::string &  name)

the Accidental (Sharp or Flat) that begins a given name (e.g. the Root of a chord, scale or key)

Parameters
nameto get adjustment symbol from the beginning of
Returns
adjustment symbol

◆ from_json() [1/19]

void XJ::from_json ( const json json,
ContentEntityStore store 
)

Parse a ContentEntityStore from a JSON object

Parameters
jsoninput
storeoutput

◆ from_json() [2/19]

void XJ::from_json ( const json json,
Instrument entity 
)
inline

Parse a Instrument from a JSON object

Parameters
jsoninput
entityoutput

◆ from_json() [3/19]

void XJ::from_json ( const json json,
InstrumentAudio entity 
)
inline

Parse a InstrumentAudio from a JSON object

Parameters
jsoninput
entityoutput

◆ from_json() [4/19]

void XJ::from_json ( const json json,
InstrumentMeme entity 
)
inline

Parse a InstrumentMeme from a JSON object

Parameters
jsoninput
entityoutput

◆ from_json() [5/19]

void XJ::from_json ( const json json,
Library entity 
)
inline

Parse a Library from a JSON object

Parameters
jsoninput
entityoutput

◆ from_json() [6/19]

void XJ::from_json ( const json json,
Program entity 
)
inline

Parse a Program from a JSON object

Parameters
jsoninput
entityoutput

◆ from_json() [7/19]

void XJ::from_json ( const json json,
ProgramMeme entity 
)
inline

Parse a ProgramMeme from a JSON object

Parameters
jsoninput
entityoutput

◆ from_json() [8/19]

void XJ::from_json ( const json json,
ProgramSequence entity 
)
inline

Parse a ProgramSequence from a JSON object

Parameters
jsoninput
entityoutput

◆ from_json() [9/19]

void XJ::from_json ( const json json,
ProgramSequenceBinding entity 
)
inline

Parse a ProgramSequenceBinding from a JSON object

Parameters
jsoninput
entityoutput

◆ from_json() [10/19]

void XJ::from_json ( const json json,
ProgramSequenceBindingMeme entity 
)
inline

Parse a ProgramSequenceBindingMeme from a JSON object

Parameters
jsoninput
entityoutput

◆ from_json() [11/19]

void XJ::from_json ( const json json,
ProgramSequenceChord entity 
)
inline

Parse a ProgramSequenceChord from a JSON object

Parameters
jsoninput
entityoutput

◆ from_json() [12/19]

void XJ::from_json ( const json json,
ProgramSequenceChordVoicing entity 
)
inline

Parse a ProgramSequenceChordVoicing from a JSON object

Parameters
jsoninput
entityoutput

◆ from_json() [13/19]

void XJ::from_json ( const json json,
ProgramSequencePattern entity 
)
inline

Parse a ProgramSequencePattern from a JSON object

Parameters
jsoninput
entityoutput

◆ from_json() [14/19]

void XJ::from_json ( const json json,
ProgramSequencePatternEvent entity 
)
inline

Parse a ProgramSequencePatternEvent from a JSON object

Parameters
jsoninput
entityoutput

◆ from_json() [15/19]

void XJ::from_json ( const json json,
ProgramVoice entity 
)
inline

Parse a ProgramVoice from a JSON object

Parameters
jsoninput
entityoutput

◆ from_json() [16/19]

void XJ::from_json ( const json json,
ProgramVoiceTrack entity 
)
inline

Parse a ProgramVoiceTrack from a JSON object

Parameters
jsoninput
entityoutput

◆ from_json() [17/19]

void XJ::from_json ( const json json,
Project entity 
)
inline

Parse a Project from a JSON object

Parameters
jsoninput
entityoutput

◆ from_json() [18/19]

void XJ::from_json ( const json json,
Template entity 
)
inline

Parse a Template from a JSON object

Parameters
jsoninput
entityoutput

◆ from_json() [19/19]

void XJ::from_json ( const json json,
TemplateBinding entity 
)
inline

Parse a TemplateBinding from a JSON object

Parameters
jsoninput
entityoutput

◆ octaveOf()

int XJ::octaveOf ( const std::string &  text)

Octave models a musical octave

A perfect octave is the interval between one musical pitch and another with half or double its frequency.

Parameters
textnote
Returns
octave

◆ pitchClassOf()

PitchClass XJ::pitchClassOf ( const std::string &  name)

Pitch Class based on the first character of the text

Parameters
textto get pitch class from
Returns
pitch class

◆ stringOf()

std::string XJ::stringOf ( PitchClass  from,
Accidental  with 
)

std::string of Pitch class, with adjustment symbol

Parameters
frompitch class
withadjustment symbol
Returns
string of pitch class