2 Copyright (C) 2006,2007 John Anderson
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 #include "mackie_midi_builder.h"
26 using namespace Mackie;
29 void Group::add( Control & control )
31 _controls.push_back( &control );
34 Strip::Strip( const std::string & name, int index )
51 controls[1].each do |x|
53 #{x.class.name} & Strip::#{x.name}()
55 if ( _#{x.name} == 0 )
56 throw MackieControlException( "#{x.name} is null" );
65 throw MackieControlException( "gain is null" );
71 throw MackieControlException( "vpot is null" );
74 Button & Strip::recenable()
76 if ( _recenable == 0 )
77 throw MackieControlException( "recenable is null" );
80 Button & Strip::solo()
83 throw MackieControlException( "solo is null" );
86 Button & Strip::mute()
89 throw MackieControlException( "mute is null" );
92 Button & Strip::select()
95 throw MackieControlException( "select is null" );
98 Button & Strip::vselect()
101 throw MackieControlException( "vselect is null" );
104 Button & Strip::fader_touch()
106 if ( _fader_touch == 0 )
107 throw MackieControlException( "fader_touch is null" );
108 return *_fader_touch;
111 ostream & Mackie::operator << ( ostream & os, const Mackie::Control & control )
113 os << typeid( control ).name();
115 os << "name: " << control.name();
117 os << "id: " << "0x" << setw(4) << setfill('0') << hex << control.id() << setfill(' ');
119 os << "type: " << "0x" << setw(2) << setfill('0') << hex << control.type() << setfill(' ');
121 os << "raw_id: " << "0x" << setw(2) << setfill('0') << hex << control.raw_id() << setfill(' ');
123 os << "ordinal: " << dec << control.ordinal();
125 os << "group: " << control.group().name();