Commit Graph

106 Commits

Author SHA1 Message Date
Len Ovens
c69ef7aa37 Surfaces: Metering could only handle one surface at a time. 2016-05-31 13:53:11 -07:00
Len Ovens
239da0efb5 Fix Mackie control metering (fixes #6608). 2015-09-28 20:13:15 -07:00
Robin Gareus
1e404da10d libardour: initialize some uninitialized vars.. 2015-09-06 21:55:12 +02:00
Robin Gareus
9d4c93aca7 -Wsign-compare 2015-06-16 19:27:22 +02:00
Robin Gareus
ce259edbcd professionalize peak-meters
The peak meter needs to withstand various test-signals
without visual jitter (in particular 1kHz sine) regardless
of settings (period-size, sample-rate, custom fall-off).

This needs to be done in sync (and not by a random non-rt
‘smoothing’ thread).

On the downside this voids the ‘visual smoothing’ particularly 
with large buffersizes - but then again exactly this “always 
fall-off no matter what [the next real data will be]” is the
problem.

One the upside, there’s one less high-frequency (100Hz) thread
(Yay!) PS. it probably never worked on windows, anyway.

Only peak-meters are affected by his change.
K-meters, IEC I/II and VU were never visually smoothed.
2015-05-02 03:46:49 +02:00
Robin Gareus
f410705c3a delegate signal emission to dedicated thread.
This works around abysmal performance (~.15ms) of
boost::function and boost::bind (in PBD::Signal).

The overall load is probably higher but the realtime
thread remains unaffected.
2015-04-29 00:35:35 +02:00
Robin Gareus
75087f5c62 prepare 0dBFS peak meter 2015-04-25 06:46:29 +02:00
David Robillard
8bba63282a Reduce unnecessary non-const MIDI buffer access. 2014-11-20 15:32:06 -05:00
Paul Davis
3020b224fa Merge windows+cc branch into cairocanvas branch. Not finished, need to now merge windows branch to get changes from there 2014-01-10 16:07:57 -05:00
Robin Gareus
c284823413 optimize peak calculation of silent buffers 2013-12-30 14:26:09 +01:00
Robin Gareus
0acafa4d3d add K12/RMS meter type 2013-12-22 09:25:33 +01:00
Paul Davis
5e19f0a1ae use std::numeric_limits<float>::infinity() rather than INFINITY to try to get compilers to agree on the type 2013-08-07 08:40:21 -04:00
John Emmas
490311bc08 'libs/ardour' - Main body of changes required for building with MSVC 2013-08-04 15:36:07 +01:00
Robin Gareus
bfd50cdeb0 rework MIDI [processor|plugin] chain
* forward midi-data around plugins that have no MIDI-out
* allow to insert plugins with no MIDI-input at a point with one MIDI-channel

This works because excess ports (both plugin and route) remain
unconnected and use scratch-buffers.

Tested with LV2, LXVST and LADSPA.
(AU plugins with variable in/out retain the old behavior, no bypass)

fixes http://tracker.ardour.org/view.php?id=5630
2013-08-02 03:39:00 +02:00
Robin Gareus
ef0c4ed0e6 fix typo in c212c16eb 2013-07-31 15:24:46 +02:00
Robin Gareus
b5a2b4e84e initialize some uninitialized values 2013-07-31 15:22:51 +02:00
Robin Gareus
c212c16eb8 catch assert() 2013-07-31 15:17:22 +02:00
Robin Gareus
cd28d62b26 fix compiler warnings. 2013-07-28 20:32:52 +02:00
Robin Gareus
5fca8c9854 Don't allow to deactivate meter.
before this change:

1) switch to 'custom' meter point,
2) deactivate meter processor.

-> meters does not run regardless of meter-point
-> meter can only be re-nabled in 'custom' mode
2013-07-25 10:59:24 +02:00
Robin Gareus
132549c48a reset meters only when *really* necessary
..and continue to calculate fall-off in
audio-cycle (rather than UI thread)

TODO: check if this works properly when switching
between audio/midi meter modes on a midi-track.

One of the motivations to always reset meters when the
meter-point changes was to resolve peak-hold & fall-off
issues when a midi-meter replaces an audio-meter and vice
versa.
2013-07-25 10:53:11 +02:00
Robin Gareus
380e2ca6ce fix compiler warning 2013-07-25 02:05:10 +02:00
Robin Gareus
c4c70c347d use fixed fall-off time for k-meter 2013-07-23 19:13:45 +02:00
Robin Gareus
06e7ad67ae restore session backwards compatibility to 3.3 2013-07-22 19:59:24 +02:00
Robin Gareus
708edd5866 implement new meter types 2013-07-22 18:45:08 +02:00
Robin Gareus
72aa1cd86c Revert "Revert new meter types (postponed until after 3.3 release)"
This reverts commit d80f672e84.
2013-07-22 18:42:01 +02:00
Robin Gareus
f0a3f1ea52 reset meter when meter-point changes 2013-07-18 09:01:47 +02:00
Robin Gareus
c456166dd1 zero meters for inactive tracks 2013-07-16 19:36:57 +02:00
Robin Gareus
d80f672e84 Revert new meter types (postponed until after 3.3 release)
This reverts commit ce621d1c8a.
This reverts commit 80aa257481.
2013-07-15 16:07:37 +02:00
Robin Gareus
80aa257481 add VU and IEC meter DSP (from jmeters) 2013-07-15 15:04:36 +02:00
Robin Gareus
ee97942165 use accurate log10 for meter (fast_log2 is unsuitable inaccurate)
fast_coefficient_to_dB() returns a lower bound value, unsuitable
to catch audio peaks. The difference to 20*log10 is as large as 0.4 dB!

The effective speedup of fast_log10 compared to log10f is marginal
(sweep of all 24bit values)

  i686 (1.6GHz Intel core):  2.36 [times faster]
  x86_64 (core2 2.4GHz):     1.63
  x86_64 (I3 2.80GHz):       2.03

the execution time of one log10f() averaged over a
sweep of all 24 bit values

  i686 (1.6GHz Intel core):  0.131 usec
  x86_64 (core2 2.4GHz):     0.033 usec
  x86_64 (I3 2.80GHz):       0.044 usec

PeakMeter::run() is called from dedicated non-rt, no harm done.
2013-07-10 15:27:15 +02:00
Robin Gareus
7f47c9c5ec fix RMS+Peak meter for MIDI-tracks 2013-07-10 15:27:14 +02:00
Robin Gareus
5dae93e5ea ignore state-changes during [meter] context-menu popup (gtkmm bug?) 2013-07-10 15:27:13 +02:00
Robin Gareus
58b325de31 prepare meter type unification 2013-07-10 15:27:13 +02:00
Robin Gareus
4a9e79e53f fix meterbridge metric display switch 2013-07-10 15:27:13 +02:00
Robin Gareus
3a8f5a9770 remember meter type with session 2013-07-10 15:27:13 +02:00
Robin Gareus
6e1781e5e3 experimental RMS-meter and peak-signal (vs peak-power) query 2013-07-10 15:27:12 +02:00
Robin Gareus
42ee64e950 midi meter updates.. 2013-07-10 15:27:08 +02:00
Robin Gareus
398839f6e1 reset meters when changing metering-point or ports 2013-07-05 10:44:09 +02:00
Paul Davis
4abbabdcf9 Squashed commit of the following:
commit fdbae82077db53add90df7448a06869dac89acc6
Author: Paul Davis <paul@linuxaudiosystems.com>
Date:   Wed Mar 27 21:45:28 2013 -0400

    mammoth changes in basic signal flow, total redesign of MIDI channel filtering and more.

commit 59343a8283698e02bc0f622313b29e98f449e4c8
Author: Paul Davis <paul@linuxaudiosystems.com>
Date:   Wed Mar 27 01:58:53 2013 -0400

    initial working version after changes to MIDI channel filtering. may affect metering input too. testing not yet finished

this commit merges many deep changes in ardour's internal architecture,
combined with a total redesign of how MIDI channel filtering works.

data in a track used to flow from JACK port buffers to diskstream's ringbuffers
and was then copied from the ringbuffers into a BufferSet for use during
Route::process_output_buffers(). The butler thread would handle the movement of
data between the ringbuffers and disk.

with this commit, data now flows from JACK port buffers into the BufferSet used
for Route processing, and is copied from the BufferSet into the diskstream's
ringbuffers (the butler thread continues to handle interactions with disk as
usual).

this change allowed a dramatic consolidation of code and simplification of most
aspects of Track/Route::roll() and Track/Route::no_roll(). in particular, see
Route::fill_buffers_with_input() which now concisely describes how we move data
from JACK port buffers into the BufferSet for all Route types (including Tracks).

this work was initially motivated by changing MIDI channel filtering so that we
can process capture and playback independently. there is now a very clean
pathway for this - see MidiTrack::roll() (NOTE: This needs implementing in the
no-roll case too - a TODO item).

the channel selector for MIDI tracks has been moved out of the track header and
is now accessible via the context menu. more work is likely here, to make it
(more) obvious to the user when filtering is going on.
2013-03-27 21:50:18 -04:00
David Robillard
6fa6514cfd Remove over 500 unnecessary includes (including 54 of session.h).
It's slightly possible that this causes trivial build failures on different
configurations, but otherwise shouldn't cause any problems (i.e. no actual
changes other than include/naming/namespace stuff).  I deliberately avoided
removing libardour-config.h since this can mysteriously break things, though a
few of those do seem to be unnecessary.

This commit only targets includes of ardour/*.h.  There is also a very large
number of unnecessary includes of stuff in gtk2_ardour; tackling that should
also give a big improvement in build time when things are modified.


git-svn-id: svn://localhost/ardour2/branches/3.0@12420 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-05-24 06:09:29 +00:00
Carl Hetherington
c8e6db4e92 Emit ConfigurationChanged when meter setup bypasses the
general configure_io; fixes remainder of #4233.


git-svn-id: svn://localhost/ardour2/branches/3.0@10012 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-08-19 19:21:05 +00:00
David Robillard
62e730b57a Fix broken whitespace (no functional changes).
git-svn-id: svn://localhost/ardour2/branches/3.0@9288 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-04-04 22:46:48 +00:00
Paul Davis
14277ff831 Add AFLFrom... enums as counterpart to PFLFrom ; add Output metering as a new fixed meter point; clean up logic in Route::setup_invisible_processors() to correctly place meters and monitor sends in various modes
git-svn-id: svn://localhost/ardour2/branches/3.0@8923 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-02-22 17:04:06 +00:00
Carl Hetherington
173a8894e3 Fix setup of route meter point on load, and fix intermittent left-channel-only metering (#3699).
git-svn-id: svn://localhost/ardour2/branches/3.0@8486 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-01-09 15:10:59 +00:00
Carl Hetherington
73192bc1a7 Remove all use of nframes_t.
git-svn-id: svn://localhost/ardour2/branches/3.0@8166 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-12-03 22:26:29 +00:00
Paul Davis
7b6b75f38f forward port automation handling changes from 2.x, upto and including about rev 6981 (will need full testing in the 3.X context). as on 2.x, this removes real-time visual updates to automation curves during write/touch automation recording
git-svn-id: svn://localhost/ardour2/branches/3.0@7653 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-08-19 21:09:40 +00:00
Carl Hetherington
aad230da69 Improve behaviour of MIDI metering.
git-svn-id: svn://localhost/ardour2/branches/3.0@7337 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-06-30 15:08:18 +00:00
Paul Davis
5ddedeec73 make sure that meters are configured to handle the right number of channels, and allow internal returns to be restored from XML in non-monitor busses
git-svn-id: svn://localhost/ardour2/branches/3.0@6917 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-04-16 19:31:10 +00:00
Paul Davis
2726184f42 remove XML-based constructors for several types of Processors; less debugging
git-svn-id: svn://localhost/ardour2/branches/3.0@6790 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-03-24 14:01:31 +00:00
Carl Hetherington
be8a2e20dc Fix assertion failure on dropping a track out of rec-arm.
git-svn-id: svn://localhost/ardour2/branches/3.0@6393 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-12-23 00:51:26 +00:00