GithubHelp home page GithubHelp logo

juce_dspmod_distortion_sample's Introduction

JUCE_DSPmod_distortion_sample

Distortion VST

screenshot

juce_dspmod_distortion_sample's People

Stargazers

 avatar y_shimo avatar NanoException avatar  avatar Jackson Reed avatar

juce_dspmod_distortion_sample's Issues

バグ:何も音を入力しないでGUIを表示するとGUIがフリーズする

pluginProcessorのインスタンス立ち上げてから、何も音を入力しないでGUIを表示すると、pluginEditorのtimerCallback()内で、Atomic型をgetする処理で固まってる。

void StaticClipperVstAudioProcessorEditor::timerCallback() {
    for (int i = 0; i < Parameters::TotalNumParams; i++) {
        float newVal = processor.parameters[i]->get();
        parameterSliders[i].setValue(newVal, dontSendNotification);
    }

    // ここで固まる
    reductionSlider[0].setValue(processor.leftReductionPercent.get(), dontSendNotification);
    reductionSlider[1].setValue(processor.rightReductionPercent.get(), dontSendNotification);
}

現象の特定として、何も音を入力しないと、leftReduction とrightReduction の値を求める際にpreAverageが0.00になり、値が無限大になってしまうことが原因かもしれない。
leftReduction に適当な値を代入すると、GUIは固まらない

void StaticClipperVstAudioProcessor::processBlock (AudioSampleBuffer& buffer, MidiBuffer& midiMessages)
{
   ~~~
   // 0を代入するとバグが発生しない
   //
    auto leftReduction = (preAverage.get(0) - postAverage.get(0)) / preAverage.get(0);
    auto rightReduction = (preAverage.get(1) - postAverage.get(1)) / preAverage.get(1);

    leftReductionPercent.set(leftReduction * 100.f);
    rightReductionPercent.set(rightReduction * 100.f);
}

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.