Skip to content

Utilities

Georgy Treshchev edited this page Mar 23, 2024 · 17 revisions

To obtain basic audio header information (metadata) from audio data, consider using the following functions as they are more cost-effective than the full process of importing the audio into a sound wave.

Get Audio Header Info nodes


To manually determine the audio data format, you have two options. The first is based on file extension recognition, while the second method involves analyzing the audio data, which is more accurate but requires loading the audio data into memory. Note that the process is automatically performed during the import stage, so manual intervention is not necessary.

Get Audio Format nodes


You can use the OnGeneratePCMData delegate to obtain PCM data as the sound wave plays. This is useful when processing or analyzing the PCM audio data.

On Generate PCM Data delegate


The OnPopulateAudioData delegate can be used to obtain newly populated PCM data, which is particularly useful for streaming sound waves and can simplify the audio analysis process.

On Populate Audio Data delegate


The OnPopulateAudioState delegate functions similarly to OnPopulateAudioData but doesn't broadcast the populated audio data. This can be useful when you want to track when the audio data is populated without passing an array of the populated audio data, which can improve performance.

On Populate Audio State delegate


You can scan a directory, with the option to search recursively, for audio files. The resulting string array will contain the paths of the audio files, which can be imported.

Scan Directory For Audio Files


This function can convert seconds (e.g., playback time) into either the hh:mm:ss or mm:ss format string, depending on the length.

Convert Seconds To String node