From a9c2e2f7e51bc7eb6c894fd3a9d06d6d65c5b77c Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 21 Nov 2018 14:04:18 -0500 Subject: [PATCH] expose step sequencer's step's index --- libs/ardour/ardour/step_sequencer.h | 4 +++- libs/ardour/step_sequencer.cc | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/libs/ardour/ardour/step_sequencer.h b/libs/ardour/ardour/step_sequencer.h index 500cbca46b..925cab07e2 100644 --- a/libs/ardour/ardour/step_sequencer.h +++ b/libs/ardour/ardour/step_sequencer.h @@ -62,6 +62,8 @@ class Step : public PBD::Stateful { Step (StepSequence&, size_t n, Temporal::Beats const & beat, int notenum); ~Step (); + size_t index() const { return _index; } + void set_note (double note, double velocity = 0.5, int n = 0); void set_chord (size_t note_cnt, double* notes); void set_parameter (int number, double value, int n = 0); @@ -114,7 +116,7 @@ class Step : public PBD::Stateful { friend class StepSequence; /* HACK */ StepSequence& _sequence; - size_t index; + size_t _index; bool _enabled; Temporal::Beats _nominal_beat; Temporal::Beats _scheduled_beat; diff --git a/libs/ardour/step_sequencer.cc b/libs/ardour/step_sequencer.cc index 7cbaf6ab6e..18bd0f8ed1 100644 --- a/libs/ardour/step_sequencer.cc +++ b/libs/ardour/step_sequencer.cc @@ -32,7 +32,7 @@ using namespace std; Step::Step (StepSequence &s, size_t n, Temporal::Beats const & b, int base_note) : _sequence (s) - , index (n) + , _index (n) , _enabled (true) , _nominal_beat (b) , _skipped (false)