Finale PDK Framework 0.77
Power Up Your Finale Music Software
Loading...
Searching...
No Matches
ff_playback.h
1//
2// ff_playback.h
3// RGPLua
4//
5// Created by Robert Patterson on 8/21/23.
6//
7
8#ifndef ff_playback_h
9#define ff_playback_h
10
11#include "ff_base.h"
12#include "ff_ui.h"
13
28{
29 // EMIDIEVENT is not actually an event, because it does not include the time code.
30 // It seems only to be used with FX_ListenToMidi, at least in the PDK.
31 EMIDIEVENT _midi;
32
34
35public:
36 const char* ClassName() const override { return "FCListenToMidiResult"; }
37
43
50 eMidiChannel GetMidiChannel() const { return _midi.channel; }
51
58 void SetMidiChannel(eMidiChannel value) { _midi.channel = value; }
59
66 int GetStatus() const { return _midi.status; }
67
74 void SetStatus(int value) { _midi.status = static_cast<uonebyte>(value); }
75
80 int GetData1() const { return _midi.data[0]; }
81
86 void SetData1(int value) { _midi.data[0] = static_cast<uonebyte>(value); }
87
92 int GetData2() const { return _midi.data[1]; }
93
98 void SetData2(int value) { _midi.data[1] = static_cast<uonebyte>(value); }
99};
100
115{
116 friend class FCPlaybackPrefs;
117
118 EDTHyperClick* _pData;
119 bool _forMidiNote;
120
122 FCHyperClick(EDTHyperClick* pData, bool forMidiNote) : __FCBase(), _pData(pData), _forMidiNote(forMidiNote)
123 {}
124
125public:
126 const char* ClassName() const override { return "FCHyperClick"; }
127
134 int GetVirtualChannel() const { return _pData->virtChannel; }
135
142 void SetVirtualChannel(int value) { _pData->virtChannel = static_cast<eVirtChannel>(value); }
143
149 int GetDuration() const { return _pData->duration; }
150
156 void SetDuration(int value) { _pData->duration = static_cast<TimeRtu16>(value); }
157
164 int GetMidiStatus() const { return _pData->clickOn.status; }
165
174 void SetMidiStatus(int value)
175 {
176 _pData->clickOn.status = static_cast<MIDIBYTE>(value);
177 // Finale seems always to leave clickOff.status == 0x80 (note off)
178 _pData->clickOff.status = 0x80;
179 }
180
187 int GetMidiData1() const { return _pData->clickOn.data0; }
188
195 void SetMidiData1(int value)
196 {
197 _pData->clickOn.data0 = static_cast<MIDIBYTE>(value);
198 _pData->clickOff.data0 = static_cast<MIDIBYTE>(value);
199 }
200
207 int GetMidiData2() const { return _pData->clickOn.data1; }
208
215 void SetMidiData2(int value)
216 {
217 _pData->clickOn.data1 = static_cast<MIDIBYTE>(value);
218 _pData->clickOff.data1 = (_forMidiNote) ? 0 : static_cast<MIDIBYTE>(value);
219 }
220};
221
222#endif /* ff_playback_h */
Base class for the Finale Framework classes.
Definition ff_base.h:71
__FCBase()
The constructor.
Definition ff_base.h:278
Class for Hyperscript click data. It corresponds to the data fields associated with the Metronome Sou...
Definition ff_playback.h:115
int GetMidiData2() const
Returns the data 2 (counting from 1) byte value of the Click On MIDI message.
Definition ff_playback.h:207
void SetMidiStatus(int value)
Sets the status byte value of the MIDI message.
Definition ff_playback.h:174
int GetMidiStatus() const
Returns the status byte value of the Click On MIDI message.
Definition ff_playback.h:164
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_playback.h:126
void SetMidiData1(int value)
Sets the data 1 (counting from 1) byte value of the Click On MIDI message.
Definition ff_playback.h:195
int GetVirtualChannel() const
Returns the Finale virtual MIDI channel.
Definition ff_playback.h:134
int GetDuration() const
Returns the hyper click duration in milliseconds. (The Finale UI shows a percentage....
Definition ff_playback.h:149
int GetMidiData1() const
Returns the data 1 (counting from 1) byte value of the Click On MIDI message.
Definition ff_playback.h:187
void SetVirtualChannel(int value)
Sets the Finale virtual MIDI channel.
Definition ff_playback.h:142
void SetDuration(int value)
Sets the hyper click duration in milliseconds. (The Finale UI shows a percentage. This is the percent...
Definition ff_playback.h:156
void SetMidiData2(int value)
Sets the data 2 (counting from 1) byte value of the Click On MIDI message.
Definition ff_playback.h:215
Class to return the results of the ListenToMidi dialog box.
Definition ff_playback.h:28
void SetMidiChannel(eMidiChannel value)
Sets the midi channel.
Definition ff_playback.h:58
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_playback.h:36
eMidiChannel GetMidiChannel() const
Returns the midi channel.
Definition ff_playback.h:50
void SetStatus(int value)
Sets the MIDI message status code.
Definition ff_playback.h:74
void SetData1(int value)
Sets data byte 1 (counting from 1).
Definition ff_playback.h:86
int GetData1() const
Returns data byte 1 (counting from 1).
Definition ff_playback.h:80
FCListenToMidiResult()=default
The constructor.
int GetData2() const
Returns data byte 2 (counting from 1).
Definition ff_playback.h:92
int GetStatus() const
Returns the MIDI message status code.
Definition ff_playback.h:66
void SetData2(int value)
Sets data byte 2 (counting from 1).
Definition ff_playback.h:98
Class for the document's playback preferences values.
Definition ff_prefs.h:869
bool DisplayListenToMidiDialog(FCListenToMidiResult *result)
Displays the ListenToMidi dialog.
Definition finaleframework.cpp:24117