Skip to main content

Timeline for Precision-related error in Audio

Current License: CC BY-SA 4.0

19 events
when toggle format what by license comment
Jun 19, 2018 at 19:22 comment added Daniel W @chuy and You were correct after all, "Real" did fix the problem, if it is typed in correctly, which I did not when testing it. The rounding problem, however, is an actual bug. I just missed getting an earlier solution by not typing carefully.
Jun 19, 2018 at 19:18 answer added Daniel W timeline score: 2
Jun 19, 2018 at 19:08 history edited Daniel W CC BY-SA 4.0
added bug tag and header
Jun 12, 2018 at 0:11 comment added halirutan @DanielW After you get an answer from Wolfram acknowledging that this is a bug, please feel free to add the [bugs] tag. Additionally, it would be awesome if you edit your question then and include a "bug header" at the very top like in this question.
Jun 10, 2018 at 2:57 review Close votes
Jun 12, 2018 at 0:11
Jun 7, 2018 at 23:20 history tweeted twitter.com/StackMma/status/1004865677340106752
Jun 7, 2018 at 18:41 comment added MarcoB As @chuy mentioned, this may be OS and version-dependent. With your code above I get some 0.5, some 0.25. The problem goes away entirely if I use Audio[..., "Real"].
Jun 7, 2018 at 17:37 comment added Daniel W @MarcoB Integers. There may be others, but it seems to happen for all n in the Integers. First[AudioData[Audio[Sin[(25.*Pi)/6 + Range[-10, 10]*Pi]]]] gives a list of +-.0.25.
Jun 7, 2018 at 16:40 comment added MarcoB @DanielW for what values of n do you get the problem?
Jun 7, 2018 at 14:53 comment added Daniel W @MarcoB it only happens at specific frequencies for specific sample rates. There appears to be something special about Sin[(25.*Pi)/6 + n*Pi].
Jun 7, 2018 at 14:30 comment added chuy This might be OS dependent. In[104]:= AudioData[Audio[a], "Real32"] Out[104]= {{0.5, 0.5, 0.5, 0.5, 0.25, 0.25}} is what I get using 11.3 on Windows.
Jun 7, 2018 at 14:14 comment added MarcoB @DanielW Thank you! v. 11.2 works fine (output), so the problem seems to have been introduced to 11.3.
Jun 7, 2018 at 14:11 comment added Daniel W @MarcoB Good suggestion, done.
Jun 7, 2018 at 14:10 history edited Daniel W CC BY-SA 4.0
Added code to generate jagged sine wave
Jun 7, 2018 at 14:02 comment added MarcoB I appreciate that you made a minimal example, but could you include the actual code that generated the sinewave with the jagged teeth as well? I can't reproduce it with simply First@AudioData@Audio@Table[Sin[x], {x, 0, 10, 0.1}] // ListLinePlot.
Jun 7, 2018 at 14:01 history edited MarcoB CC BY-SA 4.0
Formatted code so it is easier to copy
Jun 7, 2018 at 13:59 comment added Daniel W @chuy Thanks for the suggestion, but nope. I tried all available type settings, and the last two are always half the value of the first 4.
Jun 6, 2018 at 20:47 comment added chuy By default Audio uses 32 bit maybe try AudioData[Audio[a, "Real"]]?
Jun 6, 2018 at 15:16 history asked Daniel W CC BY-SA 4.0