How do I create a Web Audio Oscillator?

0 favourites
  • 2 posts
From the Asset Store
Fully commented source code/event sheet & sprites to create a space shooter game
  • 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:

    // 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
    But I can't seem to find anything that allows me to work with [i]generating[/i] the audio as opposed to affecting samples loaded in. Does anyone know if there's a plugin that allows me to? 
    Thanks in advance!
  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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..

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)