MV Audio Filters

Hi,

I was looking for a way to find a plugin (or do one myself) that allows audio filters on MV

I mean basic ones, like low/high cut, echo, reerb, etc.

The main reason for this is that the same way you wouldn't create multilpe images per effect (normal/blurred/grayscaled etc...) and use PIXI instead, you would like to do the same with audios

I did some search and found this :


The fact that it's possible to equalize the sound is a good start. I don't feel like spending 10$ on a plugin I'm not going to use because it's for MZ, but does someone happen to know how they managed to access the audio frequencies ?
I don't know of a plugin for this, but since you asked:
Spoiler: technical info
The Web Audio API (used by MV/MZ) offers a node-graph based framework for handling audio pipelines. Basically, you can construct a chain like this:
  • An input source, e.g. the BGM audio buffer;
  • Any number of intermediate nodes, e.g. BGM gain, BGM pan, master gain;
  • An output/destination node, which the browser uses for playback.
The graph is constructed via connect/disconnect operations on pairs of nodes. Here's a code snippet from one of my MZ plugins (Cae_Tweaks Q16) as an example:
Spoiler: snippet
JavaScript:
    /** Compressor settings. */
    const OPTS = {
        attack:     0.003,  // [   0,  1] s  : time for -10dB
        release:    0.2,    // [   0,  1] s  : time for +10dB
        ratio:      20,     // [   1, 20]    : compression ratio
        threshold: -25,     // [-100,  0] dB : compression starts here
        knee:       30      // [   0, 40] dB : threshold smoothing
    };

    /** Points to compressor node, when active. */
    let compressor = null;

    // Default node graph: (source - gain - panner) > masterGain - out.
    // Connect compressor between masterGain and destination ----^

    /**
     * Adds compressor audio node.
     * @returns {boolean} `true` iff compressor node was added.
     */
    const add = function() {
        if (compressor)
            return false;
        compressor = new DynamicsCompressorNode(
            WebAudio._context, OPTS
        );
        WebAudio._masterGainNode.disconnect();
        WebAudio._masterGainNode.connect(compressor);
        compressor.connect(WebAudio._context.destination);
        return true;
    };

    /**
     * Removes compressor audio node.
     * @returns {boolean} `true` iff compressor node was removed.
     */
    const rem = function() {
        if (!compressor)
            return false;
        compressor.disconnect();
        WebAudio._masterGainNode.disconnect()
        WebAudio._masterGainNode.connect(WebAudio._context.destination);
        compressor = null;
        return true;
    };
I think it should all work the same in MV, but I haven't tested. You can find the relevant core script code in rpg_core.js, as the WebAudio wrapper. (MV does define a Html5Audio fallback, but by default that never gets used, cf AudioManager.shouldUseHtml5Audio.)

Intermediate audio nodes can include stuff like bandpass filters, convolvers, compressors, etc. Here's a list with more technical info~
since you asked
The most threatening words anyone can see in a post from caethyril 🤣
Check this plugin out by Bentelk.

​

Check this plugin out by Bentelk.

​

Omg this shouldn't be free if it works properly this is an amazing feature

I'll do some tests with it

Original thread: https://forums.rpgmakerweb.com/threads/audio-filters.167283/