XJ music engine
1.9.6
In-game runtime engine for XJ music.
|
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 } |
Utilities for working with segments
using XJ::MapStringToOneOrManyString = typedef std::map<std::string, std::variant<std::string, std::set<std::string> >> |
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
enum XJ::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 |
enum XJ::PitchClass |
enum XJ::WorkState |
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)
name | to get adjustment symbol of |
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)
name | to get adjustment symbol from the beginning of |
void XJ::from_json | ( | const json & | json, |
ContentEntityStore & | store | ||
) |
Parse a ContentEntityStore from a JSON object
json | input |
store | output |
|
inline |
Parse a Instrument from a JSON object
json | input |
entity | output |
|
inline |
Parse a InstrumentAudio from a JSON object
json | input |
entity | output |
|
inline |
Parse a InstrumentMeme from a JSON object
json | input |
entity | output |
Parse a Library from a JSON object
json | input |
entity | output |
Parse a Program from a JSON object
json | input |
entity | output |
|
inline |
Parse a ProgramMeme from a JSON object
json | input |
entity | output |
|
inline |
Parse a ProgramSequence from a JSON object
json | input |
entity | output |
|
inline |
Parse a ProgramSequenceBinding from a JSON object
json | input |
entity | output |
|
inline |
Parse a ProgramSequenceBindingMeme from a JSON object
json | input |
entity | output |
|
inline |
Parse a ProgramSequenceChord from a JSON object
json | input |
entity | output |
|
inline |
Parse a ProgramSequenceChordVoicing from a JSON object
json | input |
entity | output |
|
inline |
Parse a ProgramSequencePattern from a JSON object
json | input |
entity | output |
|
inline |
Parse a ProgramSequencePatternEvent from a JSON object
json | input |
entity | output |
|
inline |
Parse a ProgramVoice from a JSON object
json | input |
entity | output |
|
inline |
Parse a ProgramVoiceTrack from a JSON object
json | input |
entity | output |
Parse a Project from a JSON object
json | input |
entity | output |
Parse a Template from a JSON object
json | input |
entity | output |
|
inline |
Parse a TemplateBinding from a JSON object
json | input |
entity | output |
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.
text | note |
PitchClass XJ::pitchClassOf | ( | const std::string & | name | ) |
Pitch Class based on the first character of the text
text | to get pitch class from |
std::string XJ::stringOf | ( | PitchClass | from, |
Accidental | with | ||
) |
std::string of Pitch class, with adjustment symbol
from | pitch class |
with | adjustment symbol |