GithubHelp home page GithubHelp logo

kevin-chau / treactr Goto Github PK

View Code? Open in Web Editor NEW
29.0 6.0 4.0 4.11 MB

A Traktor clone in React

Home Page: https://treactr.herokuapp.com

License: MIT License

JavaScript 81.89% CSS 17.93% Dockerfile 0.18%
react traktor dj audio midi music

treactr's Issues

Bi-Directional Cross Fader

The bottom crossfader should be highlighted when you are on the left or right side of the center point.

Private Biquad Filters for each Deck Component

Each Deck component should have its own instances of the Biquad Filters (High, Mid, Low).

Currently, the biquad filters are declared globally outside of the Component definition, so all instances of a Deck share the same biquad filter. This means that if you move the EQ knobs on one deck it will change the cutoff frequency of the EQs on the other deck.

The reason why biquad filters are global variables at the moment is because they need to be instantiated in componentDidMount (which is called after the first call to render() produces an <audio> tag). The values of the filters parameters are actually updated in componentDidUpdate.

There should be a way to not have global biquad filters and instead make them private variables defined within a component, perhaps through props or state (or context?).

Creating Audio Source Node from React-Player Audio Tag.

In Deck.js:render(), React-Player creates an audio tag () when given a soundcloud url.

The function componentDidMount() just above it will run right after the component is rendered, so we should be able to create an audio source node from it using the Web Audio API.

If you uncomment line 27:

    var source = audioCtx.createMediaElementSource(myAudio);

and run Treactr, we run in to the following error mounting the audio source:

Error: Failed to execute 'createMediaElementSource' on 'BaseAudioContext': HTMLMediaElement already connected previously to a different MediaElementSourceNode

NOTE: This error doesn't show up in the console and instead shows up in the browser tab.

I've checked the react-player source code and I did not see any calls to the Web Audio API so I am wondering why it would think that the audio tag has already been associated with another source node.

How do we go about debugging this issue?

https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createMediaElementSource

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.