next
Found an interesting (although not particularly useful) property of functions when plotted on the cartesian coordinates offset by their polar coordinates.



This example is secant:
var dt = 0.005;
function plot(t, fnt) { ctx.fillRect((t + Math.cos(fnt)) * 10, (fnt + Math.sin(fnt)) * 10 + 250, 1, 1); }
function sec(x) { var c = Math.cos(x); if (c == 0) { return -Infinity; } return 1/c; }

for (var i=0; i <1000; i+=dt) { plot(i, sec(i)); }

Don't know what it means, but it sure is purty ;)
On the corrosive nature of comment spam.

So, I tried having comments for a while, but it seems like only comment spammers actually used it. I actually stopped looking for actual comments, because I was always disappointed.

I took a fairly naive approach to the whole issue in the first place. I made sure that all text was properly sanitized so I wouldn't expose anyone to XSS attacks, and links would be nullified. Still, I didn't install any anti-spam software, because this blog just isn't important enough right now for me to spend that much time on it.

The goal of comment and wiki spammers is extremely dubious. They are apparently trying to either rope people into scams or increase the amount of links pointing to their crappy porn, Cialis, or online casino sites. However, search engine companies like Google actively fight against this kind of fraudulent search engine optimization. So, they end up getting an increasingly reducing benefit at greater and greater cost to the ability of anyone else to find legitimate information on the internet.

So, comments are gone, and probably won't be coming back. Oh, well.
Regarding Flash XML Sockets not receiving any DataEvents, I've found that the solution is that the data you send from your server to the Flash client must be terminated with a null character "\0", otherwise the client never seems to get the event.
Regarding Flash XML Sockets not receiving any DataEvents, I've found that the solution is that the data you send from your server to the Flash client must be terminated with a null character "\0", otherwise the client never seems to get the event.
To follow up on the previous post, I was able to rig a jack up to my protoboard and get some good recordings of the different algorithms in action:

pwm-based noise generators:
pwm1 pwm2 pwm3
pulsout-based noise generators:
pulsout1 pulsout2
pins-based noised generator:
pins1
Making noise with the PICAXE-08M

I've been playing around recently with microcontrollers. Any old school programmers who grew up programming a TV computer with a ZX-80 inside will feel very comfortable with the PICAXE-08M. The visual output is generally limited to LEDs or seven-segment displays, and input comes in just a handful of digital and analog pins. They're easy to program in a modern version of BASIC that eschews the monstrous line numbers in favor of labels.

The PICAXE comes with a handful of sound generating commands, like tune and play and sound, but these are basically canned. Play is the worst offender as it can literally only play one of four preset songs, and I'm not such a big fan of Rudolph the Red-Nosed Reindeer.

So, I'm experimenting with different ways to make tuneful noise from my PICAXE.

pwm: makes really strange noise, like sferics. Sounds a lot like electronic noise. Drop the values of b1 and b0 to something lower to get more musical tones.

main:
for b1=0 to 255
for b0=0 to 255
pwm 2, b0, 1
let b0 = b0 + b1
next b0
next b1
goto main

pulsout: Can be made to sound flatulent or percussive, depending on the highest value of b0. If you set it high, then you get long farts. If you keep it low, you get percussive noises.

main:
for b1 = 1 to 64
for b0 = 0 to 16
pulsout 2, b1
pause b0
next b0
next b1
goto main

let pins: deep, drony, with harmonics. Make sure to run diodes from the output pins to the speaker to avoid damaging the PIC

main:
output 1, 4
pins = %00000000
let b2 = 0
let b3 = 1
goto pin_loop

pin_loop:
for b1 = 0 to 16
for b0 = 1 to 64
pins = %00001010
pause b1
if b2 >= b3 then
pins = %00000000
let b2 = 0
else
let b2 = b2 + 1
pins = %00001000
endif
pause b1
next b0
next b1
let b3 = b3 + 1
goto pin_loop

These are good starting points for your own noise-making programs. Each one leaves plenty of room for adding extra code, perhaps a memory bank with values corresponding to different scales of notes. I'd be very interested in seeing what others were able to come up with.
I've been polishing my C/C++ chops recently and learning to use SDL as a fun work project. It's really quite easy to use, and I'm pleased with the results. This is The Spammond Organ. I tried to emulate a Hammond Organ, but about halfway through I found out that it was more fun just piling sine waves on top of each other. It gets a rather wide range of sound without using any kind of filters or effects.

Keys:
A - C1
S - D
D - E
F - F
G - G
H - A
J - B
K - C2

L - Decrease Hz of C1 by 10 (Note, does not affect notes currently held, so you can hold a note and then scale up the rest of the keys to a different octave).
; - Increase Hz of C1 by 10

Q - 1st harmonic mix /= 2
W - 1st harmonic mix *= 2
E - 2nd harmonic mix /= 2
R - 2nd harmonic mix *= 2
T - 3rd harmonic mix /= 2
Y - 3rd harmonic mix *= 2
U - Hammond Emulator Mode Activate!!! (Note, no deactivate available or necessary :lol: )

Code, build script, and Ubuntu binaries are in the zip.
Spammond Organ Source

Oscilliscope Emulation View:


Indeed, the script was able to cut down to the final track listing. I'm very happy with it.

I think this is a good demonstration on the middle ground between wholly handmade art and wholly generated art.
Today, I managed to reduce the possible track lists for my album from 10! (about 3 million +, I think) to 1,672. Progress :)

I have an extremely unoptimized permutation generator that prunes forbidden strings (i.e., track_c->track_j) at first opportunity, and prunes strings that don't have a required string at the end of the string generation. When I've got all the rules in place, I should only have 10 or 12 track lists to choose from.
I've been a huge fan of Sierra On-Line games since I was a kid. When I found out that the tools existed to make my own, I pounced on the opportunity. Thus was born Voodoo Girl: Queen of the Darned. If you haven't played any adventure games in a long time, I would advise you to grab a copy of NAGI from http://www.agidev.com/download/ and play some of the old classics, along with a bunch of new generation titles that are available.

Also on that download page are tools for making AGI games. I tried other adventure game platforms, like AGS, but something about the simplicity of AGI really appealed to me.

While a lot of the simplicity was an artifact of the limitations of computers at the time, some of it was good design.

I think that Flash represents a very good platform for adventure games. It has about as rich a set of graphic and animation tools as you could need. All I've done is worked on some bookkeeping infrastructure. For example, one of my goals will be allowing the player to keep save game backups on a host server, so they can play the same game on their lunch break as well as at home.

In any case, I have the single room proof-of-concept that I'm working on available here -> AS3 AGI version 0
next