5
$\begingroup$

Bug introduced in 10.0.0 and fixed in 10.1.0


I tried this with a clean start and no documents loaded. Now, evaluating the following on the documentation page for LowpassFilter:

snd = Sound @ 
   SampledSoundList[
     Table[Sin[2 π 697 t] + Sin[2 π 1209 t], {t, 0., 0.3, 1/8000.}],
     8000
   ]

LowpassFilter[snd, Quantity[ 953, "Hz"]]

instead of a nice new Sound object, I get this:

ArrayPad::mlens: Padding amount {Floor[0.5 Signal`FiltersDump`n$1741],
    Floor[0.5(-1+Signal`FiltersDump`n$1741)]} should be an integer, pair of integers, 
    or list of pairs of integers. >>

ArrayPad::arr: First argument Signal`FiltersDump`oDigitalFilterData1D[LowpassFilter,
    <<3>>,Array[HammingWindow,Signal`FiltersDump`n$1741,{-0.5,0.5}]] to ArrayPad 
    should be an array. >>

followed by roughly (I edited the input & output to reduce the size of the data)

Sound[{SampledSoundList[{Signal`FiltersDump`oDigitalFilterData1D[
 LowpassFilter, 
 ArrayPad[{0., 1.33364, 1.83545, 1.28623, 
   0.204099, -0.605835, -0.695412, -0.281141, 
   0.0219384, -0.207089, -0.794197, -1.1108, -0.63945, 0.519717, 
   <<lots of real numbers>>
   0.971609, -0.38612, -1.28218, -1.26141, -0.589762, 0.0407067, 
   0.128459, -0.225712, -0.453836, -0.0750029, 0.817827, 1.57015, 
   1.48617, 0.43, -1.00055, -1.89035, -1.68989, -0.617834, 
   0.536702}, 
{Floor[0.5 Signal`FiltersDump`n$11067], 
       Floor[0.5 (-1 + Signal`FiltersDump`n$11067)]}, "Fixed"], 
 0.119125, Signal`FiltersDump`n$11067, 
     Array[HammingWindow, Signal`FiltersDump`n$11067, {-0.5, 0.5}]]}, 
 8000]}]

The next v10 example does compute a result, but it is not the same as that shown in the documentation:

LowpassFilter[snd, Quantity[ 953, "Hz"], 100, BlackmanWindow]

These examples are missing from v9; and the examples that are copied over from v9 such as

input = ExampleData[{"Sound", "Apollo11ReturnSafely"}]
LowpassFilter[input, Quantity[3000, "Hertz"]]

suffer from the same problems (in fact there has been a change here, with Quantity[3000, "Hertz"] replacing 2 Pi 3000). Quantity is built-in with v10, right? So this should work out of the box.

Do other folk get the same issues? Or is it something to do with my setup? I'm on OS X 10.9.5 Mavericks, Mathematica 10.0.1

I raised a query with Wolfram support and they replied: "I have filed a bug report with the development team for this issue. LowpassFilter should be working with Units. Thank you very much for giving us feedback and hopefully this issue would be improved in future release."

[Note: towards an answer; if I use Times[3000, 2 Pi] instead of Quantity[3000, "Hertz"] all matches up nicely]

$\endgroup$
  • $\begingroup$ I also see these issues (Mma v10.0.1 on Mac OS X 10.10.1). $\endgroup$ – Bob Hanlon Dec 1 '14 at 15:25
  • $\begingroup$ I've submitted a bug report, waiting for confirmation; though it is perhaps only a documentation bug $\endgroup$ – fairflow Dec 2 '14 at 13:26
  • 2
    $\begingroup$ Confirmed as a bug by Wolfram support. $\endgroup$ – fairflow Dec 10 '14 at 16:18
  • $\begingroup$ Fixed as of version 10.1.0. $\endgroup$ – ilian May 6 '15 at 20:48
5
$\begingroup$

To convert my comment into an answer, this bug has been fixed as of version 10.1.0.

Mathematica graphics

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.