- // FIXME: waaay too much code to duplicate (AudioDiskstream)
-
- int possibly_recording;
- int rolling;
- int change;
- const int transport_rolling = 0x4;
- const int track_rec_enabled = 0x2;
- const int global_rec_enabled = 0x1;
-
- /* merge together the 3 factors that affect record status, and compute
- what has changed.
- */
-
- rolling = _session.transport_speed() != 0.0f;
- possibly_recording = (rolling << 2) | (record_enabled() << 1) | can_record;
- change = possibly_recording ^ last_possibly_recording;
-
- if (possibly_recording == last_possibly_recording) {
- return;
- }
-
- /* change state */
-
- /* if per-track or global rec-enable turned on while the other was already on, we've started recording */
-
- if ((change & track_rec_enabled) && record_enabled() && (!(change & global_rec_enabled) && can_record) ||
- ((change & global_rec_enabled) && can_record && (!(change & track_rec_enabled) && record_enabled()))) {
-
- /* starting to record: compute first+last frames */
-
- first_recordable_frame = transport_frame + _capture_offset;
- last_recordable_frame = max_frames;
- capture_start_frame = transport_frame;
-
- if (!(last_possibly_recording & transport_rolling) && (possibly_recording & transport_rolling)) {
-
- /* was stopped, now rolling (and recording) */
+ _note_mode = m;
+ midi_playlist()->set_note_mode(m);
+ if (_write_source && _write_source->model())
+ _write_source->model()->set_note_mode(m);
+}