bugGNU Octave - Bugs: bug #58081, Clipping of samples in octave...

 
 

bug #58081: Clipping of samples in octave audiowrite function differs from matlab

Submitter:  None
Submitted:  Mon 30 Mar 2020 11:19:11 AM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Matlab Compatibility
Status:  None Assigned to:  None
Originator Name:  T Herzke Originator Email:  -email is unavailable-
Open/Closed:  * Open Release:  * 5.2.0
Operating System:  * GNU/Linux Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 30 Mar 2020 11:19:11 AM UTC, original submission:  

Audio .wav files can contain audio samples in floating point format, e.g. 32 bit single precision floating point.

When saving octave/matlab data to .wav files as floating point data, then there is no need to clip audio samples exceeding the range -1..+1. Matlab does not apply clipping in this case but octave does. Please fix behaviour in octave. Steps to reproduce:

samples = [0.5;2;0.5];
audiowrite('/tmp/samples.wav',samples,44100,'BitsPerSample',32)
samples2 = audioread('/tmp/samples.wav')

Matlab prints the original values for samples2
   0.5000
   2.0000
   0.5000

while the same code executed in octave shows that the input sample 2 was clipped to 1:
   0.50000
   1.00000
   0.50000


I have compared Matlab 2020a against Octave 5.2.0, both on Linux.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code