Coder Social home page Coder Social logo

home's Issues

How to implement a 3-band equalizer?

So I tried this:

 public void TurnOnEQ()
        {
            ManagedBass.Fx.PeakEQParameters eq = new PeakEQParameters();
            Bass.ChannelSetFX(handle, EffectType.PeakEQ, 0);
            eq.fGain = 0.0f; // the initial gain (here 0dB)

            // now for each band do the following
            eq.lBand = 0; // 1st band
            eq.fCenter = 60.0f; // 60Hz
            Bass.FXSetParameters(handle, eq);

            eq.lBand = 1; // 2nd band
            eq.fCenter = 170.0f; // 170Hz
            Bass.FXSetParameters(handle, eq);
        }
        public void UpdateEQ(int band, float gain)
        {
            ManagedBass.Fx.PeakEQParameters eq = new PeakEQParameters();

            // first get the EQ values of the selected band!
            eq.lBand = band;
            var result = Bass.FXGetParameters(handle, eq);

            // and now apply the new gain
            eq.fGain = gain;
           var result2 = Bass.FXSetParameters(handle, eq);
        }

This example I ported from a code posted on Un4seen forum by radio42. But the values of both result and result2 are always false and aside from that, nothing happens to the audio. I tried using PeakEQ from ManagedBass.Fx directly but I got this error:

Exception thrown: 'System.TypeLoadException'

Just wanted to ask, how to correctly implement an Equalizer?

How to Get Channel Info From Recording Input?

Hey there! I had a question on using ManagedBass to get spectrum data from a recording input.

I believe I'm already successfully able to enumerate and set the recording device, now I just need to set up some kind of loop where I read the recording input, and then save the amplitude values for low/med/high frequencies to an array.

Also, there's potential that the recording input would be a stereo source.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.