WaveForm
A downloadable thingy
Download NowName your own price
WaveForm is a native GML script that lets you read audio peaks from an audio buffer, which you can use to render a waveform.
audio_calculate_peaks(buffer, format, resolution)
- Returns an array of normalized (0-1) peaks from a given buffer of audio data. Format must be eitherbuffer_u8
orbuffer_s16
(the only formats that GameMaker supports for audio buffers). Resolution is given as a percentage of the total amount of data. For most audio buffers this number should be VERY small, even as small as 0.2. Larger numbers can cause some lag, since audio buffers are quite large.audio_get_peak_at_track_position(peaks, sound)
- Returns the peak at the current track position, using a peaks array previously made with calculate_peaks. This is useful if you want to know (roughly) what the current volume is.
Note that some changes in resolution will not always render a visible difference in peaks, since some percentages won't evenly divide a buffer and must be floored. Included in this extension is an object containing a complete example, including recording audio from your microphone and rendering a waveform on screen with a visible playback head.
Status | Released |
Category | Other |
Author | topherlicious |
Tags | GameMaker |
Download
Download NowName your own price
Click download now to get access to the following files:
WaveForm.yymps 9.6 kB
Version 1.0.1
Leave a comment
Log in with itch.io to leave a comment.