Archive for August, 2006

New features

Monday, August 7th, 2006

I don’t know how well it will work, but I’ve added a new feature to http://www.wshr.org and http://www.wshr.us – in theory, they will stream random content recorded by sheer sound studios, taking random 3-10 minute clips from jam sessions and complete songs recorded and mixed here. It’s segfaulted once already, so it’s hard to say whether it will stay up – I’m too tired to work on it any more, and I have to get back to my paying job tomorrow, so.. we’ll see.

Sunday, August 6th, 2006

On the why-doesn’t-somebody-make-it front, where is my MIDI patchbay. I know all about automated MIDI patchbays and I have a couple of them, but I want something that lets me physically move cables around, and has a splitter and a merger. it’d have four jacks per channel, and probably just four channels, and probably require power.

The jacks would be – Input1 + Input2 = Output1 + Output2. I think it’d be most useful for them to all be on the front panel. Actually, even cooler would be all of them on the front panel, with thrus for the inputs (unsummed) and two outputs on the back panel. I’d happily pay $400 for one of these, especially if every jack had link and activity lights like a network hub.

Then, continuing on my dream model, there’d also be one midi input that was added (merged) into *all* the bitstreams.

You could probably impliment the whole thing with four moderately beefy ATMegas. I’d arrange to have it built, but again, I lack the funding to do serious hardware development and I don’t know how it’d sell. Send me a quarter of a million dollars and I’ll send you the prototype and the gerbers and the software and my blessings to make as many of them as you want. Or I’ll do it for $15,000 upfront and $10 on every unit you sell.

Any takers?

Blast from the past..

Saturday, August 5th, 2006

When I was about 12, one of the things I enjoyed doing was using Broderbund’s Print Shop along with my word processer to make signs, school reports that had headers and footers, greeting cards, and other assorted chunks-of-printwork. The software had all the limits one would expect of something running on a machine with 128k of RAM, connected to a 9-wire thermal printer, but for all of the suckiness, it did actually do some pretty cool things.

Fast forward to 2006. I’m browsing in Half Price Books, and I come upon, for $3, a copy of Print Shop V20.

Version twenty. Jeez, how many products make it to V20? Anyway, so, naturally I buy a copy, having just bought this super-snazzy printer, and bring it home, and guess what? It’s just as much fun as the original Print Shop. So you all will probably groan when I send you homemade cards and whatnot, but I’m having fun…

Also, for a day my web site had the source code for fetching entries out of LJ into mysql as the entry-of-the-day which is being fetched out of LJ. Somehow it struck me as wonderfully recursive.

I’m thinking of buying some more UPS capacity for my house – I have enough to run for about 20 minutes, but since most power failures last at least a hour, I’d like to get more. What I’m wondering is – and yes, I know that I could cut open the UPS and add the ability to add more batteries, but that it might fail spectacularly because the charger isn’t designed to charge said batteries for any length of time and the UPS doesn’t have enough cooling to run for two hours at full load – so what I came up with is to daisy chain UPSes – i.e. plug one UPS into another into another etc. Has anyone tried this and does it work as expected i.e. 3 UPSes gives you almost 3x the runtime of one UPS?

I’m also going to write a randomizer for my web site that shows a different photo every time, but has the ability to ‘weight’ the photos so that favorites happen more often. I’ve come up with a easy and fast if somewhat wasteful of disk space way to do it, and I wondered if anyone had any better suggestions.

What I came up with is to create a table which has one entry per photo, unless the photo has a weight greater than one in which case it has several – a bunch – of entries for that photo. Then call rand(0,$number_of_rows) on that table and there you are, a weighting system. I also want to use the same code to generate playlists for wshr to play when it is otherwise ‘idle’ i.e. no one is broadcasting on it, so it will always have a signal.

Hopefully I’m making all this portable enough that it will continue to run on the new computer, once known as Chloe but by request from Kayti now named Peterbuilt. [One of my other computers is the mac, because it’s the only macintosh I have worthy of being called a computer, and we just saw Cars a month ago, so naturally..

Okay, I know this is a much more mundane journal entry than a lot of my more esoteric ones, but nonetheless I’m happy with it. I can’t imagine that I’ll care about anything I just wrote ten years from now, but then, I’ve been suprised before.

As is so often the case..

Saturday, August 5th, 2006

Sheer has a bit of not-very-well-written code to share. Because nothing immediately jumped out at me for fetching LJ, here is a perl script that will fetch the latest LJ entry from the RSS feed, compare it with a database. You can also find this data in Sheer’s newly created code directory, where he will share all open source code snippits in the future: http://www.sheer.us/code

#!/usr/bin/perl

use DBI;
use Data::Dumper;
use LWP::Simple;
use XML::Simple;

my $dbh = DBI->connect(“dbi:mysql:db=obfuscated”,”because i”,”dont want you accessing it”);

fetchdata();

# yes, this could be a *lot* better

sub fetchdata()
{
my $xml = XML::Simple->new();
my $webpage = ““;
$webpage = get(“http://sheer-panic.livejournal.com/data/rss”);

#print $webpage;

$debug = 0;

if(! defined $webpage) {
# die “sheer sucks”;
return 0;
}

my $doc = $xml->XMLin($webpage);

# return($doc->{GRPVOL}{PRV});

$item = $doc->{channel}{item}[0];

# print Dumper($item);
# print Dumper($doc);

$title = $item->{‘title’};
$titleq = $dbh->quote($title);
$link = $item->{‘link’};
$linkq = $dbh->quote($link);
$guid = $item->{‘guid’}{‘content’};
$guidq = $dbh->quote($guid);
$text = $item->{‘description’};
$textq = $dbh->quote($text);
$date = $item->{‘pubDate’};
$dateq = $dbh->quote($date);

$sth = $dbh->prepare(“SELECT lj_seq FROM lj WHERE link = ‘$link'”);
$sth->execute();

($seq) = $sth->fetchrow_array();

if($seq) {
print “we got it” if ($debug);
return;
} else {
print “Title: [$title]\nlink: [$link]\nGuid:[$guid]\ntext:[$text]\ndate:[$date]\n” if ($debug);

$query = “INSERT INTO lj VALUES (NULL,$linkq,$textq,$titleq,$dateq,$guidq,NOW())”;
print “query: $query\n” if ($debug);
$dbh->do($query);

}

}

#–
#– Table structure for table ‘lj’
#–

#CREATE TABLE lj (
# lj_seq int(11) NOT NULL auto_increment,
# link text,
# description text,
# title text,
# `date` varchar(255) default NULL,
# guid text,
# t timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
# PRIMARY KEY (lj_seq)
#) ENGINE=MyISAM DEFAULT CHARSET=latin1;
<

Sex and waterbeds and things one should never do with a microcontroller.

Saturday, August 5th, 2006

I was recently discussing sex on a waterbed – this isn’t something that I’ve ever partaken of myself that I can remember, but it seems to me that the basic problem with sex on a waterbed would be that waterbeds tend to have resonant frequencies and they would tend to want to slosh at those frequencies and no others.

Leave it to sheer to come up with a solution to a problem that he’s never actually directly observed – and I suspect such a device already exists, but..

If you take a thing like a waterproof speaker, and place it with the cone side ‘in’ the waterbed, it should be possible to counteract the natural resonance of the waterbed and instead make it slosh to whatever rhythm the occupents of said bed are currently pursuing. It should also be fairly easy to come up with sensors that can detect that rhythem. (Why can’t I think how to spell rhythym today?) Alternates are a motor connected to a crankshaft-and-piston style affair that pushed the water out of the way. Or something – you all get the idea.

It’s probably a pity I’m not patenting this – I could make billions. Of course, chances are good that someone already has patented it, and chances are also pretty good that joe consumer is not going to be interested in this product. But if anyone wants to fedex me $5 million or so, I’ll get started on the prototypes right away.

795

Saturday, August 5th, 2006

Well, I have joined the thousands of web sites that have ultimately given up on static html in favor of more convenient forms of self-expression. Sheer.us is now a index.php web site.

I don’t know why I feel that this marks me as a sellout.

It did make making a ‘days clean’ counter incredibly easy. I’m not proud of the number sitting on that counter, but..

Having taken this step, here are the next steps that I think I’d like to take:

1) Make a generic multiuser ‘days clean’ calander and export it as a resource for all those out there in networkland who are quitting something. Have some generic platitudes about what to do when you relapse/fall back down that show up when you push the ‘reset counter’ button, a field for putting in how many deuchmarks your personal habit costs you per day for those to which such things apply – I know code is already out there to put this on people’s web sites, but I still think it’d be a neat thing to do.

2) Index my entire photo collection and have the picture on the page change every time you index it

3) Include my most recent public journal entry – I’m not sure how this would work exactly, my suspicion is I would want to fetch it via RSS every few hours and keep a local copy cached. Sample code appriciated if anyone’s got it.

4) Finally get around to setting up ‘sheer radio’ – something that takes random songs, or 10 minute random clips out of jam sessions, and plays them over the wshr tuners.

Yet more projects I’ll never get around to. Just what I needed.. 😉

I’ve no end of ideas – it’s just tricky to impliment even a small percentage of them.

Chunks of infinity

Saturday, August 5th, 2006

Okay, so, presuming that DNA can be represented in binary form – not something I’d care to lay money on, it may be one of those problems like vinyl vs. CDs…

Oh dear.

It is completely impossible to represent the output of a analog instrument accurately as a digital signal, of *any* precision. 16 bits, 24 bits, 32 bits, 64 bits, 44khz, 96khz, go as far as you like, you still won’t have actually captured the instrument. Of course, the difference between what you captured and what is actually there is so infintestimally small that only very sensitive equipment can pick it up – and certainly small enough that no human ear can hear it. But it is there. DNA may express accurately as a digital signal, or it may not. We haven’t yet had the technology – as far as I know – to write a DNA sequence into a computer and then somehow bring it back out and create a lifeform based on it. I’d appriciate it if that’s not true if someone would point it out to me – but as far as I know ‘gene splicing’ is a mechanical thing thus far.

Anyway.. presuming that it can be, both me and any virii I may catch (copy data out of) are just very, very large numbers. I know that I’ve been going on about this for a while and I will probably continue to go on about it for a while, although I’m sure that sooner or later I’ll give it up in favor of musing about something else that’s completely irrelevant to anything.

That said, why is it that I am a self-aware life form protected by human law and my virii are not? For that matter, why is it that if a bear kills a man, the bear is free to go, whereas if I kill a man, I’m jailed for 20 years? (Not that I consider killing someone a moral activity, or that I would do such a thing [I hope]).

Does anyone *know* that AIDS isn’t sentient? We may not be *aware* of the sensory data that it is receiving, much in the same way that it probably isn’t aware of the sensory data we’re receiving. It may be blissfully unaware of killing us just as we are blissfully unaware of killing thousands of virii and bacteria a day.

For that matter, we don’t know if its self-aware. We’re not even all that clear on what self-aware means. I remember going to the aquarium with my sister and watching a fish, and having it swivil it’s eyes around – and I swear it was watching me. Fish don’t have much in the way of memory, supposedly – except that a salmon can swim back to the river which it was born in years after its birth. Perhaps we’re not seeing the whole picture..

I feel guilty about eating fish. I don’t eat cow, but lately I’ve been craving cow and feeling guilty about wanting to eat cow. And I wonder if cow would feel guilty about eating me – they do seem to be vegetarian.

..

Wednesday, August 2nd, 2006

A few dusty pictures that I found while on my search for treasure.

Music etc..

Wednesday, August 2nd, 2006

Today was the annual Seattle Night Out block party. Two years ago, my band Mischief Committee played for the first time anywhere. Today, we played for what may be the last time anywhere. (Depending on if Tory gets it togeather to have us play at a house party before we all head our seperate ways.)

We’re pretty much breaking up because everyone is moving to a different state.. Joe is going back to Michigan, I’m going to SoCal (hopefully, if I ever get a house etc), and Tory is – staying here, apparently. It’s hard to tell who’s getting the best deal.

Sadly, we’ve never been better. I’ve never had so many people tell me how wonderful a set was – even at Fluffy Bunny, which had 10X as many people as this event. We got one complaint, from a neighbor two blocks away.. (two blocks away.. and the system wasn’t even wide open. Heh. Heh. Muhahahah). There were enough people talking about how good the set was afterwords that not even I could think that they didn’t really mean it and were just trying to be nice..

And yet, I’m sad. Depressed. K. stayed in the house for the set, which shouldn’t bother me but does, and growled at me afterwords about a number of minor things. And.. I don’t know. I heard a lot of mistakes, a lot of things I could have done better and some things taht other people could have done better. I fear I’ve turned into Mr. Tanner, only hearing the flaws.