3 #ifndef XJMUSIC_INSTRUMENT_H
4 #define XJMUSIC_INSTRUMENT_H
99 static const std::vector<std::string> &
toStrings(std::vector<Type> types);
117 if (
json.contains(
"config") &&
json.at(
"config").is_string()) {
118 const auto configStr =
json.at(
"config").get<std::string>();
nlohmann::json json
Definition: EntityUtils.h:14
Definition: ContentEntity.h:12
UUID id
Definition: ContentEntity.h:17
static long long currentTimeMillis()
Definition: EntityUtils.h:62
static void setIfNotNull(const json &json, const std::string &key, std::string &value)
Definition: EntityUtils.cpp:27
static void setRequired(const json &json, const std::string &key, UUID &value)
Definition: EntityUtils.cpp:16
Definition: InstrumentConfig.h:14
Definition: Instrument.h:14
Mode
Definition: Instrument.h:29
@ Loop
Definition: Instrument.h:32
@ Event
Definition: Instrument.h:31
@ Chord
Definition: Instrument.h:30
UUID libraryId
Definition: Instrument.h:42
long long updatedAt
Definition: Instrument.h:50
static State parseState(const std::string &value)
Definition: Instrument.cpp:57
static Mode parseMode(const std::string &value)
Definition: Instrument.cpp:49
State
Definition: Instrument.h:35
@ Draft
Definition: Instrument.h:36
@ Published
Definition: Instrument.h:37
static const std::vector< std::string > & toStrings(std::vector< Type > types)
Definition: Instrument.cpp:79
bool isDeleted
Definition: Instrument.h:49
Mode mode
Definition: Instrument.h:45
Type type
Definition: Instrument.h:44
State state
Definition: Instrument.h:43
static Type parseType(const std::string &value)
Definition: Instrument.cpp:41
static std::string toString(const Type &type)
Definition: Instrument.cpp:65
float volume
Definition: Instrument.h:48
Type
Definition: Instrument.h:16
@ Pad
Definition: Instrument.h:21
@ Sticky
Definition: Instrument.h:24
@ Transition
Definition: Instrument.h:26
@ Bass
Definition: Instrument.h:18
@ Stripe
Definition: Instrument.h:25
@ Stab
Definition: Instrument.h:23
@ Drum
Definition: Instrument.h:19
@ Percussion
Definition: Instrument.h:22
@ Hook
Definition: Instrument.h:20
@ Background
Definition: Instrument.h:17
std::string name
Definition: Instrument.h:46
InstrumentConfig config
Definition: Instrument.h:47
Definition: ActiveAudio.h:11
std::string UUID
Definition: EntityUtils.h:28
void from_json(const json &json, Instrument &entity)
Definition: Instrument.h:106