Compare commits
3 Commits
390ffb2253
...
cefab85dab
Author | SHA1 | Date |
---|---|---|
Ben Loftis | cefab85dab | |
Ben Loftis | 22b7a07526 | |
Ben Loftis | b37414e01c |
|
@ -398,22 +398,26 @@ SurroundStrip::fast_update ()
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<SurroundReturn> sur = _route->surround_return ();
|
std::shared_ptr<SurroundReturn> sur = _route->surround_return ();
|
||||||
float loud = sur->integrated_loudness();
|
|
||||||
if (loud > -90) {
|
|
||||||
char buf[32];
|
|
||||||
sprintf(buf, "%3.1f", loud);
|
|
||||||
_lufs_label.set_markup (string_compose ("<span size=\"large\" weight=\"bold\">%1</span>", buf));
|
|
||||||
} else {
|
|
||||||
_lufs_label.set_markup ("-");
|
|
||||||
}
|
|
||||||
|
|
||||||
float dbtp = sur->max_dbtp();
|
//these 2 text meters should only be updated while rolling or exporting
|
||||||
if (dbtp > -90) {
|
if (_route->session().transport_rolling()) {
|
||||||
char buf[32];
|
float loud = sur->integrated_loudness();
|
||||||
sprintf(buf, "%3.1f", dbtp);
|
if (loud > -90) {
|
||||||
_dbtp_label.set_markup (string_compose ("<span size=\"large\" weight=\"bold\">%1</span>", buf));
|
char buf[32];
|
||||||
} else {
|
sprintf(buf, "%3.1f", loud);
|
||||||
_dbtp_label.set_markup ("-");
|
_lufs_label.set_markup (string_compose ("<span size=\"large\" weight=\"bold\">%1</span>", buf));
|
||||||
|
} else {
|
||||||
|
_lufs_label.set_markup ("-");
|
||||||
|
}
|
||||||
|
|
||||||
|
float dbtp = sur->max_dbtp();
|
||||||
|
if (dbtp > -90) {
|
||||||
|
char buf[32];
|
||||||
|
sprintf(buf, "%3.1f", dbtp);
|
||||||
|
_dbtp_label.set_markup (string_compose ("<span size=\"large\" weight=\"bold\">%1</span>", buf));
|
||||||
|
} else {
|
||||||
|
_dbtp_label.set_markup ("-");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,6 +39,7 @@ public:
|
||||||
void reset ();
|
void reset ();
|
||||||
|
|
||||||
float integrated_loudness () const;
|
float integrated_loudness () const;
|
||||||
|
float momentary () const;
|
||||||
float max_momentary () const;
|
float max_momentary () const;
|
||||||
float dbtp () const;
|
float dbtp () const;
|
||||||
|
|
||||||
|
@ -74,6 +75,8 @@ private:
|
||||||
uint32_t _pow_idx;
|
uint32_t _pow_idx;
|
||||||
float _thresh_rel;
|
float _thresh_rel;
|
||||||
|
|
||||||
|
float _momentary_l;
|
||||||
|
|
||||||
float _maxloudn_M;
|
float _maxloudn_M;
|
||||||
float _integrated;
|
float _integrated;
|
||||||
float _dbtp;
|
float _dbtp;
|
||||||
|
|
|
@ -76,6 +76,8 @@ public:
|
||||||
|
|
||||||
/* a value <= -200 indicates that no data is available */
|
/* a value <= -200 indicates that no data is available */
|
||||||
float integrated_loudness () const;
|
float integrated_loudness () const;
|
||||||
|
float max_momentary () const;
|
||||||
|
float momentary () const;
|
||||||
float max_dbtp () const;
|
float max_dbtp () const;
|
||||||
|
|
||||||
samplecnt_t signal_latency () const;
|
samplecnt_t signal_latency () const;
|
||||||
|
|
|
@ -173,6 +173,8 @@ LUFSMeter::run (float const** data, uint32_t n_samples)
|
||||||
const float sum_m = sumfrag (4); // 400ms
|
const float sum_m = sumfrag (4); // 400ms
|
||||||
const float loudness_m = -0.691f + 10.f * log10f (sum_m);
|
const float loudness_m = -0.691f + 10.f * log10f (sum_m);
|
||||||
|
|
||||||
|
_momentary_l = loudness_m;
|
||||||
|
|
||||||
_maxloudn_M = std::max<float> (_maxloudn_M, loudness_m);
|
_maxloudn_M = std::max<float> (_maxloudn_M, loudness_m);
|
||||||
|
|
||||||
/* observe 400ms window every 100ms */
|
/* observe 400ms window every 100ms */
|
||||||
|
@ -256,6 +258,12 @@ LUFSMeter::integrated_loudness () const
|
||||||
return _integrated;
|
return _integrated;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
float
|
||||||
|
LUFSMeter::momentary () const
|
||||||
|
{
|
||||||
|
return _momentary_l;
|
||||||
|
}
|
||||||
|
|
||||||
float
|
float
|
||||||
LUFSMeter::max_momentary () const
|
LUFSMeter::max_momentary () const
|
||||||
{
|
{
|
||||||
|
|
|
@ -277,9 +277,7 @@ SurroundReturn::run (BufferSet& bufs, samplepos_t start_sample, samplepos_t end_
|
||||||
_surround_bufs.get_audio (19).data (meter_offset)
|
_surround_bufs.get_audio (19).data (meter_offset)
|
||||||
};
|
};
|
||||||
|
|
||||||
if (_rolling && (!_exporting || _export_end >= end_sample)) {
|
_lufs_meter.run (data, meter_nframes);
|
||||||
_lufs_meter.run (data, meter_nframes);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -395,6 +393,18 @@ SurroundReturn::finalize_export ()
|
||||||
_export_start = _export_end = 0;
|
_export_start = _export_end = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
float
|
||||||
|
SurroundReturn::momentary () const
|
||||||
|
{
|
||||||
|
return _lufs_meter.momentary ();
|
||||||
|
}
|
||||||
|
|
||||||
|
float
|
||||||
|
SurroundReturn::max_momentary () const
|
||||||
|
{
|
||||||
|
return _lufs_meter.max_momentary ();
|
||||||
|
}
|
||||||
|
|
||||||
float
|
float
|
||||||
SurroundReturn::integrated_loudness () const
|
SurroundReturn::integrated_loudness () const
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue