Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Sumner · May 31, 2011 at 03:54 PM · androidaudiomp3

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 http://www.surina.net/soundtouch/ 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! :) Sumner

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

4 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by Sren Christiansen · Jun 01, 2011 at 02:05 PM

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.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Sumner · Jun 01, 2011 at 02:28 PM

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!!! :) 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?)

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by paulidis · Oct 06, 2011 at 08:19 AM

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.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by paulidis · Oct 06, 2011 at 08:19 AM

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.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Android play mp3 file 0 Answers

Playing mp3 files on Android 1 Answer

record sound and save to mp3 in android 1 Answer

Loading Audio Files at Runtime for Playback and Processing 1 Answer

Which AudioClip formats will decompress using hardware? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges