VuMeter

已查看 47 次
跳至第一个未读帖子

Tristan SABOURIN

未读,
2021年8月6日 05:13:202021/8/6
收件人 pyo-discuss
Hello ! 
What is the function to display the value of a signal on a vumeter ?

I tried something like this : 
a = Input()
...
...
b.out()
c = RMS(b)
d = c.get()
vm = PyoGuiVuMeter(my_panel), nchnls=2)
vm.display(d)

But it doesn't work, vumeter is displayed on my wxPython window, but not the signal.

Thanks a lot

Tristan SABOURIN

未读,
2021年8月13日 04:01:392021/8/13
收件人 pyo-discuss
Nobody can help me ? :(

Olivier Bélanger

未读,
2021年8月13日 15:35:232021/8/13
收件人 pyo-d...@googlegroups.com
Hi Tristan,

Take a look in this code how the setRms() function of the PyoGuiVuMeter is bounded to an RMS object:

from pyo import *

s = Server().boot().start()

audioInputs = Input([0,1])
audioRMS = RMS(audioInputs)

class MyFrame(wx.Frame):
def __init__(self, parent, id=-1, title="Frame Title", pos=(25,25), size=(500,400)):
wx.Frame.__init__(self, parent, id, title, pos, size)
self.panel = wx.Panel(self)
self.box = wx.BoxSizer(wx.VERTICAL)

self.vm = PyoGuiVuMeter(self.panel, nchnls=2)
audioRMS.setFunction(self.vm.setRms)

self.panel.SetSizer(self.box)
self.Show()

app = wx.App()
f = MyFrame(None)
app.MainLoop()


Olivier





521 rue Geo
rges Méliès
L'@ltis - 3ème étage
34000 MONTPELLIER

Tel : (+33)4.11.93.22.02

S.A.S au capital de 3000€
Immatriculée au R.C.S de Montpellier
N° SIRET : 799 621 636 00031
Code APE : 7112B


P Auditori Home contribue au respect de l'environnement. Dans ce cadre, merci de n'imprimer ce mail qu'en cas de nécessité.

6 Auditori Home applique le droit à la déconnexion numérique. Dans ce cadre, les correspondances échangées en dehors des horaires habituels de travail, sauf urgence, n'attendent pas de suite avant le début de la prochaine journée de travail.

--
You received this message because you are subscribed to the Google Groups "pyo-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyo-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyo-discuss/ebd365aa-c108-4587-84bb-e249b02ecd66n%40googlegroups.com.

Tristan SABOURIN

未读,
2021年8月16日 02:26:072021/8/16
收件人 pyo-discuss
Thanks a lot for your answer, it works ! Is there a mean to set the max value of the VuMeter ? Thanks

Olivier Bélanger

未读,
2021年8月17日 21:43:062021/8/17
收件人 pyo-d...@googlegroups.com
Hi,

I don't think so... You hit the red step when you peak at 0 dB.

Olivier


Jonathan Jenkins

未读,
2021年9月2日 10:20:222021/9/2
收件人 pyo-discuss

Hello Olivier,

I'm using the RMS object for a VU meter application as well, but have a strange dilemma. It seems the input audio stream is not necessarily bounded from -1 to 1.

I am using my MacBook Pro's microphone input as the input stream. Normally the range of values provided by .get() is between -1 and 1. However, on peaks, the value can spike as high as 15 or more! This is affecting my db calculation as dBFS should never be above 0 for digital sources.

Any insights would be greatly appreciated! I'm trying to make a very accurate meter and don't simply want to toss out erroneous values when encountered.

Regards,
Jonathan

Olivier Bélanger

未读,
2021年9月2日 20:26:282021/9/2
收件人 pyo-d...@googlegroups.com
Hi,

Pyo's objects (RMS, PeakAmp, Input, ...) don't limit anything. If the signal coming from your mic is very loud, it surely can be higher than 1 within pyo (a linear amplitude of 15 is just about 6 dB over the limit). If you can't be sure of your signal level beforehand, you can either use a Compress object to limit the signal after the Input, or be more radical and put a Clip(your_signal, -1, 1), but be aware that you'll introduce digital distortion in the signal...

Olivier


Jonathan Jenkins

未读,
2021年9月2日 23:46:532021/9/2
收件人 pyo-d...@googlegroups.com
I don’t understand how this is possible in the digital domain. How are the input signals quantized in Pyo? If you have a 16bit audio stream, shouldn’t a sample be represented by a signed 16-bit integer for a total range of 2^16 - 1 values? What are the upper and lower bounds of Input()?

回复全部
回复作者
转发
0 个新帖子