Hi all,
if I understand the code well, then the right-channel meter on the synth panel
is not really behaving as expected. Wouldn't you need the attached patch ?
(0001) Now the two meters show some difference, instead without this patch they
look like always aligned (with a few simple scores I'm playing).
Also, in the same code, why rewriting the buffer contents with the same
contents at every cycle ? Looks like unneeded (see 0002)
Thanks,
T.
--
Tommaso Cucinotta
Home Page: http://retis.sssup.it/~tommaso
LinkedIn: http://www.linkedin.com/in/tommasocucinotta
>From f394fd68d19af2c997b3af8da8b8dbd8350ff0a3 Mon Sep 17 00:00:00 2001
From: Tommaso Cucinotta <[email protected]>
Date: Fri, 18 Aug 2017 17:21:22 +0200
Subject: [PATCH 1/2] synth meter l/r bugfix
---
mscore/seq.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mscore/seq.cpp b/mscore/seq.cpp
index b49d57260..bb7654b7d 100644
--- a/mscore/seq.cpp
+++ b/mscore/seq.cpp
@@ -876,7 +876,7 @@ void Seq::process(unsigned n, float* buffer)
*p++ = val;
val = *p;
- rv = qMax(lv, fabsf(val));
+ rv = qMax(rv, fabsf(val));
*p++ = val;
}
meterValue[0] = lv;
--
2.11.0
>From 863f6de6658742baa16467518ac614b4a2e95777 Mon Sep 17 00:00:00 2001
From: Tommaso Cucinotta <[email protected]>
Date: Fri, 18 Aug 2017 17:40:19 +0200
Subject: [PATCH 2/2] remove unneeded audio buffer overwrite of unchanged
contents at every cycle
---
mscore/seq.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mscore/seq.cpp b/mscore/seq.cpp
index bb7654b7d..1c16a411d 100644
--- a/mscore/seq.cpp
+++ b/mscore/seq.cpp
@@ -873,11 +873,11 @@ void Seq::process(unsigned n, float* buffer)
for (unsigned i = 0; i < n; ++i) {
qreal val = *p;
lv = qMax(lv, fabsf(val));
- *p++ = val;
+ p++;
val = *p;
rv = qMax(rv, fabsf(val));
- *p++ = val;
+ p++;
}
meterValue[0] = lv;
meterValue[1] = rv;
--
2.11.0
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Mscore-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mscore-developer