kevin-chau / treactr Goto Github PK
View Code? Open in Web Editor NEWA Traktor clone in React
Home Page: https://treactr.herokuapp.com
License: MIT License
A Traktor clone in React
Home Page: https://treactr.herokuapp.com
License: MIT License
The bottom crossfader should be highlighted when you are on the left or right side of the center point.
We currently use Yarn + a deployment script to push to the treactr live app on heroku. We need a second deployment script.
We will target NI Traktor Kontrol S4 and S5 first.
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?).
It's time to start unit testing our code and getting a CI runner up.
For Unit Testing, we plan to use Jest:
https://facebook.github.io/jest/docs/tutorial-react.html
For CI, we plan to use Travis:
https://travis-ci.org/facebook/react
Both of these have good tutorials and documentation for setting up with React, so it should be a piece of cake...
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.