Torch
Loading...
Searching...
No Matches
InstrumentFactory.h
1#pragma once
2
3#include <factories/BaseFactory.h>
4#include "AudioContext.h"
5
6class InstrumentData : public IParsedData {
7public:
8 uint8_t isRelocated;
9 uint8_t normalRangeLo;
10 uint8_t normalRangeHi;
11 uint8_t adsrDecayIndex;
12 uint32_t envelope;
13 TunedSample lowPitchTunedSample;
14 TunedSample normalPitchTunedSample;
15 TunedSample highPitchTunedSample;
16};
17
19 ExportResult Export(std::ostream& write, std::shared_ptr<IParsedData> data, std::string& entryName, YAML::Node& node, std::string* replacement) override;
20};
21
23 ExportResult Export(std::ostream& write, std::shared_ptr<IParsedData> data, std::string& entryName, YAML::Node& node, std::string* replacement) override;
24};
25
27 ExportResult Export(std::ostream& write, std::shared_ptr<IParsedData> data, std::string& entryName, YAML::Node& node, std::string* replacement) override;
28};
29
31public:
32 std::optional<std::shared_ptr<IParsedData>> parse(std::vector<uint8_t>& buffer, YAML::Node& data) override;
33 inline std::unordered_map<ExportType, std::shared_ptr<BaseExporter>> GetExporters() override {
34 return {
35 REGISTER(Header, InstrumentHeaderExporter)
36 REGISTER(Binary, InstrumentBinaryExporter)
37 REGISTER(Code, InstrumentCodeExporter)
38 };
39 }
40
41 bool HasModdedDependencies() override { return true; }
42};
Definition BaseFactory.h:88
Definition BaseFactory.h:94
Definition BaseFactory.h:80
Definition InstrumentFactory.h:22
Definition InstrumentFactory.h:26
Definition InstrumentFactory.h:6
Definition InstrumentFactory.h:30
Definition InstrumentFactory.h:18
Definition AudioContext.h:7