mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 08:36:32 +01:00
use new canvas meter in push2 track mix layout
This commit is contained in:
parent
56af59953f
commit
8be313932e
3 changed files with 13 additions and 13 deletions
|
|
@ -50,14 +50,16 @@
|
||||||
#include "gtkmm2ext/gui_thread.h"
|
#include "gtkmm2ext/gui_thread.h"
|
||||||
#include "gtkmm2ext/rgb_macros.h"
|
#include "gtkmm2ext/rgb_macros.h"
|
||||||
|
|
||||||
|
#include "canvas/box.h"
|
||||||
#include "canvas/line.h"
|
#include "canvas/line.h"
|
||||||
|
#include "canvas/meter.h"
|
||||||
#include "canvas/rectangle.h"
|
#include "canvas/rectangle.h"
|
||||||
#include "canvas/text.h"
|
#include "canvas/text.h"
|
||||||
|
|
||||||
#include "canvas.h"
|
#include "canvas.h"
|
||||||
#include "knob.h"
|
#include "knob.h"
|
||||||
|
#include "level_meter.h"
|
||||||
#include "menu.h"
|
#include "menu.h"
|
||||||
#include "meter.h"
|
|
||||||
#include "push2.h"
|
#include "push2.h"
|
||||||
#include "track_mix.h"
|
#include "track_mix.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
|
|
@ -140,7 +142,7 @@ TrackMixLayout::TrackMixLayout (Push2& p, Session& s)
|
||||||
name_text->set_font_description (fd);
|
name_text->set_font_description (fd);
|
||||||
name_text->set_position (Duple (10 + (4*Push2Canvas::inter_button_spacing()), 2));
|
name_text->set_position (Duple (10 + (4*Push2Canvas::inter_button_spacing()), 2));
|
||||||
|
|
||||||
meter = new Meter (this, 24, 32, Meter::Horizontal, 200);
|
meter = new LevelMeter (p2, this, 200, ArdourCanvas::Meter::Horizontal);
|
||||||
meter->set_position (Duple (10 + (4 * Push2Canvas::inter_button_spacing()), 50));
|
meter->set_position (Duple (10 + (4 * Push2Canvas::inter_button_spacing()), 50));
|
||||||
|
|
||||||
ControlProtocol::StripableSelectionChanged.connect (selection_connection, invalidator (*this), boost::bind (&TrackMixLayout::selection_changed, this), &p2);
|
ControlProtocol::StripableSelectionChanged.connect (selection_connection, invalidator (*this), boost::bind (&TrackMixLayout::selection_changed, this), &p2);
|
||||||
|
|
@ -426,6 +428,10 @@ TrackMixLayout::set_stripable (boost::shared_ptr<Stripable> s)
|
||||||
solo_iso_change ();
|
solo_iso_change ();
|
||||||
solo_safe_change ();
|
solo_safe_change ();
|
||||||
monitoring_change ();
|
monitoring_change ();
|
||||||
|
|
||||||
|
meter->set_meter (stripable->peak_meter ().get());
|
||||||
|
} else {
|
||||||
|
meter->set_meter (0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -507,12 +513,5 @@ TrackMixLayout::update_meters ()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
boost::shared_ptr<PeakMeter> peak_meter = stripable->peak_meter ();
|
meter->update_meters ();
|
||||||
|
|
||||||
if (!peak_meter) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const float mpeak = peak_meter->meter_level (0, MeterPeak);
|
|
||||||
meter->set (DSP::log_meter (mpeak));
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -32,12 +32,13 @@ namespace ArdourCanvas {
|
||||||
class Rectangle;
|
class Rectangle;
|
||||||
class Text;
|
class Text;
|
||||||
class Line;
|
class Line;
|
||||||
|
class VBox;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace ArdourSurface {
|
namespace ArdourSurface {
|
||||||
|
|
||||||
class Push2Knob;
|
class Push2Knob;
|
||||||
class Meter;
|
class LevelMeter;
|
||||||
|
|
||||||
class TrackMixLayout : public Push2Layout
|
class TrackMixLayout : public Push2Layout
|
||||||
{
|
{
|
||||||
|
|
@ -73,7 +74,7 @@ class TrackMixLayout : public Push2Layout
|
||||||
uint8_t selection_color;
|
uint8_t selection_color;
|
||||||
|
|
||||||
Push2Knob* knobs[8];
|
Push2Knob* knobs[8];
|
||||||
Meter* meter;
|
LevelMeter* meter;
|
||||||
|
|
||||||
void stripable_property_change (PBD::PropertyChange const& what_changed);
|
void stripable_property_change (PBD::PropertyChange const& what_changed);
|
||||||
void simple_control_change (boost::shared_ptr<ARDOUR::AutomationControl> ac, Push2::ButtonID bid);
|
void simple_control_change (boost::shared_ptr<ARDOUR::AutomationControl> ac, Push2::ButtonID bid);
|
||||||
|
|
|
||||||
|
|
@ -26,12 +26,12 @@ def build(bld):
|
||||||
interface.cc
|
interface.cc
|
||||||
midi_byte_array.cc
|
midi_byte_array.cc
|
||||||
leds.cc
|
leds.cc
|
||||||
|
level_meter.cc
|
||||||
gui.cc
|
gui.cc
|
||||||
knob.cc
|
knob.cc
|
||||||
layout.cc
|
layout.cc
|
||||||
mode.cc
|
mode.cc
|
||||||
menu.cc
|
menu.cc
|
||||||
meter.cc
|
|
||||||
mix.cc
|
mix.cc
|
||||||
scale.cc
|
scale.cc
|
||||||
splash.cc
|
splash.cc
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue