Friday, 14 June 2013

Why we change from LibPD to Kalimba?

Yes, we changed our audio engine - Unity binding. Previously we were using LibPD to bind Pure Data and Unity. And now we are using Kalimba: crash on Unity when we load  the song and use [soundfiler], the audio is still played through Unity which the main reason we use external audio programming to play and manipulate the audio.

We never want to play the song using Unity. Unity made it impossible for us to load the song dynamically. Every song need to be a part of the Assets. Yes, there is an asset in Unity which allow user to load song but we are making student game. We can buy the asset to study. However, that is not the only reason we don't want to play the audio using Unity. On our very first prototype, the audio pitch was off when it is played with Unity and audio pitch is one of main our game feature! Yes, Unity has some audio filter that we like to use: chorus and distortion but they are not enough for our game. The volume level of the distortion is not adjustable! Anyways, there are a lot of reason why we hate using Unity to play the audio and manipulate the audio. 

And the way LibPD bind Pure Data with Unity is by asking unity to route the audio through the filter (which in  this case is LibPD). As I checked in Unity3D scripting reference website, I can make the LibPD play the whole song by assigning an empty AudioSource into the object and still let Unity inserting a custom filter into the audio DSP chain. However, when I tried this doesn't work well. And the problem is still the same: the audio coming from Unity not from Pure Data! So, that's why we switched into Kalimba. So far we had been satisfied with it except for my poor Pure Data knowledge.

No comments:

Post a Comment