Audio Engine Enhancements - Soren / paulidis?

This is somewhat related to some questions paulidis and soren christensen were discussing…

My primary target for these features is Android… also want PC/Mac… iOS if possible.

Here is what I need (How do I accomplish this, either thru hiring Soren to add this functionality or adding it myself - how?)

(The current audio implementation in Unity is close to what I need… would hate to have to start over for a few features, but please advise on how I would if that is the only solution… how to ‘play nice’ with unity audio)

  • Loading of User MP3/WAV tracks on the user’s device/HDD (this may or may not be possible on iOS… current focus is Android… also want PC/Mac)

  • Integration of the SoundTouch pitch shifting library
    SoundTouch Sound Processing Library
    which allows slowing down while retaining key
    (this is an ‘out-of-time’ filter… meaning it must read 1024 bytes to yield 512 or 1024 bytes, depending on speed of playback)
    (would also prefer to have access to this implementation for possibly swapout with another pitch shifting algorithm at a later date)

  • Integration of custom effects
    I love the audio effects already in Unity… don’t want to lose them… but also want direct access for ‘in-time’ filters… basically, you hand my ‘plugin’ a buffer and I mess with it before passing it on.

  • Low enough latency to allow for ‘scratching’ via touchscreen or external device(on PC/Mac). Basically, need to be able to update the playback rate fast enough for changes between every audio buffer being filled.

So… How to accomplish?

A) Soren?.. any chance of working with you to get these features into your Unity audio engine?

B) Disable Unity Audio (needed?) and write my own Audio Engine… how for Unity Android? (not how to write the audio code… I can do that if needed… how to integrate properly with Unity?)

Cheers!
:slight_smile:
Sumner

Hi,

Loading of User MP3/WAV tracks on the user’s device/HDD (this may or may not be possible on iOS… current focus is Android… also want PC/Mac).
Look at WWW class. With that you can load MP3s/WAVs/Tracker from URIs (http://, file:// …)

The rest is depending on audio buffer access, which we’re working on.

No need to disable Unity Audio. You should be able to run another sound engine side-by-side and Unity’s engine doesn’t use any (noticable) resources, when nothing is playing/processed.

Thanks, Soren… appreciate the quick response.

As I’m scheduling this project now, but I know it won’t be complete for a few months, I’m wondering 2 things:

  1. When, roughly, is audio buffer access planned to be complete (1 month? 1 year?)… I know you are not promising… but trying to decide if it is better to wait or start writing my own audio engine?
  2. Would audio buffer access also allow me to control the READ amount? SoundTouch works by letting me read 1024 bytes when my audio buffer is 512 bytes if the music is at 200% speed… additionally, it doesn’t calculate exactly… so mostly, you end up reading something like 1051 bytes and then using the first 1024, etc. ‘In Place’ or ‘In Time’ audio buffer access where you provide just the already read audio buffer and expect me to give back the same size would not work for this.

Thanks Again!!! :slight_smile: Sumner

Also - I see High Pass and Low Pass Filters… any chance of getting a Band Pass Filter (of course, could write my own with audio buffer access… but you did a good job on the HP and LP… thinking a BP would be easy to add?)

this is hard core stuff. ive done about a year’s worth of research and spent close to 10 grand solving the problem. this is my experience.
im making a mobile dj game involving scratching records (latency has to be minimal: < 8ms ). I also include effects.

i began developing before unity 3 so the sound engine was lacking. unity 3’s audio engine upgrade suits my needs in terms of interfacing with audio except for one thing - it is too slow on iphone. so i hired a company in russia to make a custom audio engine in iOS. they are expensive but worth it. the job is being completed as we speak. the functionality matches that of unities but with the difference it being as fast as possible for ios.

this means no support for anything not iOs. which is a bummer. so staying within unity would be the ultimate approach. but its not possible and wont be possible for a while. so when this library is complete i’ll be putting it on the unity app store… and it wont be cheap after all the misery this challenge faced me.

this is hard core stuff. ive done about a year’s worth of research and spent close to 10 grand solving the problem. this is my experience.
im making a mobile dj game involving scratching records (latency has to be minimal: < 8ms ). I also include effects.

i began developing before unity 3 so the sound engine was lacking. unity 3’s audio engine upgrade suits my needs in terms of interfacing with audio except for one thing - it is too slow on iphone. so i hired a company in russia to make a custom audio engine in iOS. they are expensive but worth it. the job is being completed as we speak. the functionality matches that of unities but with the difference it being as fast as possible for ios.

this means no support for anything not iOs. which is a bummer. so staying within unity would be the ultimate approach. but its not possible and wont be possible for a while. so when this library is complete i’ll be putting it on the unity app store… and it wont be cheap after all the misery this challenge faced me.