<<
 
>>
 
 
justin = {main feed = { recent comments, search } , music , code , askjf , pubkey };
 
Music
December 9, 2011
recording at 12m
coucher de soleil
November 13, 2011



2 Comments

yay snow
October 29, 2011

a little early, I admit...

8 Comments

Bread
September 10, 2011

mmmm

2 Comments

Music
September 4, 2011
just woo
woo and the red house
woo and the red house faster
Music
September 1, 2011
woo and the red house
Music
August 17, 2011
brennewt - 1 -- [19:58]
brennewt - 2 -- [26:50]



2 Comments

Music
August 4, 2011
the elles from 110320-110714

Hooray! Thank you to my fine coworkers/coconspirators: Schwa, Christophe, Ollie, White Tie, Geoff, and all of the lovely people who helped test and gave valuable feedback. Schwa and White Tie did a fantastic job on the new web site, too, I must say. <3

Soon after posting the new website (thank you, git, for making that easy), and after grabbing a celebratory coffee, I noticed the web site was a bit slow. The CPU use was low (an Amazon EC2 instance), but on looking at the bandwidth graph I saw it was pushing a ridiculous amount of traffic (presumably saturating the link, even). After mirroring the downloads to a CDN (CloudFront), all was well. Thank you, Amazon. I'm very impressed with AWS/EC2/etc. It's good stuff.

8 Comments

Music
July 27, 2011
louie - 1 -- [12:27]
louie - 2 -- [4:07]
louie - 3 -- [3:21]
louie - 4 -- [3:05]
louie - 5 -- [3:03]
louie - 6 -- [16:11]
louie - 7 -- [3:15]
louie - 8 -- [6:14]
louie - 9 -- [6:09]
louie - 10 -- [5:56]

OK maybe after cherry season.

2 Comments

Music
July 22, 2011
freeform jam with louie
Fun with denormals
July 14, 2011
Something that often comes up when writing audio applications are things called "denormals". These are floating point numbers that are very small, so small in fact that for some reason CPU designers think they are quite rare (OK so they are), so the circuitry that processes them is very slow, when compared to that of a "normal" sized number.

If you read that (awful) explanation, and didn't understand it or care, I apologize, you can stop reading now because it will only get more boring and less intelligible.

We have made some common code to filter out these numbers, as many others no doubt have done:
// boring code omitted, see WDL/denormal.h for the full code
// WDL_DENORMAL_DOUBLE_HW() is a macro which safely gets you the high 32 bits of a double as an unsigned int.

static double WDL_DENORMAL_INLINE denormal_filter_double(double a)
{
  return (WDL_DENORMAL_DOUBLE_HW(&a)&0x7ff00000) ? a : 0.0;
}
The above code pretty simply looks at the exponent field of the double, and if it is nonzero, returns the double, otherwise it returns 0.

Recently it came to our attention that we actually needed to filter out larger numbers as well (when sending those numbers through a process such as a FFT, they would end up as denormals). If we pick a number around 10^-16 (not being picky about the exact cutoff), which has an exponent of 0x3C9, we can choose to filter when the expoenent field is under that value:
static double WDL_DENORMAL_INLINE denormal_filter_double_aggressive(double a)
{
  return ((WDL_DENORMAL_DOUBLE_HW(&a))&0x7ff00000) >= 0x3c900000 ? a : 0.0;
}
That was pretty much free (ok slightly larger code, I suppose). One nice thing that became apparent was that we could filter NaN and infinity values this way as well (exponent == 0x7FF), with only the cost of a single integer addition:
static double WDL_DENORMAL_INLINE denormal_filter_double_aggressive(double a)
{
  return ((WDL_DENORMAL_DOUBLE_HW(&a)+0x100000)&0x7ff00000) >= 0x3cA00000 ? a : 0.0;
}
Note that the exponent is increased by 1, so that 0x7FF becomes 0, and we adjusted the cutoff constant for the change.

An extra thought: if you need to pick the cutoff number more precisely, you could change the mask to 0x7fffffff and the cutoff (0x3cA00000) to include some of the fraction digits...

Additional reading: IEEE_754-1985.

Oh and happy bastille day!

3 Comments
$50 of fun
July 9, 2011

A small r/c car, led lights, and wireless camera.

Comment...

Music
July 1, 2011
louie - 1 -- [9:35]
louie - 2 -- [3:35]
louie - 3 -- [7:40]
louie - 4 -- [10:27]
louie - 5 -- [14:21]
louie - 6 -- [5:36]
louie - 7 -- [4:50]
louie - 8 -- [2:37]
louie - 9 -- [12:23]
Music
June 29, 2011
louie - 1 -- [3:02]
louie - 2 -- [4:00]
louie - 3 -- [5:22]
louie - 4 -- [3:18]
louie - 5 -- [5:12]
louie - 6 -- [6:28]
louie - 7 -- [7:28]
louie - 8 -- [3:30]
louie - 9 -- [2:47]
louie - 10 -- [3:55]
louie - 11 -- [4:44]
louie - 12 -- [4:15]
louie - 13 -- [3:08]
louie - 14 -- [2:59]
Spotted last month
June 27, 2011

Al thought this would make a good picture.

3 Comments

I have this dream
June 16, 2011

where I'm flying through space
hoping there are no power lines

2 Comments

s/incredible/sleepy/
Yawn:



Comment...

Music
June 5, 2011
bren - 1 -- [12:46]
bren - 2 -- [13:05]
Lots of people
May 18, 2011

I am not at a Pink Floyd concert.

Comment...

Reading this piece from the New Yorker about the Mississippi River from 1987 (at schwa's recommendation). I wish it had pictures, but wow.

Comment...



Comment...

...are now so distant...

Comment...

search : rss : recent comments : Copyright © 2025 Justin Frankel