Check out our latest project ✨ OpenChapter.io: free ebooks the way its meant to be 📖

AudioStreamPreview

An asset by fbcosentino
The page banner background of a mountain and forest
AudioStreamPreview hero image

Quick Information

0 ratings
AudioStreamPreview icon image
fbcosentino
AudioStreamPreview

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.

Supported Engine Version
4.1
Version String
1.0.0
License Version
MIT
Support Level
community
Modified Date
1 year ago
Git URL
Issue URL

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_preview into your Godot 4.x project

  • Usage:

    • Drop res://addons/audio_preview/AudioStreamPreview.tscn into your scene
    • Set the stream_path property to the path for the audio file you want (must be .wav for now)
    • Profit Done.

If you find the above too complicated, check the example in res://example/audio_preview.tscn.

README


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_progress argument is what it says on the tin: a number between 0.0 and 1.0 (where 1.0 means 100%)

  • generation_completed -> Emitted when the process is completed and the TextureRect is 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

0 ratings

Your Rating

Headline must be at least 3 characters but not more than 50
Review must be at least 5 characters but not more than 500
Please sign in to add a review

Quick Information

0 ratings
AudioStreamPreview icon image
fbcosentino
AudioStreamPreview

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.

Supported Engine Version
4.1
Version String
1.0.0
License Version
MIT
Support Level
community
Modified Date
1 year ago
Git URL
Issue URL

Open Source

Released under the AGPLv3 license

Plug and Play

Browse assets directly from Godot

Community Driven

Created by developers for developers