Soundfiler not supported? alternative?
How can i open an audio file without soundfiler? there is anything that can replace it?
HI @AndrelMedo. We don't support soundfiler because reading audio assets is inevitably a very platform- and framework-dependent operation. In general, you can load audio assets into tables and play them using a tabread~ object. You can do it like this in Unity. You can do the same thing using the C API as well.
What exactly are you trying to accomplish with Heavy?
hey, I'm still learning the basics of pd, but all the documentation/tutorials I can find regarding tables and samples etc, seem to use soundfiler. Can you point to an example of how to do this without soundfiler?
For context; I'm attempting to load a significant number of samples into a patch and then trigger them with different types of cues.
@Latimark What system are you trying to accomplish this on? As I wrote above, we don't support soundfiler because every platform has it's own may of dealing with samples. But we always provide a way to access the tables from outside of the patch.
This is going to be on PCs with a VR setup built in unity
wait i kind of understand now - I have to place a bunch of empty tables in my patch then fill them from a script in unity?
Hey @Latimark are you using Unity? Fabric? Wwise?
In general to you can specify a [table] object in your patch to be accessible from the frameworks it's integrated into by using the @hv_table descriptor.
For example if you have [table myTable 100 @hv_table], you'll be able to fill it with an audio file when the patch get's loaded. Though this depends on which framework you're using.
As example for Unity see the documentation on accessing tables https://enzienaudio.com/docs/index.html#06.unity#accessing-audio-tables
In the above case you would create a script that would contain some code like:
public class MySampleLoader : MonoBehaviour {
public AudioClip _clip; // attach a sample in the editor
private Hv_sine_AudioLib _audio;
void Start() {
_audio = GetComponent<Hv_sine_AudioLib>();
_audio.FillTableWithMonoAudioClip("myTable", _clip);
}
}
wait i kind of understand now - I have to place a bunch of empty tables in my patch then fill them from a script in unity?
Yes exactly. It is possible to save the contents of the audio file directly into the pd patch before uploading it to heavy but this is discouraged over the @hv_table approach. Also the upload size limit 1MB to our servers.
awesome! this method actually solves a lot of problems~ thanks!
what's the best way of handling table resizing within the patch?
Are you using the default Unity audio system?
If so, currently the best way would be to create a @hv_param for your table size update.
After loading the table call something like this:
_audio.SetFloatParameter(Hv_{{patch_name}}_AudioLib.Parameter.myTableSizeParam, _clip.samples/_clip.channels);