tweak b7e645ec6, use session start/end position
[ardour.git] / libs / midi++2 / midi++ / parser.h
index 05d674375c06f49588c7da1fc45a4a675f1bca48..7040e9b522a6c613350d27c31f1ca12759117dec 100644 (file)
@@ -39,6 +39,8 @@ typedef PBD::Signal2<void,Parser&,framecnt_t>        TimestampedSignal;
 typedef PBD::Signal2<void,Parser&, byte>             OneByteSignal;
 typedef PBD::Signal2<void,Parser &, EventTwoBytes *> TwoByteSignal;
 typedef PBD::Signal2<void,Parser &, pitchbend_t>     PitchBendSignal;
+typedef PBD::Signal3<void,Parser &, uint16_t, int>   RPNSignal;
+typedef PBD::Signal3<void,Parser &, uint16_t, float> RPNValueSignal;
 typedef PBD::Signal3<void,Parser &, byte *, size_t>  Signal;
 
 class LIBMIDIPP_API Parser {
@@ -50,12 +52,12 @@ class LIBMIDIPP_API Parser {
           message the next time ::scanner() parses such a message. It should
           therefore be set before every byte passed into ::scanner().
        */
-       
+
        framecnt_t get_timestamp() const { return _timestamp; }
        void set_timestamp (const framecnt_t timestamp) { _timestamp = timestamp; }
 
        /* signals that anyone can connect to */
-       
+
        BankSignal            bank_change;
        TwoByteSignal         note_on;
        TwoByteSignal         note_off;
@@ -75,6 +77,10 @@ class LIBMIDIPP_API Parser {
        TwoByteSignal         channel_controller[16];
        ZeroByteSignal        channel_active_preparse[16];
        ZeroByteSignal        channel_active_postparse[16];
+       RPNValueSignal        channel_rpn[16];
+       RPNValueSignal        channel_nrpn[16];
+       RPNSignal             channel_rpn_change[16];
+       RPNSignal             channel_nrpn_change[16];
 
        OneByteSignal         mtc_quarter_frame; /* see below for more useful signals */
        Signal                mtc;
@@ -124,7 +130,7 @@ class LIBMIDIPP_API Parser {
        MTC_Status  mtc_running() const { return _mtc_running; }
        const byte *mtc_current() const { return _mtc_time; }
        bool        mtc_locked() const  { return _mtc_locked; }
-       
+
        PBD::Signal3<void, Parser &, int, framecnt_t>      mtc_qtr;
        PBD::Signal3<void, const byte *, bool, framecnt_t> mtc_time;
        PBD::Signal1<void, MTC_Status>                     mtc_status;
@@ -135,10 +141,10 @@ class LIBMIDIPP_API Parser {
        }
 
        void reset_mtc_state ();
-       
+
   private:
        /* tracing */
-       
+
        std::ostream *trace_stream;
        std::string trace_prefix;
        void trace_event (Parser &p, byte *msg, size_t len);
@@ -171,7 +177,7 @@ class LIBMIDIPP_API Parser {
        MTC_Status _mtc_running;
        bool       _mtc_locked;
        byte last_qtr_frame;
-       
+
        framecnt_t _timestamp;
 
        ParseState pre_variable_state;