January 2006 Entries

SO you know ... here is some sample code.

test = (short[])applicationBuffer.Read(NextCaptureOffset, typeof(short), LockFlag.None, LockSize);
Console.WriteLine(test.Length);
-------------------------
The test array is of length 22048 for a wave format of 44100 16-bit Stereo

SO...
22048 divide by 16 bit by 2 channels =
689 = 13 * 53 (why this number?)

Ok, I have some sample code for recording to a sound buffer. I have a byte array. Now I just need decypher / interpulate the byte array.

Looks like you sucka's who use my software may need to get DirectX 9.0's December release for the next release for some phatty Audio support.

And yes, I should be soldering/wiring but you know what, I don't care. I'm in a coding mode.

Interesting thing about the Microsoft sample code also ... it doesn't run under .Net 2.0 / Visual Studio 2005 compile. (don't worry, I slapped it around a bit and got it working)

ordering my polycarbonate from mcmaster carr

need 6
8574K86 - Polycarbonate Sheet 3/8" Thick, 48" X 48", Clear
$170.15 Each

need 2
8574K65 - Polycarbonate Sheet 3/8" Thick, 24" X 48", Clear
$97.83 Each

need 1 (to guard my tv)
8560K227 - Clear Cast Acrylic Sheet .236" Thick, 48" X 48"
$89.91 Each

so I went to a concert then to some random hot dog joint in the burbs followed up by a chili cooking contest (so entering mine next year cause only decent entry which I believe lost due to sheer lack of chili ( he was the first one out ) ) then the post celebration of the entry at his place followed up by my friends deciding my apartment is a good place to crash at 5am (which means they have to call me / buzz my apartment to wake me up) to get some phatty french toast (totally need to figure out how to make this crap) to finishing up the 9.5 feet wiring.

That leaves me with 4.5 and looking at the sheet, about 20ish 7 foot wire lengths left.

Now that the new version of SpringCM's new content management system is launched, I can get some work done on the floor again. I'm betting i'll be done with the wiring come this week and see if my friend Dave McNelis can hook me up with a trip to Menards to get some wood.

haha, I said wood. (yes, bathroom jokes are still funny.)

jeebus I keep on using this title.

14 9.5'ers left, 28 7's and 28 4.5's

Not working on the floor, that is for sure. Plus I got maybe 10 wires done in this time span.

I was in charge of rebranding my company from DocExchange to SpringCM, Content Management. This may seem like a trivial task but it really wasn't. Lots of hours (120+ from last monday to today, yup, weekends were work days) were put in and no where near enough beer drank in these two weeks. However, in about 2.5 hours from this post, we'll be doing a production push and I'll be catching up on some sleep.

I think I cranked out 10 more 9.5 feet wires last night, didn't apply the twist yet to them, only soldered them up. And watch 2 episodes of Lost too.

Now to go balls to the walls today and repeat.

I now can "record" the audio buffer from Winamp. Getting access to the Audio In is easy ... I think.

Now I need to go work tomorrow BUT I now have a working idea now how to do this.

And if I can do this, then I have the last major part of the MIT software.

I did 4 wires for the 9.5 feets also tonight, not much but something. Just wasn't in the mood for soldering.

Also, why the hell doesn't people's beards grow in Lost? I can barely grow one and in 40 days, I would have something far more than what they.

Putting in tons of hours at work, I lack spare time

acrylic sucks

  1. It is a hard substance which implies brittle. It will crack and will break.
  2. Scratches easier than Polycarbonate (lexan)
  3. cannot stop bullets

Why I love Polycarbonate (lexan)

  1. It is hard yet flexes
  2. you can bend it
  3. it stops bullets
  4. it scratches less than acrylic

Hi Clint,

My name is Ben, I'm building a dance floor over in NZ. I've been talking to Scott and he's saying about your RGB LED that you are using. Hows it handling? I was wondering about using 3 high intensity LEDs [3-7000mcd]. Any thoughts?

Also interested in how you are diffusing the light, I was thinking of using 10mm clear arcylic and sandblasting the underside.. Either that or wax paper..

Cheers,
Ben

Power isn't everything with the LEDs. You also have to worry about the viewing angle. From what I saw the more powerful, normally have a very small viewing angle. Mine have a 60 degree angle. I may end up totally replacing everything I have with a different solution at a later point in time. All depends the amount of money you're willing to spend.

With sandblasting, I had that thought but you'll run into two issues, heat (warping) and evenness of the blast. ALSO with acrylic, you'll have a major issue of cracking. Polycarbonate is a better solution for a floor. It is basically bulletproof glass. I was going to add in middle, thin layer of polyethylene to create the diffusion on my floor.

Just talked with Joshua Stark after he ran a stress test for 12 hours on the application on a POS box that can barely run XP and it didn't crash. The previous versions would putter out on him after a bit. He did say it ran quick too. The wonders of threading.

12 hours with the floor running.

god I rule ... I mean ummm, god I rule so very much.

Since my buddy Dave McNelis rules so much and is giving me a ride over to Menards to pick up some wood, I should be building a phatty chuck of the floor ... or atleast a proof of concept because I doubt Menards will have all the wood I need in stock. The one in Yorkville, IL (parent's house) only had enough to build maybe 1 floor section. I figure this is actually a hidden blessing since I can build the floor out bit by bit and figure out the issues right away.

FINALLY, I get to use my power tools for destruction. And I think I'll need to buy a few tools too, namely a DeWalt power tool kit. I know I'll need some beefier clamps.

I also need to figure out a way to raise the other sections of my floor. I'm thinking some 2x4's and some plywood.

And now, I sleep since I just worked 12 hours and will need to repeat chances are tomorrow.

Source (62 kb)
App (70kb)

Since for whatever ungodly reason, I woke up at 4:30 this morning. Now I love sleep and the fact I couldn't sleep irked me. So even though I have chances are 12 hours of work ahead of me today ... I still opted to code and finish up some loose ends.

The application finally is under a .Net 2.0 release to manufacture code base. This means if there is a bug, it is because I suck.

New things in this build are both bug fixes from Kevin Roach and Joshua Stark. Also a slight tweak on layout �? I think ( can't remember that far back ) and animated gif support �? biotches. Images (jpg and gif (can support more, haven't tried anything else though)) and the DDF files are now deemed 'Animation' files. So shove everything you want in a single directory and use that directory in the XML file and BAM, you're good to go.

Also I was far more aggressive on memory management on the Images and DDF Animation files. This should solve (if there were any) any memory leaks. What I would like (Looking at you Joshua) is some people to just run the app on their boards for an extended period of time now. Joshua mentioned randomly it would crash and I'm suspecting it was directly due to a memory leak OR the .Net 2.0 beta 2 framework the prior 3 applications where built on.

One other key note is the XML files I've provided have the output to the physical floor itself DISABLED. Change the value on the XML file to reenable this. I'm lazy and since the base class for the DDF has been done for almost 6 months now, I really don't have to worry about testing it anymore.

And as always, you need the .Net 2.0 Framework cause I'm a Microsoft ummm, what is the word I'm looking for �? rhymes with core.

Known issues:
There is a cross threading issue that at some point I'll fix. But it isn't that big of a deal, just happens with the mock floor. The wonders of managed code and not letting two threads use the same memory.

Source (62 kb)
App (70kb)

Since for whatever ungodly reason, I woke up at 4:30 this morning. Now I love sleep and the fact I couldn't sleep irked me. So even though I have chances are 12 hours of work ahead of me today ... I still opted to code and finish up some loose ends.

The application finally is under a .Net 2.0 release to manufacture code base. This means if there is a bug, it is because I suck.

New things in this build are both bug fixes from Kevin Roach and Joshua Stark. Also a slight tweak on layout �? I think ( can't remember that far back ) and animated gif support �? biotches. Images (jpg and gif (can support more, haven't tried anything else though)) and the DDF files are now deemed "Animation" files. So shove everything you want in a single directory and use that directory in the XML file and BAM, you're good to go.

Also I was far more aggressive on memory management on the Images and DDF Animation files. This should solve (if there were any) any memory leaks. What I would like (Looking at you Joshua) is some people to just run the app on their boards for an extended period of time now. Joshua mentioned randomly it would crash and I'm suspecting it was directly due to a memory leak OR the .Net 2.0 beta 2 framework the prior 3 applications where built on.

One other key note is the XML files I've provided have the output to the physical floor itself DISABLED. Change the value on the XML file to reenable this. I'm lazy and since the base class for the DDF has been done for almost 6 months now, I really don't have to worry about testing it anymore.

And as always, you need the .Net 2.0 Framework cause I'm a Microsoft ummm, what is the word I'm looking for �? rhymes with core.

Known issues:
There is a cross threading issue that at some point I'll fix. But it isn't that big of a deal, just happens with the mock floor. The wonders of managed code and not letting two threads use the same memory.

SUPER PICTURE HAPPY FUN SUPER TIME!

Here are my plans for how to build the floor out of 1/2" thick 4" high 4 foot and 6 foot segments (6 feet are for housing the electronics ).



I only got about 20 9.5's done. A Buddy's bday happened and then I rediscovered my love of sleep. And now da bears.

Ditka Versus a Castle. Ditka hands down wins.

Ok, after talking with my dad (tool and die maker), he managed to find a place that offers bulk discounting pricing for 4" boxes at 2" height for 93 cents each. I can add in spacers to beef out the grid further.

Why are using electrical steel boxes a good idea? Cause is it 1/8" of steel. In a grid, it boosts the strength even further. Combine that with the 3/8" polycarbonate I'm going to purchase that will distrubte the load further.

I'm going to do some price pointing on the wood shortly.

excellent *evil finger roll*

2 bucks a pop per electrical box is too expensive. That would be over a grand for the floor.

I'm thinkin wood ... Namely 4 foot and 6 foot 1/2" segments that will be bolted together and jigsawed to fit. If not, I'll send Chuck Norris to stare the floor into submission. I'll upload some doodles of what I'm thinking.

haha, I said wood.

clint likes beer
clint likes steak
A bar has $3.50 steaks and $3.00 microbrews that is on the way home

Where is clint?

I really really like the idea of using the metal boxes but can't find anything above 4 11/16 inches and those are a bit more than what I was thinking about spending.

Right now wood is still the best price point.

Here are just some of the links I checked out, if anyone can find something better and within a 2ish (sub 2 would be best) dollar price point if I order 470 to 550 of them, please tell. And I do need atleast the 4 11/16 and a 2" height, 3 would be better for height and 5 to 6" would be best for width.

http://www.grainger.com/Grainger/wwg/itemDetailsRender.shtml?xi=xi&ItemId=1611713647&ccitem=http://www.capeelectric.com/marion/catalog/raco/rac5.html
http://www.dale-electric.com/261-00.htm
http://www.mclendons.com/catalog.asp?cat=Electrical&subcat1=Boxes+%26+Covers
http://www.industrial-enclosures.com/

I have cut the remaining wiring. Only stuff that isn't stripped is the 4.5 feeters. My apartment looks like a scene from aliens with all the wiring hanging up.

now to solder / twist all that crap.

I was talking to my

retard special handicapped "rides on the short bus" brother last night and he actually came up with a good idea (I'll never admit this fact). He knew I was almost done with the wiring and really needed to figure a way to do the flooring.

He came up with, if it is possible, the best idea ever. Use electrical wiring boxes.

Why is this an awesome idea? Let me rap with you for a bit why.

  1. They are square
  2. They are metal
  3. They come in a large sum of sizes
  4. They are prebuilt
  5. They are aimed for holding wiring

NOW, I will say this may not work. I haven't checked out Digikey or McMaster Carr. But I will

give him credit say he that he was thinking outside the box.

I have 9 7 foot wires left to cut and 28 4.5 foot wires left. A ton of stripping and soldering will proceed this horror of cutting.



And how, someone may ask, How can I do so much wiring (2 miles worth)? Let me tell you how.


That's right, the best episodes of He-Man and the masters of the universe. (yes, I actually do have this DVD.)

I got I 20 some odd 9.5'ers cut and stripped.

really need to figure out how i'm going to build this floor soon.

I will learn the napoleon dynamite dance and do it exactly once when I unveil the floor.

move by move (8 meg)

it shall be legendary ... and vote for pedro.

God I hate wiring.

I just finished up the 8.5's

That leaves 54 9.5' wires to make, 19 7 and 28 4.5's and I'm done with making the wires. then get to do quality assurance on all 450 sum odd wires.

With that, I go to the bar. New version of software with animated gif support at some point too.

I've been busy so very little this week has gotten done. I only have 24 some odd 8.5'er wires done with the need for 56. I've been working on a custom feature for work for longer than I care to admit since it is uber complexe and had to be recoded pretty much from scratch on Tuesday due to a massive UI change.

I'm going to attempt maybe tomorrow or Sunday to finish up the 8.5's. Then I only have the 2 sets of 9.5'ers, the 4.5's and one set of 7's left.

... and soldering a CENSORED ton of LEDs.

... and build the floor.

I'm seriously going to be able to set off a metal detector by the end of this due to all the soldering.

Stats
Last month I got 2634 unique hits, well, 2631 if you could the 3 IP's I pull and dished out 490mb of bandwidth.

In 4 days and 15 hours, I have 914 unique hits and have pulled 340 MB of bandwidth. And you peeps really like Firefox at a suprising 50% usage with IE suffering a 32% usage.

Linkers
Makezine's blog which I just got the first three issues today in the mail. I purchased a subscription with issue 4. Interesting stuff.

pixelsumo

hack a day, already mentioned them but I really like their site.

and last but not least
LED center from linear1

Ok, I'm a massive fan of legos if you haven't already noticed how I've used them for building random tools. example

They just announced the new version of the Mindstorm called Nxt. Just when I lost all hope for their tech edge.

gizmodo link

And yes, was my first image tested. Gir from Invader Zim ... the best cartoon ever.

Got animated gifs working.
changed up how some of it worked but the rotate on the img did flatten the animated gif.

// Applying corrective flip on image
// _img.RotateFlip(RotateFlipType.Rotate270FlipNone);

for (int i = 0; i < TotalFrameCount; i++)
{
if (isAnimatedGif)
{
_img.SelectActiveFrame(_dimension, i);
}

using (Bitmap _bitmapReturn = new Bitmap(Rows, Cols))
{
using (Graphics g = Graphics.FromImage((System.Drawing.Image)_bitmapReturn))
{
g.DrawImage(_img, 0, 0, Rows, Cols);
}
_bitmapReturn.RotateFlip(RotateFlipType.Rotate270FlipNone);
populateBufferRow(_bitmapReturn, i, true);
}
}

I think I may have found some built Win32 API's that will give me access to the sound output buffer. If so, I can do the happy dance.

I'll create a sample app to test this out. If this does work, then sound based effects can be worked in. If this is true, then the software can be run in conjunction with Winamp or whatever audio player is your poison. And I do believe this will make my software at par with MIT's.

Ok, here is part of the Image code for reading animated gifs (slightly moded from Animation.cs) however it doesn't work totally.

I can't see the issue but I needz to go to work tomorrow after I having a freaking huge break.

It loads the image, it gets the proper frame count, but it doesn't seem to move to the proper frame. Sample code I scored off the new appears to use what I'm doing. I tried setting the frame on both the _bitmapReturn and the _img by the way. If anyone can see wtf I'm doing wrong, please tell me. I have limited experience with the graphic libs in .Net.

private void populateBuffer(string ImageFilePath)
{
    FileInfo fi = new FileInfo(ImageFilePath);
    bool isAnimatedGif = false;
    TotalFrameCount = 1;

    #region populating buffer
    using (System.Drawing.Image _img = new Bitmap(ImageFilePath))
    {
        FrameDimension _dimension = null;
        #region verifiying if animated gif, if so getting frame count
        if (fi.Extension.ToLowerInvariant() == ".gif")
        {
            _dimension = new FrameDimension(_img.FrameDimensionsList[0]);
            TotalFrameCount = _img.GetFrameCount(_dimension);
            isAnimatedGif = (TotalFrameCount > 1);
        }
        #endregion

        #region creating buffer
        AnimationBuffer = new int[TotalFrameCount][];

        for (int i = 0; i < AnimationBuffer.Length; i++)
        {
            AnimationBuffer[i] = new int[this.Rows * this.Cols * 3]; // RGB that bizzo
        }
        #endregion

        // Applying corrective flip on image
        _img.RotateFlip(RotateFlipType.Rotate270FlipNone);

        for (int i = 0; i < TotalFrameCount; i++)
        {
            if (isAnimatedGif)
            {
                _img.SelectActiveFrame(_dimension, i);
            }

            using (Bitmap _bitmapReturn = new Bitmap(Cols, Rows))
            {
                using (Graphics g = Graphics.FromImage((System.Drawing.Image)_bitmapReturn))
                    g.DrawImage(_img, 0, 0, Cols, Rows);

                populateBufferRow(_bitmapReturn, i, true);
            }
        }
    }
    #endregion
}




New years, start of the night
Damn I look good in a suit.

End of the night (At party #3 (I'm counting the cab ride))
I don't know where the hat came from

I got all the 8.5 feet cut and created a new gadget for figuring out wire length. I'll post pics later ... namely soon as my hangover ends (aka tomorrow).

(28 + 20) * 4 = a lotta wires. Still need to strip the wires and sipp and solder and twist.