- Home /
Audiosurf Visualization
Hello,
Audiosurf is a game that creates a individual road by a music track. my question is: how can I do this too? how can i create a dynamic road by using mp3 audio files?
i hope you know what i mean!
If code: C# 'd be nice.
Answer by hbalint1 · Apr 21, 2015 at 08:57 AM
Here are some examples to visualize a song: http://gamedevelopment.tutsplus.com/tutorials/how-to-use-sound-to-make-3d-geometry-in-unity--cms-20456
you should make something like the Line Visualizer, but in 3d, so give some depth to it. After that you can scale it up, or scale your character down, and your map is 'almost' ready.
that looks very nice thank you! now i just have to look how i can ... lets say "smoothen" the roads.
btw: another problem is to create the road. i'm not very good in creating meshs by code is there something that can help me?
Sorry I'm not into it either. $$anonymous$$aybe this can be a starting point: http://docs.unity3d.com/ScriptReference/$$anonymous$$esh.html For smoothing you could write sampling, maybe it's in the visualizer methods, and you don't draw all the frequence, just an average. Anyway if you are managed to do that I'm also interested in it :D
i know this one already... i mean you know if i want to draw a curve mesh i have to generate ... well.. $$anonymous$$ANY $$anonymous$$ANY vertices >.> very many... countless! i mean to make a simple pyramid you need about 9 vertices !! thats just sick! think about it when you need a road where you can let a car run 5 $$anonymous$$utes... must be about 200.000 vertices
yes. i read on a forum, that you should do it partially, because the info you get from the audio, gives you more than 10million floats and crash your PC. So somehow you sould get the $$anonymous$$imum sample, like 10 seconds from the audio, draw it, then clear everything.
maybe... or you take a more precisely sample like 1s or 0.5s and calculate the average and use this one... or you take the maximum... because it'd be good if the user sees that the road builds depending on the music. it should be really a project to do this i hope i'll get ready in time with this. 'cause its our project in university
Answer by Rouge Digital · Jul 03, 2016 at 09:45 PM
I maid an Asset play mp3's into a audiosource, it works on Win, Max, Linux, iOS, android...
It works for local mp3 files and web streams.
Asset - uAudio: Mp3 Player/Streamer
Your answer
![](https://koobas.hobune.stream/wayback/20220613193641im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Android play mp3 file 0 Answers
Distribute terrain in zones 3 Answers
Multiple Cars not working 1 Answer
Is OnAudioFilterRead Still the Preferred Method for Procedural Audio? 0 Answers
Procedural generated mesh problem 1 Answer