<< >>
justin = { main feed , music , code , askjf , pubkey };recent comments
search
[ present ... 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 ... past ]
December 29, 2008
Lame, so lame

But I fixed it...

Comment...


December 21, 2008
Music
biderman - 1 -- [29:49]
biderman - 2 -- [17:54]


December 20, 2008
Music
brencrypto - 1 -- [124:17]
brencrypto - 2 -- [2:39]


December 3, 2008
Zoom H2 modding complete

Now with 4 XLR inputs on a breakout cable, and the stock mics wired to their own XLR plug:



Note that the stock mics should not work on anything other than a Zoom H2, since they need approx 1.9v apparently. 48v phantom power might work, but I'm not going to risk frying them...



2 Comments


December 2, 2008
Zoom H2 modding

I opened my Zoom H2 up, removed the 4 mics, connected the wires to a 9 pin serial connector, and put it back together...

Here it is in a picture with the original mics connected to a DB9 plug via speaker wire (it's proof of concept, hey, I know this is crappy).



I'm going to make a DB9 plug to 4x XLR breakout cable today. There is no phantom power (just a piddly 1.9v or so), so it'll have to be used with dynamic mics, but the preamps seem to work fine with the SM57 I have here. Also need to figure out where to connect the XLR's pin 1 (well, it'll go to the DB9 casing, but then on the inside the H2 will need to find a good place to ground that).

If only the (otherwise awesome) ASIO driver supported 4ch input!

1 Comment


November 24, 2008
Music
freeform jam with dancraig


November 15, 2008
Music
prehoof_brennewtcrypto - 1 -- [13:17]
prehoof_brennewtcrypto - 2 -- [22:11]
prehoof_brennewtcrypto - 3 -- [6:57]


November 13, 2008
Music
brennan - 1 -- [30:02]
brennan - 2 -- [11:43]


November 9, 2008
Music
brennewt - 1 -- [28:41]
brennewt - 2 -- [61:21]
brennewt - 3 -- [56:07]


November 1, 2008
Music
newtbiderman - 1 -- [54:32]
newtbiderman - 2 -- [9:31]
newtbiderman - 3 -- [33:28]


October 30, 2008
Music
bren - 1 -- [31:47]
bren - 2 -- [39:23]


October 25, 2008
ah, 1997. or: nostalgia

So in 1996 and 1997 I wrote a 3D library called Plush. Here is a screenshot from then:

It was written in C, it tried to be very portable (reading through it now, I'd say almost to a fault -- kinda annoying ;). There were some nifty things about it:

  • 256 color output with adaptive palette creation and management
  • multiple light sources
  • piecewise linear perspective corrected texture mapping
  • Gouraud shading with color ramps that let you do fakePhong
  • optional Z-buffering
  • environment mapping
  • object hierarchies
  • frustum clipping
  • cameras
  • splines
  • matrix functions
  • primitive generation
  • very basic translucency
Totally useless today. But it would run SO fast with 20x the power available...

The code itself wasn't too bad, some stuff that I had spent ages tweaking and getting to run smoothly would surely be reusable.

So in about 8 hours of work I transformed it into Plush2, which is similar to the above, except simplified in C++, renders to 32 bit per pixel output, integrates with our LICE compositing engine, and supports the following new features:

  • 24 bit color output
  • multiple COLORED light sources
  • Texture mapping (piecewise linear perspective corrected) with optional BILINEAR filtering and support for any sized texture, support for texture transparency.
  • Colored Gouraud shading
  • Z-buffering
  • True surface transparency support
  • Multitexture support (one or both textures can be used as environment maps)
  • Full control over how pixels are combined at render -- add, mulitply are supported replace, all with alpha control.
  • No limits on number of light sources, triangles, etc.
A screenshot:

Yes yes I know 3D stuff has all been done a ton, just thought it was interesting bringing things back from the dead to see what would be reusable. Now I'm going to go hug my 2.4ghz multicore processor.

This will be a part of the next WDL release, in case anybody cares, ha ha. It does compile down to pretty small (though not small enough to go making a 4k demo with it)



9 Comments


October 18, 2008
Music
freeform jam with josh


October 15, 2008
Music
post grump


October 11, 2008
Music
freeform jam with brennewtbider


October 3, 2008
Music
freeform jam with schwa


October 1, 2008
stumbling in code

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:

    // setup:
    double cos_sc = PI/period_samples; // PI/n for a period of n
    double pos=0; // actually sin(initial_state), 1 for cos(), 0 for sin()
    double vel=1/cos_sc; // actually cos(initial_state)/cos_sc, 0 for cos(),1/cos_sc for sin()
    double tmp = cos_sc*cos_sc;
    double tmp2 = 1.0/(1.0+tmp);
    double mul1 = (1.0-tmp)*tmp2;
    double mul2 = tmp*2.0*tmp2;

    // per-sample calculation
    double output_value=pos;
    // double cosine_output = vel*cos_sc;

    // iterate to next sample
    double newpos = pos*mul1 + vel*mul2;
    vel -= (pos+newpos);
    pos = newpos;

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


September 28, 2008
Music
freeform jam with brennewtjoshdan


September 27, 2008
Music
brenjoshdan - 1 -- [6:52]
brenjoshdan - 2 -- [54:06]
brenjoshdan - 3 -- [26:31]


September 16, 2008
Music
freeform jam with brennewt and solo


September 8, 2008
Music
kerosene new rough


September 6, 2008
mobile update

Another tag, yay

7 Comments


September 6, 2008
Music
kerosene


September 3, 2008
Come on, sf dpw

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

7 Comments


August 23, 2008
Music
brennewt - 1 -- [45:23]
brennewt - 2 -- [42:25]


August 21, 2008
After 18 hours

The smiley face was me...

5 Comments


August 21, 2008
Music
bren - 1 -- [23:55]
bren - 2 -- [25:42]
bren - 3 -- [32:27]


August 20, 2008
Front door

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

7 Comments


August 10, 2008
Interesting sense of humor

(note the car #)

8 Comments


August 2, 2008
cures for jet lag:

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


July 28, 2008
Spring Cleaning

Found my laptop with ergonomic keyboard!

1 Comment


July 28, 2008
Music
freeform jam with newtchr


July 25, 2008
I love PHP

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.

2 Comments


July 25, 2008
Music
freeform jam with chr


July 23, 2008
Music
brenchr - 1 -- [79:16]
brenchr - 2 -- [25:26]


July 20, 2008
Music
brenbidernewt - 1 -- [8:10]
brenbidernewt - 2 -- [104:38]
brenbidernewt - 3 -- [30:29]


July 9, 2008
Music
freeform jam with brennewt


July 3, 2008
Cubs vs Giants

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

3 Comments


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


June 23, 2008
Rad toy

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

3 Comments


[ present ... 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 ... past ]
search : rss : recent comments : Copyright © 2021 Justin Frankel