=== P·HYDRA DOCUMENTATION ===
The "What It IS, Man?" File

(WHAT, ver L5N)

P·HYDRA

The Most User-Hostile POKEY Sequencer for The Atari Home Computer

"It's as easy as programming in raw machine code!"

P·HYDRA is a ...well, what the hell is it? You could say that it's a music tracker/sequencer. It can certainly be used that way. It might be better thought-of as a live coding environment for music/sound on the Atari 8-bit home computer.

When I first started working on it, I simply had the idea of making a "chain sequencer", meaning a performance-oriented music sequencer in which multiple simultaneous patterns of varying lengths are chained together via GOTO-like statements. Very quickly I started thinking that it would be even better if I could write little sound programs, not just musical sequences.

In addition to that, I had the idea that by using POKEY's high-resolution timers one could theoretically do some crude 2-operator FM synthesis. So I wanted to pursue that as well.

In its current incarnation, P·HYDRA provides you with little more than a hex editor that you use to manipulate the contents of the computer's memory, and an interpreter that runs in the background and executes the program code that you're plugging into RAM.

P·HYDRA is programmed with a sort-of virtual machine code; the virtual machine works like this:

There are multiple "heads" (at the time I'm writing this, six of them), each with a program counter, delay counter, and a single general-purpose register. At every tick of the time-clock they decrement their delay counter and when that counter reaches zero they execute the instruction pointed-at by their program counter.

The instructions are all four bytes long, and look like this:

  [DELAY] [OPCODE] [OPERAND1] [OPERAND2]

The DELAY byte sets the head's delay counter. After the current instruction is performed, the head will wait this number of "ticks" (jiffies, 60ths of a second – or 50ths, depending on whether you're an NTSC or a PAL) before executing the next instruction.

The OPCODE byte tells the head what to do; maybe change the pitch or timbre of a POKEY channel, change the program counter of a head, store bytes in the head's register, &c..

And of course the OPERAND bytes provide any additional data needed to execute the instruction.

You can get an overview of the current instruction set by looking at the OPS_QREF file. The details are in OPS.

The current instruction set is by no means final, although it hasn't really changed much in the last couple of years -- because I haven't spent much time working on the program.

GODS, WHY?

As powerful as programs like Theta Music Composer are, they're not performance sequencers; the sequences and instruments cannot be edited as they play. Moreover, chip trackers tend to be designed for the composition of pop/dance music, not for weirdo, free-form, avant-garde, arty-farty music. I wanted something that would allow me to playback and modify sequences and sounds in real time, the way that one can with step sequencers and modular synthesizers, and I wanted to be able to compose outside the box of pattern/sequence forms and do something like generative/stochastic music and mutating sound.

Also, I had a few tricky tricks that I wanted to try.

OKAY, BUT WHY IS THE INTERFACE SO BAD?

The interface is really user-hostile, I know. The reason is simply that I didn't want to spend a lot of time writing a UI; my priority right now is experimenting and developing the instruction set and the FM/wave features. Once I've got the back-end in a state I'm happier with, then I would like to build a nice UI around that.

Because composing from scratch in P·HYDRA can be fun but onerous, there is another way to do it: you can write P·HYDRA sequence/programs in a text editor and "assemble" them using the included Python script,

Someday, if there's ever a version 1.0 of P·HYDRA, it'll probably look more like a one-column tracker-style interface, with readable opcodes and numbers that aren't so bloomin' tiny!

A version 1.0 release will probably look more like this.

$$$ SPECIAL FEATURES $$$

For details on these AMAZING features, check the USEME file for a general overview and the OPS file for details.

WILL IT RUN ON MY ATARI?

Well, I wrote it to run it on my stock 800XL, and it does. Other systems? I dunno! Haven't tried 'em. If you have, let me know.

I WANT

This zipfile contains an ATR disk image with P·HYDRA on it, the plain-text docs, the MAC/65 source code, and the phasm.py assembler tool:

p-hydra_L5N.zip

LICENSE

P·HYDRA is free software, and is released under the terms of the GNU General Public License.

WHO DIS?

<http://purl.org/laemeur>

Feel free to contact me!

—L.

=== END P·HYDRA DOCUMENTATION FILE "WHAT" ===