<<>>open webamp
 
justin = {main feed = { recent comments, search } , music , code , askjf , pubkey };
 
Music
October 18, 2008
freeform jam with josh
Music
October 15, 2008
post grump
Music
October 11, 2008
freeform jam with brennewtbider
Music
October 3, 2008
freeform jam with schwa
stumbling in code
October 1, 2008
So while playing with some code to model a resonating spring (F=-k*pos), I discovered that the model I was using produced a very good sine wave approximation. This isn't normally something terribly interesting, as you can approximate sine/cosines very easily, but it was actually quite low complexity -- an iterative approximation with only 2 multiplies and 3 adds per sample. It can also generate the cos() (well, a 90 degree shifted signal) for each point for just one additional multiply.

The error is pretty low for the first few cycles, though after a bit it does drift in relation to the correct wave. I'm not going to spend too much more time on this, but if anybody wants to see if there's some way to correct it, go for it (it may just be rounding error, though, of course).

Here is the code:

Ta-da! If anybody wants to go and do some fancy pants math to show why this works, too, I'd love to hear it... :)



3 Comments

Music
September 28, 2008
freeform jam with brennewtjoshdan
Music
September 27, 2008
brenjoshdan - 1 -- [6:52]
brenjoshdan - 2 -- [54:06]
brenjoshdan - 3 -- [26:31]
Music
September 16, 2008
freeform jam with brennewt and solo
Music
September 8, 2008
kerosene new rough
mobile update
September 6, 2008

Another tag, yay

Recordings:

kerosene

7 Comments

Come on, sf dpw
September 3, 2008

Time to request a hearing, as I do not have any "graffiti" but they seem to think I do....

7 Comments

Music
August 23, 2008
brennewt - 1 -- [45:23]
brennewt - 2 -- [42:25]
After 18 hours
August 21, 2008

The smiley face was me...

Recordings:

bren - 1 -- [23:55]
bren - 2 -- [25:42]
bren - 3 -- [32:27]

5 Comments

Front door
August 20, 2008

We'll see if this works-- both with the kids and with the city...

7 Comments

(note the car #)

8 Comments

cures for jet lag:
August 2, 2008

The 3 Cs: caffeine, calories, and cocktails... Of course you need the right amount of all, and the right sequencing, but if you get that all is forgiven.

And days like this don't hurt either...

2 Comments

Spring Cleaning
July 28, 2008

Found my laptop with ergonomic keyboard!

Recordings:

freeform jam with newtchr

1 Comment

I love PHP
July 25, 2008
Can I just say it? It's such a great tool. I know, I know, it's for web pages, you say.. But I've been using it for tasks people would use perl for, and it's great. Converting Windows .rc files into SWELL-able C++, converting at&t assembly syntax to intel syntax for Jesusonic, such great things. Hooray for PHP. Easy to install on Win32 (just unzip), comes on OS X, it's a good time. A+.

Thank you that is all.

Recordings:

freeform jam with chr

2 Comments

Music
July 23, 2008
brenchr - 1 -- [79:16]
brenchr - 2 -- [25:26]
Music
July 20, 2008
brenbidernewt - 1 -- [8:10]
brenbidernewt - 2 -- [104:38]
brenbidernewt - 3 -- [30:29]
Music
July 9, 2008
freeform jam with brennewt
Cubs vs Giants
July 3, 2008

Still hot out, for now.. Time to shotgun a contraband Bud Lite in the bathroom...

3 Comments

Music
June 25, 2008
bren - 1 -- [44:15]
bren - 2 -- [15:40]
Rad toy
June 23, 2008

Woohoo the tiny maudio ekeys 37, $49, arrived... It's small, and light.

3 Comments

Music
June 19, 2008
demarcate
REAPER at Bonnaroo
June 15, 2008

(thanks to Matt @ Open Labs)

7 Comments

best wallpaper ever
June 14, 2008

(courtesy the Hilton Sonoma Wine Country Inn in Santa Rosa)

1 Comment

this was in may
June 14, 2008

(and it ruled)

Comment...

milton, MA
June 14, 2008


"My friend Will, he's wicked smart."



Comment...

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