globally remove all trailing whitespace from ardour code base.
[ardour.git] / libs / surfaces / generic_midi / midifunction.cc
index b0dc95e4fc9caa00c9dd74a7884e626c6358f30f..e9e875b7027cf5edbf6e959c1e91934d3dfe3805 100644 (file)
@@ -1,6 +1,6 @@
 /*
     Copyright (C) 2009 Paul Davis
+
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
     the Free Software Foundation; either version 2 of the License, or
 #include "midifunction.h"
 #include "generic_midi_control_protocol.h"
 
+#include "pbd/compose.h"
+
+#include "ardour/debug.h"
+
 using namespace MIDI;
+using namespace PBD;
 
 MIDIFunction::MIDIFunction (MIDI::Parser& p)
        : MIDIInvokable (p)
@@ -94,10 +99,12 @@ MIDIFunction::execute ()
        switch (_function) {
        case NextBank:
                _ui->next_bank();
+               DEBUG_TRACE (DEBUG::GenericMidi, "Function: next_bank\n");
                break;
 
        case PrevBank:
                _ui->prev_bank();
+               DEBUG_TRACE (DEBUG::GenericMidi, "Function: prev_bank\n");
                break;
 
        case SetBank:
@@ -105,39 +112,48 @@ MIDIFunction::execute ()
                        uint32_t bank;
                        sscanf (_argument.c_str(), "%d", &bank);
                        _ui->set_current_bank (bank);
+                       DEBUG_TRACE (DEBUG::GenericMidi, string_compose ("Function: set_current_bank = %1\n", (int) bank));
                }
                break;
 
        case TransportStop:
                _ui->transport_stop ();
+               DEBUG_TRACE (DEBUG::GenericMidi, "Function: transport_stop\n");
                break;
 
        case TransportRoll:
                _ui->transport_play ();
+               DEBUG_TRACE (DEBUG::GenericMidi, "Function: transport_play\n");
                break;
 
        case TransportStart:
                _ui->goto_start ();
+               DEBUG_TRACE (DEBUG::GenericMidi, "Function: goto_start\n");
                break;
 
        case TransportZero:
                // need this in BasicUI
+               DEBUG_TRACE (DEBUG::GenericMidi, "Function: goto_zero-not implemented\n");
                break;
 
        case TransportEnd:
                _ui->goto_end ();
+               DEBUG_TRACE (DEBUG::GenericMidi, "Function: goto_end\n");
                break;
 
        case TransportLoopToggle:
                _ui->loop_toggle ();
+               DEBUG_TRACE (DEBUG::GenericMidi, "Function: loop_toggle\n");
                break;
 
        case TransportRecordEnable:
                _ui->set_record_enable (true);
+               DEBUG_TRACE (DEBUG::GenericMidi, "Function: set_record_enable = true\n");
                break;
 
        case TransportRecordDisable:
                _ui->set_record_enable (false);
+               DEBUG_TRACE (DEBUG::GenericMidi, "Function: set_record_enable = false\n");
                break;
 
        case Select:
@@ -145,6 +161,7 @@ MIDIFunction::execute ()
                        uint32_t rid;
                        sscanf (_argument.c_str(), "%d", &rid);
                        _ui->SetRouteSelection (rid);
+                       DEBUG_TRACE (DEBUG::GenericMidi, string_compose ("Function: SetRouteSelection = %1\n", rid));
                }
                break;
        case TrackSetMute:
@@ -165,6 +182,7 @@ MIDIFunction::execute ()
 XMLNode&
 MIDIFunction::get_state ()
 {
+
        XMLNode* node = new XMLNode ("MIDIFunction");
        return *node;
 }