PSPATTERN

A music tracker for the Sony PSP.

version 0.2.0a 8 channels GPLv3 MIDI in and out
The PSPATTERN song screen playing, showing eight channel columns, a live oscilloscope and the DSP meter.
The song screen during playback. Eight channels, the scope on the master output, and the note each channel is sounding along the bottom.
00

What it is

You build a song from patterns of notes and the PSP generates the sound. Nothing is streamed from disk and no sample files are required.

PSPATTERN has eight channels. Each one can play a sampler, a four engine synthesiser, or MIDI notes played on other gear through the PSP-MIDI adapter. It has a drum kit that is generated when a project loads, a delay and a reverb shared by all channels, and a small automation sequencer called a table attached to any step.

It is a fork of LittleGPTracker by Marc Nostromo, released under the GNU General Public License version 3. The interface follows the same idea as LSDJ: a song is a grid of chains, a chain is a list of phrases, and a phrase is sixteen steps of notes and effects.

What you need

Installing

Copy the PSPATTERN folder to ms0:/PSP/GAME/ on your memory stick, then launch it from the PSP game menu. The folder holds the program and four support files:

FileWhat it is
EBOOT.PBPthe program
usbmidi.prxthe driver for the PSP-MIDI adapter, only needed for MIDI
config.xmlstartup settings
mapping.xmlbutton assignments
custom_font.xmlthe screen font
01

Buttons

Buttons are named as they are printed on the PSP. Almost everything is a modifier held with a direction, and the bottom line of every screen lists the moves available from where you are.

ButtonWhat it does
OCircle. Select, set, and the edit modifier.
XCross. The secondary modifier.
L, RThe shoulder triggers.
STARTStart and stop playback.
D-padMove the cursor.
Editing
HoldPressResult
Oleft, rightchange the value under the cursor by one
Oup, downchange it by sixteen, or by ten in the velocity column
Rany directionmove to another screen
RXmute the channel under the cursor
02

The screens

There are seven. Hold R and press a direction to move between them. The song screen is the top level, and the rest open out of whatever the cursor is sitting on.

SONG
The arrangement. One column per channel, one chain number per cell.
CHAIN
Sixteen rows, each naming a phrase and a transpose in semitones.
PHRASE
Sixteen steps: note, instrument, velocity, and two effect columns.
TABLE
Automation that runs under a note at tick rate.
GROOVE
How long each step lasts, in ticks.
INSTRUMENT
Sound design for whichever instrument the step uses.
PROJECT
Tempo, master level, file operations, MIDI device.

Song

Each cell holds a chain number in hexadecimal, or two dashes for an empty slot. Hold O and press up or down to place a chain. The tracker plays down the rows.

Fill every cell you intend to use. A channel whose first row is blank never starts, because the player looks upwards for a chain and finds nothing. If a part should be silent for a while, point it at a chain of empty phrases rather than leaving the cell blank.
The song screen stopped, showing chain numbers across eight channel columns.
The panel on the right shows DSP load, tempo, project name, MIDI device and battery. The scope above it draws the master output.

Chain

Sixteen rows. Each holds a phrase number and a transpose value in semitones, so the same phrase can be reused at a different pitch. Transpose is signed, so FE is two semitones down. The chain plays its rows in order and then returns to the song.

The chain screen listing phrase numbers and transpose values.

Phrase

This is where the notes are. Seven columns: note, instrument, velocity, then two pairs of effect and parameter.

The velocity column reads 00 to 99 in decimal, not hexadecimal. Two dashes means nothing is written and the step plays at full level, so a phrase made before the column existed sounds exactly as it did. Hold O and press up or down to move by ten, left or right by one. One step below 00 clears it back to two dashes.

Stand on an effect column and the panel at the bottom explains the command and its parameter. Hold O and press up or down to pick one from the list.

The phrase screen showing a note, an instrument, a velocity of 76, an ARPG command and an ARPS command, with the help panel explaining ARP Speed.
A step with a note, a velocity of 76, a chord command and an arp speed command. The help panel describes whichever command the cursor is on.

Table

A table is sixteen rows of three effect columns that run alongside a note at tick rate, which is faster than the phrase steps. Use one for anything that has to change while a note sounds: a filter sweep, a retrigger, a pitch slide, a volume shape.

Start a table from a phrase step with the TABL command, or set an instrument to run one automatically from its table field. HOP loops a table back on itself, which is how it becomes an envelope rather than a one shot.

The table screen with sixteen rows and three command columns.

Groove

How many ticks each step lasts. The default is six. Uneven values give swing, and the GROV command switches groove mid song.

The groove screen showing per step tick counts.

Project

Tempo, a whole song transpose, a scale, the master level, whether the song repeats, the master drive and clipper, the MIDI device and sample rate, and the file operations.

The project screen with tempo, master level, mix settings, MIDI settings and file operations.
03

Instruments

An instrument is one of three types, chosen on the top row of the instrument screen.

Sample

Plays a wav file or one of the built in drums. It has volume, pan, root note, fine tune, interpolation, loop mode and points, a slice count, a drive and bit crush stage, a filter with cutoff, resonance and type, a feedback stage, an attenuator and an amplitude envelope.

The sampler instrument screen with sample, volume, pan, loop, DSP and amplitude sections.
Values read as percentages, decibels and L, CTR, R where a raw number would mean nothing. Sample start, loop and end stay in hexadecimal because they are byte offsets.

MIDI

Plays notes on something else instead of on the PSP. Channel, volume, note length, pitch bend range and four CC slots that the MCCA command can address. Select the PSPMIDI device on the project screen first. See the MIDI section below for what the adapter carries.

Synth

Generates sound on the PSP. Pick one of four engines on the second row.

EngineWhat it is
toneA single oscillator. Saw, square, triangle or sine, with pulse width, a sub oscillator an octave down, and noise. The cheapest of the four.
pdxPhase distortion. Saw, square, resonant saw and resonant triangle. The mod envelope sweeps the distortion, which gives a resonant sweep without a filter.
vaxThe analogue style engine. Up to seven detuned oscillators, saw or pulse, with pulse width modulation, a sub oscillator, noise, hard sync and ring modulation.
fmFour operator frequency modulation with eight algorithms. Each operator has a ratio, level, detune and its own envelope.

The FM algorithm names describe the routing directly. A greater than sign means the operator on the left modulates the one on the right, a space separates independent branches, and any operator not followed by a greater than sign reaches the output. So 4>3>2>1 is one chain and 4 3 2 1 is four sines added together.

Hard sync and ring modulation

Both are on the vax engine and both are off at zero, so patches made before they existed are unaffected.

sync runs a silent master oscillator at the note frequency. The oscillators you hear are lifted to between one and four times that frequency and reset every time the master completes a cycle. The pitch stays on the note while the timbre climbs. Sweeping it from a table is the classic hard sync lead.

ring multiplies the oscillator by a sine running one octave below the note. At zero the oscillator passes through untouched. It adds tones halfway between the normal harmonics, which is what makes it sound metallic. It is applied before the sub oscillator and the noise, so a ring modulated lead keeps a solid bottom end.

The vax synth engine screen showing wave, unison, detune, pulse width, sub, noise, sync and ring controls.
The vax engine with sync at 37 per cent and ring at 25 per cent.

The drum kit

The drum instruments are generated when a project loads rather than read from sample files. That is what the progress line on the loading screen is doing. They take no space on the memory stick and they can be redistributed freely. Each drum has a soft and a hard variant.

04

MIDI

MIDI runs through the PSP-MIDI adapter, which carries USB MIDI for a computer and TRS MIDI for hardware, in both directions. The tracker is fully usable without it. Samples and synths need no extra hardware at all.

Out

A MIDI instrument sends note on and note off, continuous controllers, pitch bend, program change and channel pressure. The commands beginning with MD and MC address those directly from a phrase or a table, so a controller sweep can be sequenced the same way a filter sweep is. MIDI clock follows the song tempo, so gear downstream stays with the tracker.

In

Incoming notes, controllers, pitch bend and program change are routed through mapping.xml, so an external controller can drive the program. Set the device to PSPMIDI on the project screen.

The project screen also has a sync setting with two positions, Off and Follow. On Follow the tracker takes its clock from outside instead of running its own, which is how you put it in time with something else. Following is deliberately opt in: a stray clock byte from a device you happened to leave plugged in should not take the transport away from you.

05

Arpeggios

ARPG takes four hexadecimal digits, each one a number of semitones above the written note, and cycles through them under a held note. Trailing zeros shorten the cycle, so 0370 is a three note figure and 037A is a four note one. A note starting cancels the previous arp, so the command goes on every step that has a note.

Common shapes
ValueSemitonesChord
03700 3 7minor triad
04700 4 7major triad
037A0 3 7 10minor seventh
047B0 4 7 11major seventh
0C000 12octave

Arp speed

The arp advances one position per tick, and a tick is short. At 150 beats per minute with six ticks to a step a tick is under 17 milliseconds, which gives a 220 Hz note fewer than four cycles before the pitch changes again. That is below what the ear needs to hear a pitch at all, so a fast figure stops sounding like notes and starts sounding like roughness.

ARPS sets how many ticks each arp position holds. The default is 1, the classic every tick trill. Raising it to 2 or 3 keeps the shimmer while giving each note in the figure enough cycles to register as a pitch. It is a channel setting and it survives note starts, so once per part is enough.

ARPS works in tables too. Putting it on a table row sweeps the arp rate across a single note, which moves the figure from a trill to a melody while it plays.
06

Commands

Every command takes a four digit parameter. The help panel writes it as aabb when the first two digits and the last two are read separately, or as aaaa when all four are one number. For PTCH and VOLM the first pair is a rate, and a rate of 00 jumps straight to the target instead of sliding.

CommandWhat it does
ARPGcycle through pitches relative to the note
ARPSticks each arp position holds
CRSHdrive and bit crush
DLAYdelay the step by a number of ticks
DRIVpost filter drive, vax engine
DTUNdetune spread of the unison stack, vax engine
FBMXfeedback mix
FBTNfeedback tune
FCUTset filter cutoff
FLTRset cutoff and resonance together
FMFBoperator four self modulation, fm engine
FML1operator output level, fm engine
FRESset filter resonance
GROVswitch to another groove
HOPjump to a step, a number of times
IRTGretrigger the instrument and transpose
KILLstop the note after a number of ticks
LEGAslide from the previous note
LFODLFO depth
LFORLFO rate
LPOFshift the sample loop points
MCCAsend a value on one of the instrument CC slots
MDATMIDI channel pressure
MDCCsend a MIDI continuous controller
MDPBMIDI pitch bend, 2000 is centre
MDPGMIDI program change
MVELset MIDI velocity for the step
PANpan to a value
PFINpitch fine tune
PLOFjump within the sample
PTCHslide the pitch
RTRGretrigger over a number of ticks
STOPstop the song
TABLstart a table
TMPOset the tempo
UNISunison voices, one to seven, vax engine
VOLMslide the volume
07

Saving and rendering

Projects live in ms0:/PSP/GAME/PSPATTERN/lgpt_NAME/. Save song writes to the current project, save song as makes a new one, and the browser on load song lists every project it finds.

The project browser listing four songs with Load, New and Exit at the bottom.

The tracker also keeps an automatic backup. If it was interrupted, it offers to recover the unsaved changes the next time you open that project.

Set render to Stereo on the project screen and press START to write mixdown.wav into the project folder while the song plays. Stems writes one file per channel instead, which is the quickest way to hear what a single part is doing. Set it back to Off when you are finished, or every play writes a new file.

On levels. Instrument volume runs from 0 to 255 and is shown as a percentage of that range, so 50 per cent is unity gain and not half volume. Above 50 per cent the instrument is amplified, up to about six decibels at the top. The master fader is steeper still: it applies the fourth power of its setting, so 68 is more than thirteen decibels down rather than a gentle trim. If a mix sounds quiet, those two are the first things to check.
08

Known issues

Version 0.2.0a. These are the things that are wrong and known about.

09

Licence and source

PSPATTERN is free software under the GNU General Public License version 3. You can use it, study it, change it and pass it on, and anything you pass on has to carry the same freedoms and the source that goes with it.

The complete source lives at github.com/HobbyChop/PSPATTERN, where releases will be published as they are made.

It is derived from LittleGPTracker by Marc Nostromo and contributors, with feature work from the djdiskmachine fork. The original authors are not responsible for this version.

usbmidi.prx is a separate work, the kernel driver for the PSP-MIDI adapter. It is not part of this program and talks to it only through the system call interface. It ships alongside for convenience.

The drum kit and the demo songs are original work and may be redistributed.