comparison data/model/NoteModel.h @ 1751:77543124651b by-id

Overhaul PlayParameters bits
author Chris Cannam
date Thu, 04 Jul 2019 18:04:21 +0100
parents 52705a328b34
children 6d09d68165a4
comparison
equal deleted inserted replaced
1750:d0ef65d8dd89 1751:77543124651b
64 m_completion(100) { 64 m_completion(100) {
65 if (subtype == FLEXI_NOTE) { 65 if (subtype == FLEXI_NOTE) {
66 m_valueMinimum = 33.f; 66 m_valueMinimum = 33.f;
67 m_valueMaximum = 88.f; 67 m_valueMaximum = 88.f;
68 } 68 }
69 PlayParameterRepository::getInstance()->addPlayable(getId().untyped); 69 PlayParameterRepository::getInstance()->addPlayable
70 (getId().untyped, this);
70 } 71 }
71 72
72 NoteModel(sv_samplerate_t sampleRate, int resolution, 73 NoteModel(sv_samplerate_t sampleRate, int resolution,
73 float valueMinimum, float valueMaximum, 74 float valueMinimum, float valueMaximum,
74 bool notifyOnAdd = true, 75 bool notifyOnAdd = true,
85 m_notifier(this, 86 m_notifier(this,
86 notifyOnAdd ? 87 notifyOnAdd ?
87 DeferredNotifier::NOTIFY_ALWAYS : 88 DeferredNotifier::NOTIFY_ALWAYS :
88 DeferredNotifier::NOTIFY_DEFERRED), 89 DeferredNotifier::NOTIFY_DEFERRED),
89 m_completion(100) { 90 m_completion(100) {
90 PlayParameterRepository::getInstance()->addPlayable(getId().untyped); 91 PlayParameterRepository::getInstance()->addPlayable
92 (getId().untyped, this);
91 } 93 }
92 94
93 virtual ~NoteModel() { 95 virtual ~NoteModel() {
94 PlayParameterRepository::getInstance()->removePlayable(getId().untyped); 96 PlayParameterRepository::getInstance()->removePlayable
97 (getId().untyped);
95 } 98 }
96 99
97 QString getTypeName() const override { return tr("Note"); } 100 QString getTypeName() const override { return tr("Note"); }
98 Subtype getSubtype() const { return m_subtype; } 101 Subtype getSubtype() const { return m_subtype; }
99 bool isSparse() const override { return true; } 102 bool isSparse() const override { return true; }