🚨How do I analyze system audio?🚨

Get help using Construct 2

Post » Mon Dec 26, 2016 10:08 am

I have been trying to get system audio analyzed in C2 for months down. I know all the ingredients I just can't figure out the right way to mix them.

Here are two methods of html5 live audio input, could someone give me (the community) the Christmas gift of how to implement one of these methods:
https://www.html5rocks.com/en/tutorials/getusermedia/intro/
or
https://developers.google.com/web/updates/2012/09/Live-Web-Audio-Input-Enabled:
// success callback when requesting audio input stream
function gotStream(stream) {
window.AudioContext = window.AudioContext || window.webkitAudioContext;
var audioContext = new AudioContext();

// Create an AudioNode from the stream.
var mediaStreamSource = audioContext.createMediaStreamSource( stream );

// Connect it to the destination to hear yourself (or any other node for processing!)
mediaStreamSource.connect( audioContext.destination );
}

navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia;
navigator.getUserMedia( {audio:true}, gotStream );

🍰  🎀  𝐻𝒶𝓅𝓅𝓎 𝐻💍𝓁𝒾𝒹𝒶𝓎𝓈  🎀  🍰
B
52
S
26
G
8
Posts: 121
Reputation: 8,526

Post » Thu Dec 29, 2016 7:30 am

Original post links were corrupted somehow.
B
52
S
26
G
8
Posts: 121
Reputation: 8,526

Post » Thu Dec 29, 2016 12:02 pm

you may want to try tone.js plugin by rexrainbow


it has fft size equilisation and many things more, and you can take the file bindata and use lerp(bin1,bin2,reactiontime) and get a overall volume which im using atm here .

P.S works with any audio file, even with some video files :D


and has also microphone capturing examples around in the libary there @rexrainbow knows better though. i was only interested in the ability to be able to play any format and use the FFT/waveform analyser
B
76
S
22
G
69
Posts: 1,353
Reputation: 43,833

Post » Fri Dec 30, 2016 12:09 am

gamecorpstudio wrote:you may want to try tone.js plugin by rexrainbow


it has fft size equilisation and many things more, and you can take the file bindata and use lerp(bin1,bin2,reactiontime) and get a overall volume which im using atm here .

P.S works with any audio file, even with some video files :D


and has also microphone capturing examples around in the libary there @rexrainbow knows better though. i was only interested in the ability to be able to play any format and use the FFT/waveform analyser

Not working on music file analyzing, I'm done with that part myself. Just input analyzing; as per the OP and example code with references.
B
52
S
26
G
8
Posts: 121
Reputation: 8,526

Post » Fri Dec 30, 2016 12:22 am

Here are analyser sample capx files in tone.js
audio file + analyser
mic input + analyser
B
108
S
26
G
271
Posts: 4,471
Reputation: 151,777

Post » Fri Dec 30, 2016 8:15 am

gamecorpstudio wrote:you may want to try tone.js plugin by rexrainbow


it has fft size equilisation and many things more, and you can take the file bindata and use lerp(bin1,bin2,reactiontime) and get a overall volume which im using atm here .

P.S works with any audio file, even with some video files :D


and has also microphone capturing examples around in the libary there @rexrainbow knows better though. i was only interested in the ability to be able to play any format and use the FFT/waveform analyser

Image
@rexrainbow thank you so much. @gamecorpstudio I am so happy to be wrong.

✔️ 0 lag sound file analyzing
✔️ input analyzing
✖️ sound card analyzing
B
52
S
26
G
8
Posts: 121
Reputation: 8,526

Post » Fri Dec 30, 2016 10:12 am

adcornaglia wrote:

✔️ 0 lag sound file analyzing
✔️ input analyzing
✖️ sound card analyzing



??? can you explain what you want to do exactly? i know what you mean, when you say windows system card analyzing ... but you might confuse things... you mean you want to analyze the system speaker? the one that you hear bipping when error or bios is rebooting? cause you cant do that ... that is not a part of the sound card.
B
76
S
22
G
69
Posts: 1,353
Reputation: 43,833

Post » Sat Dec 31, 2016 1:48 am

gamecorpstudio wrote:
adcornaglia wrote:

✔️ 0 lag sound file analyzing
✔️ input analyzing
✖️ sound card analyzing



??? can you explain what you want to do exactly? i know what you mean, when you say windows system card analyzing ... but you might confuse things... you mean you want to analyze the system speaker? the one that you hear bipping when error or bios is rebooting? cause you cant do that ... that is not a part of the sound card.

@gamecorpstudio lol, you're cracking me up. Not the PC speaker good sir. Even if we were say to be talking about the PC speaker, a signal is a signal as far as the analyser is concerned as long as it can receive it.

@rexrainbow is going to solve the last part by updating the Construct 2 plugin wrapper for Tone.js capability to use ExternalInput https://tonejs.github.io/docs/#ExternalInput. Tone.js itself is really only tapping into what's available in the DOM https://developers.google.com/web/updat ... ut-Enabled. @gamecorpstudio you should come checkout the Construct 2 discord channel 🙋.

p.s. I wish my electric potato had a pc speaker, it's great for old dos games.
B
52
S
26
G
8
Posts: 121
Reputation: 8,526

Post » Sat Dec 31, 2016 1:54 am

@adcornaglia

Please download rex_tonejs_api plugin again, here is a sample capx of ExternalInput.getSources.
B
108
S
26
G
271
Posts: 4,471
Reputation: 151,777

Post » Sat Dec 31, 2016 2:40 am

adcornaglia wrote: @gamecorpstudio you should come checkout the Construct 2 discord channel 🙋.

p.s. I wish my electric potato had a pc speaker, it's great for old dos games.


nah discord, been there done that, left it cause most people are focused on their own activity, plus it gets my attention to much, and i tend to be "Sir 'mIRC a lot" and cuts my productivity! i help in forum where i can and when i can, is better this way.

thanks for invite though!
P.S
the audio input post is really interesting, hope its going to be updated, i think i can make use of it in a app or 2! :D lol
B
76
S
22
G
69
Posts: 1,353
Reputation: 43,833

Next

Return to How do I....?

Who is online

Users browsing this forum: Exabot [Bot] and 21 guests