Code Monkey home page Code Monkey logo

Comments (3)

raub avatar raub commented on May 19, 2024

Hey, @ddiakopoulos there's no such class in LabSound (any more), but there is a losely similar SampledAudioNode, and I've mentioned the lack of detune there in #73 . Is it possible to add this param there?

Overall this issue looks a bit too old..

from labsound.

meshula avatar meshula commented on May 19, 2024

The key bit of the diff enables a detune parameter specified in cents. Perhaps SampledAudioNode is the place to add detune.

 double AudioBufferSourceHandler::computePlaybackRate()
 {
-    double dopplerRate = 1.0;
+    double dopplerRate = 1;
     if (m_pannerNode)
         dopplerRate = m_pannerNode->dopplerRate();
 
@@ -498,6 +499,9 @@
 
     double finalPlaybackRate = dopplerRate * sampleRateFactor * basePlaybackRate;
 
+    // Take the detune value into account for the final playback rate.
+    finalPlaybackRate *= pow(2, m_detune->finalValue() / 1200);
+
     // Sanity check the total rate.  It's very important that the resampler not
     // get any bad rate values.
     finalPlaybackRate = clampTo(finalPlaybackRate, 0.0, MaxRate);

from labsound.

meshula avatar meshula commented on May 19, 2024

merged

from labsound.

Related Issues (20)

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.