0

I am currently working on a Python project where I have implemented a parametric equalizer controlled by an OSC (Open Sound Control) interface. Below is the code snippet of the Eq class responsible for handling the equalizer functionality:

class Eq(PyoObject):
    def __init__(self, src=Noise(), port=9997):
        self._port = port
        self._oscmsg = OscReceive(port=self._port, address=["/freq"])
        #self._oscmsg = OscReceive(port=self._port, address=["/freq","/q"])
        self._src = src
        #self._q = self._oscmsg["/q"]
        self._q = 1
        self._freq = self._oscmsg["/freq"]
        self._eq = EQ(self._src, freq=self._freq, q=self._q, boost=0, type=0)
        self._base_objs = self._eq.getBaseObjects()

The issue I am facing is related to the q parameter. As you can see, the q parameter is initially set to a constant value of 1. However, I want to control this parameter dynamically using an external OSC application on my phone. To achieve this, I commented out the line self._q = self._oscmsg["/q"] and the corresponding OSC address in the OscReceive line, as indicated by the commented code.

Upon making this change, no audio is generated when I run the program with the OSC control enabled. I have verified the source code of the EQ object, but I couldn't find any solutions to this problem.

Can anyone help me understand why commenting out the q parameter assignment is causing no audio to be generated and provide a solution to this issue? I greatly appreciate any insights or suggestions to resolve this problem. Thank you!

0 Answers0