Install Asset
Install via Godot
To maintain one source of truth, Godot Asset Library is just a mirror of the old asset library so you can download directly on Godot via the integrated asset library browser
Quick Information
Renders a waveform preview of a .wav file as the texture of a TextureRect. It's a @tool so it works even inside the editor.To use, just drop res://addons/audio_preview/AudioStreamPreview.tscn in a scene and set the stream_path property.Simple example included.
AudioStreamPreview
Godot Plugin to show a waveform in a TextureRect. It's a @tool so it works even inside the editor.
Works asynchronously without using threads (so it's always thread-safe and stable), by using await for frames instead.
Installation: just download the
addons/audio_previewinto your Godot 4.x projectUsage:
- Drop
res://addons/audio_preview/AudioStreamPreview.tscninto your scene - Set the
stream_pathproperty to the path for the audio file you want (must be.wavfor now) ProfitDone.
- Drop
If you find the above too complicated, check the example in res://example/audio_preview.tscn.
Signals
The preview generation happens asynchronously, so the signals below can be used to track the process (once started it can't be aborted).
You don't have to use any signals, they are there just for convenience.
generation_started -> Emitted when the preview generation process starts
generation_progress(normalized_progress) -> Emitted periodically to inform about the progress (e.g. to update progress bars). The
normalized_progressargument is what it says on the tin: a number between0.0and1.0(where1.0means 100%)generation_completed -> Emitted when the process is completed and the
TextureRectis now showing the preview
Renders a waveform preview of a .wav file as the texture of a TextureRect. It's a @tool so it works even inside the editor.
To use, just drop res://addons/audio_preview/AudioStreamPreview.tscn in a scene and set the stream_path property.
Simple example included.
Reviews
Quick Information
Renders a waveform preview of a .wav file as the texture of a TextureRect. It's a @tool so it works even inside the editor.To use, just drop res://addons/audio_preview/AudioStreamPreview.tscn in a scene and set the stream_path property.Simple example included.