Using Python libraries in MaxMSP
I want to perform tasks such as low-pass filtering, formant analysis, and extraction of volume peak times on audio signals entered into MAXMSP using libraries like scipy. Please provide instructions on how to achieve this.
Your post lacks some context, preventing us to provide precise answers.
What's the point of using python libraries when you can do all of that straigth into Max?
Or, the opposite way, why using Max to make something you apparently know how to make in python?
Do you intend to do all that processing in real time or not? What do you plan to use the result for?
There is no official Python support in Max, but some externals do exist, like this one.
Hi @YOKOTA-SAN
I'm the author of the python3 externals that @TFL kindly referred you to. I recently added support for writing and reading via python to/from buffer~ objects using either the standard buffer protocol or memoryviews. There are examples and tests demonstrating this here: using scipy.signal/numpy and also just the builtin array.array objects.
Hi TFL
Thank you for your response. The reason for using Python libraries is to apply a 5th-order Butterworth filter to the inputted audio. As I am a beginner in Max, I couldn't find a way to apply a 5th-order Butterworth filter in Max. If a method for doing so in Max is found, the use of Python may not be necessary.
In Max, I am attempting to create animations using the input audio with Jitter. Therefore, I want to perform all the processing in real-time or with minimal delay.
Hi SHAKEEB ALIREZA
Thank you very much for the valuable information. I will try using it in practice from now on. If there are things I don't understand in the future, may I ask you questions? Thank you in advance.
Hi Wataru,
Feel free to ask questions here if you get stuck.
In any case, if your objective is just to "apply a 5th-order Butterworth filter in Max" then you are better served looking for Max native solutions such as this one.