MSC3246: Audio waveform for extensible events#3246
Open
turt2live wants to merge 5 commits intoold_masterfrom
Open
MSC3246: Audio waveform for extensible events#3246turt2live wants to merge 5 commits intoold_masterfrom
turt2live wants to merge 5 commits intoold_masterfrom
Conversation
erkinalp
reviewed
Jun 16, 2021
uhoreg
reviewed
Jun 29, 2021
turt2live
commented
Dec 7, 2021
Member
Author
|
Note that this has now been rescoped to just waveforms, with @uhoreg's comment about range being unresolved at the moment. |
julioromano
pushed a commit
to element-hq/element-x-android
that referenced
this pull request
Oct 27, 2023
[MSC3246](matrix-org/matrix-spec-proposals#3246) specifies the waveform as a list of ints because: > Because floating point numbers are not allowed in Matrix events Though DSP on audio data is almost always done using their floating point representation. This PR brings the float<->int rescaling in the `matrix` module so that the application code can always work with float waveform samples.
zecakeh
reviewed
Sep 27, 2025
Comment on lines
+12
to
+16
| Under the `m.audio_details` content block, a new optional field named `waveform` is added. It is | ||
| an array of (non-floating) numbers to represent the amplitude of the audio over time. Because | ||
| floating point numbers are not allowed in Matrix events, integers should be between 0 and 256, | ||
| inclusive. Though there is no limit to the number of entries in the array, senders should aim to | ||
| have at least 30 and not more than 120. |
Contributor
There was a problem hiding this comment.
I believe that the way that the waveform is computed should be specced, otherwise different clients might generate different waveforms for the same audio file, which defeats the purpose of this field.
This is already the case with Element Web and Element X Android that generate waveforms with very different values.
poljar
reviewed
Oct 1, 2025
|
|
||
| Under the `m.audio_details` content block, a new optional field named `waveform` is added. It is | ||
| an array of (non-floating) numbers to represent the amplitude of the audio over time. Because | ||
| floating point numbers are not allowed in Matrix events, integers should be between 0 and 256, |
Contributor
There was a problem hiding this comment.
Is this the unsigned 8-bit integer PCM sample format?
SpiritCroc
pushed a commit
to SchildiChat/schildi-revenge
that referenced
this pull request
Nov 25, 2025
[MSC3246](matrix-org/matrix-spec-proposals#3246) specifies the waveform as a list of ints because: > Because floating point numbers are not allowed in Matrix events Though DSP on audio data is almost always done using their floating point representation. This PR brings the float<->int rescaling in the `matrix` module so that the application code can always work with float waveform samples.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rendered
See #3245 for implementations (Element Web/Desktop, currently).