2#include <Midi/Commands/CommandFactory.hpp>
4#include <score/command/Command.hpp>
5#include <score/command/PropertyCommand.hpp>
6#include <score/model/path/PathSerialization.hpp>
8#include <Patternist/PatternModel.hpp>
11inline auto& CommandFactoryName()
13 return Midi::CommandFactoryName();
17 SCORE_COMMAND_DECL(Midi::CommandFactoryName(),
UpdatePattern,
"Update a pattern")
22 , m_old{model.patterns()[p]}
29 m_model.find(ctx).setPattern(m_id, m_old);
34 m_model.find(ctx).setPattern(m_id, m_new);
42 s << m_model << m_id << m_old << m_new;
47 s >> m_model >> m_id >> m_old >> m_new;
59 Patternist, SetPatternChannel, ProcessModel::p_channel,
"Change channel")
60SCORE_COMMAND_DECL_T(Patternist::SetPatternChannel)
62 Patternist, SetCurrentPattern, ProcessModel::p_currentPattern, "Change pattern")
63SCORE_COMMAND_DECL_T(Patternist::SetCurrentPattern)
The Path class is a typesafe wrapper around ObjectPath.
Definition Path.hpp:52
Definition PatternModel.hpp:48
Definition PatternProperties.hpp:16
The Command class.
Definition Command.hpp:34
Definition DataStreamHelpers.hpp:103
Definition PatternModel.hpp:36
Definition DocumentContext.hpp:18