-
Notifications
You must be signed in to change notification settings - Fork 411
MSC3246: Audio waveform for extensible events #3246
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: old_master
Are you sure you want to change the base?
Conversation
Note that this has now been rescoped to just waveforms, with @uhoreg's comment about range being unresolved at the moment. |
[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.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
|
||
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, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the unsigned 8-bit integer PCM sample format?
Rendered
See #3245 for implementations (Element Web/Desktop, currently).