How do I create a Web Audio Oscillator?

Get help using Construct 2

Post » Sat Feb 14, 2015 11:13 pm

Hey guys,

I haven't worked much with C2's audio much, but I was just looking at it and it says it supports Web Audio. Now, C2 seems like it has everything WA does except any access to creating an Oscillator. I have prior experience working with WA directly with JS and normally creating an Osc is as simple as something like:

Code: Select all
// create web audio api context
var ctx = new (window.AudioContext || window.webkitAudioContext)();

// create Oscillator node
var osc = ctx.createOscillator();

osc.type = 'square';
osc.frequency.value = 3000; // value in hertz
osc.start();


But I can't seem to find anything that allows me to work with generating the audio as opposed to affecting samples loaded in. Does anyone know if there's a plugin that allows me to?

Thanks in advance!
B
13
S
2
G
1
Posts: 47
Reputation: 1,181

Post » Sun Feb 15, 2015 6:22 pm

Bump. I'm really interested in this. Is there anything out there short of creating my own plugin and digging into the SDK? I suppose I could if I had to, but I'd rather not re-create something im just missing.. :lol:
B
13
S
2
G
1
Posts: 47
Reputation: 1,181


Return to How do I....?

Who is online

Users browsing this forum: tarek2 and 10 guests