Comments (5)
I am going to close this because it exists!
from hydra.
This actually already exists! but i hadnt mentioned it because i wasn't sure about the api/possibly has some bugs.
// run this line to start recording
vidRecorder.start()
// stop recording
vidRecorder.stop()
// set the output video as a source
s0.init({src: vidRecorder.output})
// display the source
src(s0).out()
from hydra.
This is great. Looking forward to playing with this. I'm a test engineer, so finding bugs is sort of my thing. Happy to provide feedback on experimental builds. Speaking of which- I saw that there was some NanoKontrol support for a bit but removed later on? I'm interested in that!
from hydra.
i put in a nanokontrol package mainly because i was performing with a nanokontrol! but then it caused build problems at some point and i took it out. But it turns out the web midi api is pretty straight forward without using any packages.
THis is code to initialize webmidi, you can then inspect the values and see what corresponds to what on your midi controller, and use that to change a variable.
navigator.requestMIDIAccess()
.then(onMIDISuccess, onMIDIFailure);
//
function onMIDISuccess(midiAccess) {
console.log(midiAccess);
var inputs = midiAccess.inputs;
var outputs = midiAccess.outputs;
for (var input of midiAccess.inputs.values()){
input.onmidimessage = getMIDIMessage;
}
}
//
function onMIDIFailure() {
console.log('Could not access your MIDI devices.');
}
//
getMIDIMessage = function(midiMessage) {
var data = midiMessage.data
/// do something with the data
}
from hydra.
I have used it to control the cutoff and scale of the microphone input so that I can adjust as the music changes. this is code for doing that using the nanokontrol:
cutoffMult = 10
scaleMult = 1.5
getMIDIMessage = function(midiMessage) {
var arr = midiMessage.data
var val = arr[2]
var index = arr[1]
if(arr[1] < 4) {
a.settings[index].cutoff = val/cutoffMult
}
if(arr[1] > 15 && arr[2] < 20) a.settings[arr[1]-16].scale = val/scaleMult
}
from hydra.
Related Issues (20)
- Link to interactive docs broken HOT 1
- p5 fails to init after reload
- dev branch double space triggers period
- set initStream quality
- a.onBeat() not working? HOT 1
- Add yourself to the contribution list 💓 HOT 28
- exclude dist folder from dev branch HOT 7
- landing modal suggestions
- Dynamic canvas to pass into hydra-synth HOT 1
- WebRTC Deprecated? HOT 1
- WebRTC issue on local server
- Hydra three.js integration needs updating (+workaround)
- Hide code via urlParameter doesn't work anymore HOT 5
- needed to --ignore-engines to build
- Show documentation from within editor
- Make it easier to use local videos from within hydra editor
- Icons not visible if .brightness is set to 1
- simplify readme HOT 5
- add .github repo for the "landing" page on GH
- Use extensión libraries "inside a web page" HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hydra.