reaper-osc 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/Tracks.js CHANGED
@@ -1,294 +1,294 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.RecordMonitoringMode = exports.Track = void 0;
10
- /** Contains classes for controlling tracks in Reaper
11
- * @module
12
- */
13
- const Fx_1 = require("./Fx");
14
- const Notify_1 = require("./Notify");
15
- const Handlers_1 = require("./Handlers");
16
- const Messages_1 = require("./Messages");
17
- /** A Reaper track */
18
- let Track = class Track {
19
- /**
20
- * @param trackNumber The track's number in the current bank
21
- * @param numberOfFx The number of FX per FX bank
22
- * @param sendOscMessage A callback used to send OSC messages to Reaper
23
- */
24
- constructor(trackNumber, numberOfFx, sendOscMessage) {
25
- this.trackNumber = trackNumber;
26
- this._isMuted = false;
27
- this._isRecordArmed = false;
28
- this._isSelected = false;
29
- this._isSoloed = false;
30
- this._name = 'Fx' + this.trackNumber;
31
- this._pan = 0;
32
- this._pan2 = 0;
33
- // TODO: Find out what the modes are - should this be an enum value?
34
- this._panMode = '';
35
- this._recordMonitoring = RecordMonitoringMode.OFF;
36
- this._volumeDb = 0;
37
- this._volumeFaderPosition = 0;
38
- this._vu = 0;
39
- this._vuLeft = 0;
40
- this._vuRight = 0;
41
- this._fx = [];
42
- this._handlers = [];
43
- this._sendOscMessage = sendOscMessage;
44
- for (let i = 0; i < numberOfFx; i++) {
45
- this._fx[i] = new Fx_1.TrackFx(trackNumber, i + 1, sendOscMessage);
46
- }
47
- this.initHandlers();
48
- }
49
- /** Deselect the track */
50
- deselect() {
51
- this._sendOscMessage(new Messages_1.BooleanMessage(this.oscAddress + '/select', false));
52
- }
53
- /** The track's current FX back */
54
- get fx() {
55
- return this._fx;
56
- }
57
- /** Indicates whether the track is muted */
58
- get isMuted() {
59
- return this._isMuted;
60
- }
61
- /** Indicates whether the track is armed for recording */
62
- get isRecordArmed() {
63
- return this._isRecordArmed;
64
- }
65
- /** Indicates whether the track is selected*/
66
- get isSelected() {
67
- return this._isSelected;
68
- }
69
- /** Indicates whether the track is soloed */
70
- get isSoloed() {
71
- return this._isSoloed;
72
- }
73
- /** Mute the track */
74
- mute() {
75
- this._sendOscMessage(new Messages_1.BooleanMessage(this.oscAddress + '/mute', true));
76
- }
77
- /** The track name */
78
- get name() {
79
- return this._name;
80
- }
81
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
82
- onPropertyChanged(property, callback) {
83
- throw new Error('not implemented');
84
- }
85
- /** A floating-point value between -1 and 1 that indicates the pan position, with -1 being 100% left and 1 being 100% right */
86
- get pan() {
87
- return this._pan;
88
- }
89
- /** A floating-point value between -1 and 1 that indicates the pan 2 position, with -1 being 100% left and 1 being 100% right */
90
- get pan2() {
91
- return this._pan2;
92
- }
93
- /** The current pan mode */
94
- get panMode() {
95
- return this._panMode;
96
- }
97
- /**
98
- * Receive and handle an OSC message
99
- * @param message The message to be handled
100
- */
101
- receive(message) {
102
- for (const handler of this._handlers) {
103
- if (handler.handle(message)) {
104
- return true;
105
- }
106
- }
107
- return false;
108
- }
109
- /** Arm the track for recording */
110
- recordArm() {
111
- this._sendOscMessage(new Messages_1.BooleanMessage(this.oscAddress + '/recarm', true));
112
- }
113
- /** Indicates the record monitoring mode */
114
- get recordMonitoring() {
115
- return this._recordMonitoring;
116
- }
117
- /** Disarm track recording */
118
- recordDisarm() {
119
- this._sendOscMessage(new Messages_1.BooleanMessage(this.oscAddress + '/recarm', false));
120
- }
121
- /**
122
- * Renames the track
123
- * @param name The new name of the track
124
- * @example
125
- * ```typescript
126
- * // Change the track name to 'Guitar'
127
- * track.rename('Guitar');
128
- * ```
129
- */
130
- rename(name) {
131
- this._sendOscMessage(new Messages_1.StringMessage(this.oscAddress + '/name', name));
132
- // Haven't figured out why yet (possibly to do with track selection?)
133
- // but Reaper doesn't send an OSC message even though it does if you
134
- // change the name in Reaper
135
- this._name = name;
136
- }
137
- /** Select the track */
138
- select() {
139
- this._sendOscMessage(new Messages_1.BooleanMessage(this.oscAddress + '/select', true));
140
- }
141
- /**
142
- * Set the record monitoring mode
143
- * @param {RecordMonitorMode} value
144
- * */
145
- setMonitoringMode(value) {
146
- this._sendOscMessage(new Messages_1.IntegerMessage(this.oscAddress + '/monitor', value));
147
- }
148
- /**
149
- * Sets the pan
150
- * @param value A floating-point value between -1 and 1, where -1 is 100% left and 1 is 100% right
151
- */
152
- setPan(value) {
153
- if (value < -1 || value > 1) {
154
- throw new RangeError('Must be between -1 and 1');
155
- }
156
- this._sendOscMessage(new Messages_1.FloatMessage(this.oscAddress + '/pan', value));
157
- }
158
- /**
159
- * Sets the pan 2
160
- * @param value A floating-point value between -1 and 1, where -1 is 100% left and 1 is 100% right
161
- */
162
- setPan2(value) {
163
- if (value < -1 || value > 1) {
164
- throw new RangeError('Must be between -1 and 1');
165
- }
166
- this._sendOscMessage(new Messages_1.FloatMessage(this.oscAddress + '/pan2', value));
167
- }
168
- /**
169
- * Sets the volume to a specific dB value.
170
- * @param value Value (in dB) to set the volume to. Valid range is -100 to 12.
171
- */
172
- setVolumeDb(value) {
173
- if (value < -100 || value > 12) {
174
- throw new RangeError('Must be between -100 and 12');
175
- }
176
- this._sendOscMessage(new Messages_1.FloatMessage(this.oscAddress + '/volume/db', value));
177
- }
178
- /** Sets the volume by moving the fader to a specific position
179
- * @param position A value for the fader position between 0 and 1, where 0 is all the way down and 1 is all the way up
180
- */
181
- setVolumeFaderPosition(position) {
182
- if (position < 0 || position > 1) {
183
- throw new RangeError('Must be between 0 and 1');
184
- }
185
- this._sendOscMessage(new Messages_1.FloatMessage(this.oscAddress + '/volume', position));
186
- }
187
- /** Solo the track */
188
- solo() {
189
- this._sendOscMessage(new Messages_1.BooleanMessage(this.oscAddress + '/solo', true));
190
- }
191
- /** Toggle mute on/off */
192
- toggleMute() {
193
- this._sendOscMessage(new Messages_1.ToggleMessage(this.oscAddress + '/mute'));
194
- }
195
- /** Toggle record arm on/off */
196
- toggleRecordArm() {
197
- this._sendOscMessage(new Messages_1.ToggleMessage(this.oscAddress + '/recarm'));
198
- }
199
- /** Toggle solo on/off */
200
- toggleSolo() {
201
- this._sendOscMessage(new Messages_1.ToggleMessage(this.oscAddress + '/solo'));
202
- }
203
- /** Unmute the track */
204
- unmute() {
205
- this._sendOscMessage(new Messages_1.BooleanMessage(this.oscAddress + '/mute', false));
206
- }
207
- /** Unsolo the track */
208
- unsolo() {
209
- this._sendOscMessage(new Messages_1.BooleanMessage(this.oscAddress + '/solo', false));
210
- }
211
- /** The track volume in dB */
212
- get volumeDb() {
213
- return this._volumeDb;
214
- }
215
- /** A floating-point value between 0 and 1 that indicates the fader position, with 0 being all the way down and 1 being all the way up */
216
- get volumeFaderPosition() {
217
- return this._volumeFaderPosition;
218
- }
219
- /** A floating-point value between 0 and 1 that indicates the VU level */
220
- get vu() {
221
- return this._vu;
222
- }
223
- /** A floating-point value between 0 and 1 that indicates the Left VU level */
224
- get vuLeft() {
225
- return this._vuLeft;
226
- }
227
- /** A floating-point value between 0 and 1 that indicates the Right VU level */
228
- get vuRight() {
229
- return this._vuRight;
230
- }
231
- initHandlers() {
232
- this._handlers.push(new Handlers_1.StringMessageHandler(this.oscAddress + '/name', value => (this._name = value)), new Handlers_1.BooleanMessageHandler(this.oscAddress + '/mute', value => (this._isMuted = value)), new Handlers_1.BooleanMessageHandler(this.oscAddress + '/solo', value => (this._isSoloed = value)), new Handlers_1.BooleanMessageHandler(this.oscAddress + '/recarm', value => (this._isRecordArmed = value)), new Handlers_1.IntegerMessageHandler(this.oscAddress + '/monitor', value => (this._recordMonitoring = value)), new Handlers_1.BooleanMessageHandler(this.oscAddress + '/select', value => (this._isSelected = value)), new Handlers_1.TrackFxMessageHandler(fxNumber => (this._fx[fxNumber - 1] !== undefined ? this._fx[fxNumber - 1] : null)), new Handlers_1.FloatMessageHandler(this.oscAddress + '/pan', value => (this._pan = value)), new Handlers_1.FloatMessageHandler(this.oscAddress + '/pan2', value => (this._pan2 = value)), new Handlers_1.StringMessageHandler(this.oscAddress + '/panmode', value => (this._panMode = value)), new Handlers_1.FloatMessageHandler(this.oscAddress + '/volume', value => (this._volumeFaderPosition = value)), new Handlers_1.FloatMessageHandler(this.oscAddress + '/volume/db', value => (this._volumeDb = value)), new Handlers_1.FloatMessageHandler(this.oscAddress + '/vu', value => (this._vu = value)), new Handlers_1.FloatMessageHandler(this.oscAddress + '/vu/L', value => (this._vuLeft = value)), new Handlers_1.FloatMessageHandler(this.oscAddress + '/vu/R', value => (this._vuRight = value)));
233
- }
234
- /** The OSC address of the track */
235
- get oscAddress() {
236
- return `/track/${this.trackNumber}`;
237
- }
238
- };
239
- __decorate([
240
- Notify_1.notify('isMuted')
241
- ], Track.prototype, "_isMuted", void 0);
242
- __decorate([
243
- Notify_1.notify('isRecordArmed')
244
- ], Track.prototype, "_isRecordArmed", void 0);
245
- __decorate([
246
- Notify_1.notify('isSelected')
247
- ], Track.prototype, "_isSelected", void 0);
248
- __decorate([
249
- Notify_1.notify('isSoloed')
250
- ], Track.prototype, "_isSoloed", void 0);
251
- __decorate([
252
- Notify_1.notify('name')
253
- ], Track.prototype, "_name", void 0);
254
- __decorate([
255
- Notify_1.notify('pan')
256
- ], Track.prototype, "_pan", void 0);
257
- __decorate([
258
- Notify_1.notify('pan2')
259
- ], Track.prototype, "_pan2", void 0);
260
- __decorate([
261
- Notify_1.notify('panMode')
262
- ], Track.prototype, "_panMode", void 0);
263
- __decorate([
264
- Notify_1.notify('recordMonitoring')
265
- ], Track.prototype, "_recordMonitoring", void 0);
266
- __decorate([
267
- Notify_1.notify('volumeDb')
268
- ], Track.prototype, "_volumeDb", void 0);
269
- __decorate([
270
- Notify_1.notify('volumeFaderPosition')
271
- ], Track.prototype, "_volumeFaderPosition", void 0);
272
- __decorate([
273
- Notify_1.notify('vu')
274
- ], Track.prototype, "_vu", void 0);
275
- __decorate([
276
- Notify_1.notify('vuLeft')
277
- ], Track.prototype, "_vuLeft", void 0);
278
- __decorate([
279
- Notify_1.notify('vuRight')
280
- ], Track.prototype, "_vuRight", void 0);
281
- Track = __decorate([
282
- Notify_1.notifyOnPropertyChanged
283
- ], Track);
284
- exports.Track = Track;
285
- var RecordMonitoringMode;
286
- (function (RecordMonitoringMode) {
287
- /** Record monitoring disabled */
288
- RecordMonitoringMode[RecordMonitoringMode["OFF"] = 0] = "OFF";
289
- /** Record monitoring enabled */
290
- RecordMonitoringMode[RecordMonitoringMode["ON"] = 1] = "ON";
291
- /** Tape auto style */
292
- RecordMonitoringMode[RecordMonitoringMode["AUTO"] = 2] = "AUTO";
293
- })(RecordMonitoringMode = exports.RecordMonitoringMode || (exports.RecordMonitoringMode = {}));
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.RecordMonitoringMode = exports.Track = void 0;
10
+ /** Contains classes for controlling tracks in Reaper
11
+ * @module
12
+ */
13
+ const Fx_1 = require("./Fx");
14
+ const Notify_1 = require("./Notify");
15
+ const Handlers_1 = require("./Handlers");
16
+ const Messages_1 = require("./Messages");
17
+ /** A Reaper track */
18
+ let Track = class Track {
19
+ /**
20
+ * @param trackNumber The track's number in the current bank
21
+ * @param numberOfFx The number of FX per FX bank
22
+ * @param sendOscMessage A callback used to send OSC messages to Reaper
23
+ */
24
+ constructor(trackNumber, numberOfFx, sendOscMessage) {
25
+ this.trackNumber = trackNumber;
26
+ this._isMuted = false;
27
+ this._isRecordArmed = false;
28
+ this._isSelected = false;
29
+ this._isSoloed = false;
30
+ this._name = 'Fx' + this.trackNumber;
31
+ this._pan = 0;
32
+ this._pan2 = 0;
33
+ // TODO: Find out what the modes are - should this be an enum value?
34
+ this._panMode = '';
35
+ this._recordMonitoring = RecordMonitoringMode.OFF;
36
+ this._volumeDb = 0;
37
+ this._volumeFaderPosition = 0;
38
+ this._vu = 0;
39
+ this._vuLeft = 0;
40
+ this._vuRight = 0;
41
+ this._fx = [];
42
+ this._handlers = [];
43
+ this._sendOscMessage = sendOscMessage;
44
+ for (let i = 0; i < numberOfFx; i++) {
45
+ this._fx[i] = new Fx_1.TrackFx(trackNumber, i + 1, sendOscMessage);
46
+ }
47
+ this.initHandlers();
48
+ }
49
+ /** Deselect the track */
50
+ deselect() {
51
+ this._sendOscMessage(new Messages_1.BooleanMessage(this.oscAddress + '/select', false));
52
+ }
53
+ /** The track's current FX back */
54
+ get fx() {
55
+ return this._fx;
56
+ }
57
+ /** Indicates whether the track is muted */
58
+ get isMuted() {
59
+ return this._isMuted;
60
+ }
61
+ /** Indicates whether the track is armed for recording */
62
+ get isRecordArmed() {
63
+ return this._isRecordArmed;
64
+ }
65
+ /** Indicates whether the track is selected*/
66
+ get isSelected() {
67
+ return this._isSelected;
68
+ }
69
+ /** Indicates whether the track is soloed */
70
+ get isSoloed() {
71
+ return this._isSoloed;
72
+ }
73
+ /** Mute the track */
74
+ mute() {
75
+ this._sendOscMessage(new Messages_1.BooleanMessage(this.oscAddress + '/mute', true));
76
+ }
77
+ /** The track name */
78
+ get name() {
79
+ return this._name;
80
+ }
81
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
82
+ onPropertyChanged(property, callback) {
83
+ throw new Error('not implemented');
84
+ }
85
+ /** A floating-point value between -1 and 1 that indicates the pan position, with -1 being 100% left and 1 being 100% right */
86
+ get pan() {
87
+ return this._pan;
88
+ }
89
+ /** A floating-point value between -1 and 1 that indicates the pan 2 position, with -1 being 100% left and 1 being 100% right */
90
+ get pan2() {
91
+ return this._pan2;
92
+ }
93
+ /** The current pan mode */
94
+ get panMode() {
95
+ return this._panMode;
96
+ }
97
+ /**
98
+ * Receive and handle an OSC message
99
+ * @param message The message to be handled
100
+ */
101
+ receive(message) {
102
+ for (const handler of this._handlers) {
103
+ if (handler.handle(message)) {
104
+ return true;
105
+ }
106
+ }
107
+ return false;
108
+ }
109
+ /** Arm the track for recording */
110
+ recordArm() {
111
+ this._sendOscMessage(new Messages_1.BooleanMessage(this.oscAddress + '/recarm', true));
112
+ }
113
+ /** Indicates the record monitoring mode */
114
+ get recordMonitoring() {
115
+ return this._recordMonitoring;
116
+ }
117
+ /** Disarm track recording */
118
+ recordDisarm() {
119
+ this._sendOscMessage(new Messages_1.BooleanMessage(this.oscAddress + '/recarm', false));
120
+ }
121
+ /**
122
+ * Renames the track
123
+ * @param name The new name of the track
124
+ * @example
125
+ * ```typescript
126
+ * // Change the track name to 'Guitar'
127
+ * track.rename('Guitar');
128
+ * ```
129
+ */
130
+ rename(name) {
131
+ this._sendOscMessage(new Messages_1.StringMessage(this.oscAddress + '/name', name));
132
+ // Haven't figured out why yet (possibly to do with track selection?)
133
+ // but Reaper doesn't send an OSC message even though it does if you
134
+ // change the name in Reaper
135
+ this._name = name;
136
+ }
137
+ /** Select the track */
138
+ select() {
139
+ this._sendOscMessage(new Messages_1.BooleanMessage(this.oscAddress + '/select', true));
140
+ }
141
+ /**
142
+ * Set the record monitoring mode
143
+ * @param {RecordMonitorMode} value
144
+ * */
145
+ setMonitoringMode(value) {
146
+ this._sendOscMessage(new Messages_1.IntegerMessage(this.oscAddress + '/monitor', value));
147
+ }
148
+ /**
149
+ * Sets the pan
150
+ * @param value A floating-point value between -1 and 1, where -1 is 100% left and 1 is 100% right
151
+ */
152
+ setPan(value) {
153
+ if (value < -1 || value > 1) {
154
+ throw new RangeError('Must be between -1 and 1');
155
+ }
156
+ this._sendOscMessage(new Messages_1.FloatMessage(this.oscAddress + '/pan', value));
157
+ }
158
+ /**
159
+ * Sets the pan 2
160
+ * @param value A floating-point value between -1 and 1, where -1 is 100% left and 1 is 100% right
161
+ */
162
+ setPan2(value) {
163
+ if (value < -1 || value > 1) {
164
+ throw new RangeError('Must be between -1 and 1');
165
+ }
166
+ this._sendOscMessage(new Messages_1.FloatMessage(this.oscAddress + '/pan2', value));
167
+ }
168
+ /**
169
+ * Sets the volume to a specific dB value.
170
+ * @param value Value (in dB) to set the volume to. Valid range is -100 to 12.
171
+ */
172
+ setVolumeDb(value) {
173
+ if (value < -100 || value > 12) {
174
+ throw new RangeError('Must be between -100 and 12');
175
+ }
176
+ this._sendOscMessage(new Messages_1.FloatMessage(this.oscAddress + '/volume/db', value));
177
+ }
178
+ /** Sets the volume by moving the fader to a specific position
179
+ * @param position A value for the fader position between 0 and 1, where 0 is all the way down and 1 is all the way up
180
+ */
181
+ setVolumeFaderPosition(position) {
182
+ if (position < 0 || position > 1) {
183
+ throw new RangeError('Must be between 0 and 1');
184
+ }
185
+ this._sendOscMessage(new Messages_1.FloatMessage(this.oscAddress + '/volume', position));
186
+ }
187
+ /** Solo the track */
188
+ solo() {
189
+ this._sendOscMessage(new Messages_1.BooleanMessage(this.oscAddress + '/solo', true));
190
+ }
191
+ /** Toggle mute on/off */
192
+ toggleMute() {
193
+ this._sendOscMessage(new Messages_1.ToggleMessage(this.oscAddress + '/mute'));
194
+ }
195
+ /** Toggle record arm on/off */
196
+ toggleRecordArm() {
197
+ this._sendOscMessage(new Messages_1.ToggleMessage(this.oscAddress + '/recarm'));
198
+ }
199
+ /** Toggle solo on/off */
200
+ toggleSolo() {
201
+ this._sendOscMessage(new Messages_1.ToggleMessage(this.oscAddress + '/solo'));
202
+ }
203
+ /** Unmute the track */
204
+ unmute() {
205
+ this._sendOscMessage(new Messages_1.BooleanMessage(this.oscAddress + '/mute', false));
206
+ }
207
+ /** Unsolo the track */
208
+ unsolo() {
209
+ this._sendOscMessage(new Messages_1.BooleanMessage(this.oscAddress + '/solo', false));
210
+ }
211
+ /** The track volume in dB */
212
+ get volumeDb() {
213
+ return this._volumeDb;
214
+ }
215
+ /** A floating-point value between 0 and 1 that indicates the fader position, with 0 being all the way down and 1 being all the way up */
216
+ get volumeFaderPosition() {
217
+ return this._volumeFaderPosition;
218
+ }
219
+ /** A floating-point value between 0 and 1 that indicates the VU level */
220
+ get vu() {
221
+ return this._vu;
222
+ }
223
+ /** A floating-point value between 0 and 1 that indicates the Left VU level */
224
+ get vuLeft() {
225
+ return this._vuLeft;
226
+ }
227
+ /** A floating-point value between 0 and 1 that indicates the Right VU level */
228
+ get vuRight() {
229
+ return this._vuRight;
230
+ }
231
+ initHandlers() {
232
+ this._handlers.push(new Handlers_1.StringMessageHandler(this.oscAddress + '/name', value => (this._name = value)), new Handlers_1.BooleanMessageHandler(this.oscAddress + '/mute', value => (this._isMuted = value)), new Handlers_1.BooleanMessageHandler(this.oscAddress + '/solo', value => (this._isSoloed = value)), new Handlers_1.BooleanMessageHandler(this.oscAddress + '/recarm', value => (this._isRecordArmed = value)), new Handlers_1.IntegerMessageHandler(this.oscAddress + '/monitor', value => (this._recordMonitoring = value)), new Handlers_1.BooleanMessageHandler(this.oscAddress + '/select', value => (this._isSelected = value)), new Handlers_1.TrackFxMessageHandler(fxNumber => (this._fx[fxNumber - 1] !== undefined ? this._fx[fxNumber - 1] : null)), new Handlers_1.FloatMessageHandler(this.oscAddress + '/pan', value => (this._pan = value)), new Handlers_1.FloatMessageHandler(this.oscAddress + '/pan2', value => (this._pan2 = value)), new Handlers_1.StringMessageHandler(this.oscAddress + '/panmode', value => (this._panMode = value)), new Handlers_1.FloatMessageHandler(this.oscAddress + '/volume', value => (this._volumeFaderPosition = value)), new Handlers_1.FloatMessageHandler(this.oscAddress + '/volume/db', value => (this._volumeDb = value)), new Handlers_1.FloatMessageHandler(this.oscAddress + '/vu', value => (this._vu = value)), new Handlers_1.FloatMessageHandler(this.oscAddress + '/vu/L', value => (this._vuLeft = value)), new Handlers_1.FloatMessageHandler(this.oscAddress + '/vu/R', value => (this._vuRight = value)));
233
+ }
234
+ /** The OSC address of the track */
235
+ get oscAddress() {
236
+ return `/track/${this.trackNumber}`;
237
+ }
238
+ };
239
+ __decorate([
240
+ Notify_1.notify('isMuted')
241
+ ], Track.prototype, "_isMuted", void 0);
242
+ __decorate([
243
+ Notify_1.notify('isRecordArmed')
244
+ ], Track.prototype, "_isRecordArmed", void 0);
245
+ __decorate([
246
+ Notify_1.notify('isSelected')
247
+ ], Track.prototype, "_isSelected", void 0);
248
+ __decorate([
249
+ Notify_1.notify('isSoloed')
250
+ ], Track.prototype, "_isSoloed", void 0);
251
+ __decorate([
252
+ Notify_1.notify('name')
253
+ ], Track.prototype, "_name", void 0);
254
+ __decorate([
255
+ Notify_1.notify('pan')
256
+ ], Track.prototype, "_pan", void 0);
257
+ __decorate([
258
+ Notify_1.notify('pan2')
259
+ ], Track.prototype, "_pan2", void 0);
260
+ __decorate([
261
+ Notify_1.notify('panMode')
262
+ ], Track.prototype, "_panMode", void 0);
263
+ __decorate([
264
+ Notify_1.notify('recordMonitoring')
265
+ ], Track.prototype, "_recordMonitoring", void 0);
266
+ __decorate([
267
+ Notify_1.notify('volumeDb')
268
+ ], Track.prototype, "_volumeDb", void 0);
269
+ __decorate([
270
+ Notify_1.notify('volumeFaderPosition')
271
+ ], Track.prototype, "_volumeFaderPosition", void 0);
272
+ __decorate([
273
+ Notify_1.notify('vu')
274
+ ], Track.prototype, "_vu", void 0);
275
+ __decorate([
276
+ Notify_1.notify('vuLeft')
277
+ ], Track.prototype, "_vuLeft", void 0);
278
+ __decorate([
279
+ Notify_1.notify('vuRight')
280
+ ], Track.prototype, "_vuRight", void 0);
281
+ Track = __decorate([
282
+ Notify_1.notifyOnPropertyChanged
283
+ ], Track);
284
+ exports.Track = Track;
285
+ var RecordMonitoringMode;
286
+ (function (RecordMonitoringMode) {
287
+ /** Record monitoring disabled */
288
+ RecordMonitoringMode[RecordMonitoringMode["OFF"] = 0] = "OFF";
289
+ /** Record monitoring enabled */
290
+ RecordMonitoringMode[RecordMonitoringMode["ON"] = 1] = "ON";
291
+ /** Tape auto style */
292
+ RecordMonitoringMode[RecordMonitoringMode["AUTO"] = 2] = "AUTO";
293
+ })(RecordMonitoringMode = exports.RecordMonitoringMode || (exports.RecordMonitoringMode = {}));
294
294
  //# sourceMappingURL=Tracks.js.map