2024-11-07 00:56:33 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "datatypes.h"
|
|
|
|
|
#include "node.h"
|
2024-12-07 15:28:33 +01:00
|
|
|
#include <memory>
|
2024-11-07 00:56:33 +01:00
|
|
|
|
|
|
|
|
namespace VISEQ::GRAPH::NODES {
|
|
|
|
|
|
|
|
|
|
class ConfigNode : public Node{
|
|
|
|
|
|
|
|
|
|
public:
|
2024-12-08 14:21:46 +01:00
|
|
|
ConfigNode() {std::cout << "ConfigNode Constructor std" << std::endl;}
|
2024-12-07 03:44:03 +01:00
|
|
|
ConfigNode(Vec2Df position) : Node(position) {}
|
|
|
|
|
|
2026-01-06 02:44:18 +01:00
|
|
|
std::shared_ptr<ConfigNode> getPtr();
|
2024-12-07 03:44:03 +01:00
|
|
|
|
2024-11-07 00:56:33 +01:00
|
|
|
NodeType nodeType = NodeType::CONFIGNODE;
|
|
|
|
|
|
|
|
|
|
MIDI::MidiNote midiNote;
|
2024-11-08 01:43:06 +01:00
|
|
|
MIDI::MidiCC midiCC;
|
|
|
|
|
MIDI::MidiPitchBend midiPitchBend;
|
|
|
|
|
MIDI::MidiPolyPressure midiPolyPressure;
|
|
|
|
|
MIDI::MidiPC midiPC;
|
2024-12-07 22:09:06 +01:00
|
|
|
MIDI::MidiAftertouch midiAftertouch;
|
2024-11-07 00:56:33 +01:00
|
|
|
|
2024-11-08 01:43:06 +01:00
|
|
|
int mode = 0;
|
2024-12-07 03:44:03 +01:00
|
|
|
float radius = 20.0f;
|
2024-11-07 00:56:33 +01:00
|
|
|
|
2026-01-06 02:44:18 +01:00
|
|
|
virtual NodeType getNodeType() const override;
|
2024-12-08 14:21:46 +01:00
|
|
|
|
2026-01-06 02:44:18 +01:00
|
|
|
virtual void trigger() override;
|
|
|
|
|
|
|
|
|
|
virtual void setMode(int _mode) override;
|
|
|
|
|
|
|
|
|
|
MIDI::MidiNote getNotes() const;
|
|
|
|
|
MIDI::MidiCC getCC() const;
|
|
|
|
|
MIDI::MidiPC getPC() const;
|
|
|
|
|
MIDI::MidiPitchBend getPitchBend() const;
|
|
|
|
|
MIDI::MidiAftertouch getAftertouch() const;
|
|
|
|
|
MIDI::MidiPolyPressure getPolyPressure() const;
|
|
|
|
|
std::vector<std::weak_ptr<ConfigNode>> getConnectedConfigNodes() const;
|
|
|
|
|
void update() override;
|
|
|
|
|
void interact();
|
|
|
|
|
void draw(Vec2Df mouse, Camera2D cam) override;
|
|
|
|
|
friend void to_json(json& j, const ConfigNode& N);
|
|
|
|
|
friend void from_json(const json& j, ConfigNode& N);
|
2024-11-07 00:56:33 +01:00
|
|
|
};
|
|
|
|
|
}
|