Jump to content

[OGG-JSON] Audio preprocessor with HTML5 Web audio API.


Morgondag
 Share

Recommended Posts

I made a Audio preprocessor with HTML5 Web audio API.
Throw this into a node-webkit application add a ogg sound file and it will return a json with the processed data.

https://github.com/morgondag/preprocess

Keep in mind that this implementation is based on the RequestAnimationFrame so need to tweak if if you have another FPS in your game.

 

I use this in a prototype mobile game where that part of the web audio API is not available in order to create rhythm based gameplay.

 

The node-webkit part is just there to make use if the filesystem.

:D

Link to comment
Share on other sites

Maybe this should be posted in the audio subgroup. 

Updated to support timestamp instead of just an array so it can be used for a "fuzzy" framerate-independent gameloop.
Basically you can check musics currentTime against the preprocessed object timestamp.
And normalised to regular array data instead of Uint8Array.

Using this myself for a HTML5 based iphone game.

Link to comment
Share on other sites

Very nice! This could definitely come in handy.

 

It would be nice if there was a functional web-based version in addition to the node-webkit version. I tried using 5minfork.com on the repo, but didn't get json output from the inputted ogg-file...

 

You could actually use the html file in Chrome.

it's using the webkitAudioContex so you could just rewrite the saving part, for that part i'm using node.js FS module(for filesystem saving)

You will need some serverside logic for that.

Using it for a small iOS game based on rythm right now. this gif is at half framerate thought. 

stuff spawns/active/animate based on the snare drum.

rythm.gif

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...