Recent articles from danny.ayers.name.

Current Activities

Current Activities

I've not been very good at updating here recently so I'll bundle this up.

What I should have been doing

  1. Cleaning this house (it is a bloody mess).
  2. Tidying the garden and field (it is one big jungle).
  3. Finding some paid work (I am skint).
  4. Practicing clarinet, guitar and keyboards (I am lazy).

But I have been busy.

What I have been doing

My ADHD means sticking to a routine is rather alien to me, but aside from the above, I have been relatively good at it recently. I wake up at 7 and take my Ritalin, make a coffee, doomscroll, get out of bed around 9. I take Claudio out for two walks a day (short, it's hard work in this heat). Beer cellar with Jacopo on a Saturday night, walk up to Silvano's bar in Castiglione on a Sunday (when I have the energy).

claudio

Most mornings I have a couple of hours in the music room. This mostly amounts to practice of sorts, though I am frequently uploading a solo jam up to YouTube, over here. I'm slowly working on the not-too-difficult second album (here's the first : Attone). This will be themed - inspired by mythical medieval creatures, such as those from the Aberdeen Bestiary. So far I have done the Bonnacon and the Griffin.

music room

Most of the rest of the day I spend at the computer. Current projects :

Research into potential earthquake prediction

This is something I've been looking anto, on and off, for a few years now. I recently decided to get back to it. There are two things which I think may make a difference : extended data (natural radio and astronomical) and recent developments in AI (transformer model, GPT-aided coding). I'm pulling seismic and radio data from Italy and Japan for model training as well as creating an avalanche-based simulator I'm hoping will be suitable for generating synthetic data. It's still early days in what is bound to be a long-term project (even if it works). Details at ELFQuake.

map

Generative music software

The main thrust of this has been Downspout, a set of Digital Audio Workstation (DAW) plugins. All very experimental.

I usually use Reaper DAW, but it can get a bit clunky when setting up the generative plugins. Given that I have an AI assistant to help (Codex), I thought I'd have a go at making a tool designed for this purpose from the bottom up. I already had a node & arc graph-oriented system (designed mostly for text processing) Transmissions so I used that as a reference and made Transmission.

transmission screenshot

Current Activities

ELFQuake: A Working Experiment, Not Yet a Predictor

ELFQuake: A Working Experiment, Not Yet a Predictor

Project Code/Docs (GitHub)

15 July 2026

tl;dr

latest prediction map (not good)

ELFQuake is a research project asking a difficult question: can earthquake records be combined with very-low-frequency radio observations and astronomical data to improve forecasts of earthquakes in Italy?

The important word is "improve". A model that appears accurate but does no better than a simple historical estimate is not useful. The project therefore treats every result as an experiment against clear baselines, with the future held out from training.

The System Is Now End to End

The project can now collect and organize the main data sources, train CPU-based models, and produce a seven-day map of actual and predicted earthquake locations.

The real earthquake catalogue comes from INGV, Italy’s national earthquake data service. The current historical file contains 4,836 events from January 2024 to July 2026. Cumiana VLF observations are being collected as spectrogram images. A spectrogram is simply a picture showing how radio energy changes over time and across frequencies. Astronomy and space-weather connectors are also in place.

The VLF record is not yet long enough to support a fair supervised test. The available earthquake-aligned VLF rows still contain only one class of outcome in the current windows. In plain terms, the system has examples of one kind of week, but not enough examples of both "an event followed" and "no event followed". The model therefore cannot honestly learn or test a real VLF earthquake signal yet.

Why Use a Sandpile Simulation?

Real strong earthquakes are rare, and the suspected radio effects are even harder to label. ELFQuake uses a sandpile-style avalanche simulation as a controlled source of synthetic data.

The simulation represents stress building up at localized points, followed by sudden avalanches. It produces two separate signal families:

  • a direct avalanche signal, intended as a rough analogue of seismic activity;
  • a piezo-like signal, intended as a rough analogue of a radio response caused by stress in quartz-bearing rock.

These signals are not claimed to be physically equivalent to earthquakes or VLF radio. Their purpose is to provide test data for the software and model interfaces while the real record grows. The simulation is also useful for checking whether an apparently promising model works across different runs, rather than only on one convenient example.

A new 20,000-step CPU simulation run was completed at seed 4300. Together with three earlier long runs, the dense synthetic corpus now contains 79,976 records. Independent simulations share a demonstration start date, so the training pipeline offsets their synthetic times when stacking them. This changes no real timestamp; it only prevents separate experiments from being mistaken for simultaneous observations.

The First Synthetic-to-Real Test

An all-Italy weekly target is too easy to define badly: at a threshold around magnitude 2.5, Italy has an event in most weeks. To create a meaningful comparison, the country was divided into fixed geographic cells. The task became:

Will a particular cell contain at least one magnitude 2.5 or greater earthquake during the next seven days?

The model was trained on the first 80% of the real timeline and evaluated on the final 20%. This is a chronological holdout: the model only sees the past, then is tested on a later period.

Three approaches were compared:

  • a historical spatial-rate baseline, which predicts using how often each cell has produced events in the past;
  • a small neural network trained only on real seismic features;
  • the same type of network first trained on synthetic data, then fine-tuned (adapted) using real seismic data.

The historical baseline achieved a balanced accuracy of 0.686 and precision of 0.344. Balanced accuracy gives equal weight to finding event cells and correctly rejecting quiet cells. Precision measures how many predicted cells really contained an event.

The real-only model reached 0.666 balanced accuracy and 0.269 precision. Synthetic pretraining improved this to 0.681 and 0.307, but it still did not beat the historical baseline. Four rolling tests, using several different training cutoffs, produced an average balanced accuracy of 0.668, with the weakest fold at 0.656.

These results are useful because they show the complete process working, but they do not show useful earthquake prediction. The model is not yet adding reliable information beyond the known geographical distribution of Italian seismicity.

A Map for Inspection

The system also renders a randomly selected held-out week on an offline map of Italy. Blue circles show actual INGV events; red crosses show the centres of cells predicted by the model. Marker size represents the magnitude proxy.

The map is deliberately a diagnostic picture, not a forecast product. Predicted crosses are independently generated cell locations, not actual events relabelled after the fact.

What Comes Next

The immediate work is to grow the synthetic corpus with more independent long runs and repeat the transfer experiment. The aim is to establish whether synthetic pretraining consistently helps across time periods, not merely in one split.

The real model will also be tested at several cell sizes and magnitude thresholds, with the choice made using training data only. More rolling holdouts will show whether performance survives changes in time period.

Most importantly, VLF data will remain a separate ablation (a controlled test with one input removed). Once the live record contains both positive and negative outcomes, seismic-only, seismic-plus-VLF, and astronomy-augmented models can be compared fairly.

At this point ELFQuake has a reproducible research pipeline and a clear baseline. It does not have demonstrated earthquake prediction capability. That is a useful result: the next improvements can now be judged against a real held-out standard rather than against a demonstration that merely looks convincing.

ELFQuake: A Working Experiment, Not Yet a Predictor

A Different Approach to AI Music

A Different Approach to AI Music

All music is derivative, largely based on known patterns. Rare is any major shift - techno drew on punk which drew on rock'n'roll which drew on blues which drew on traditional African music, much of which has a strong trance element, and thus it goes full circle. So I don't believe there's any reason to object to AI-generated music made with systems like Suno that by their very nature are derivative. Except... the fun part of it is taken out of the hands of the composer. Compare and contrast asking an AI model to create a techno anthem with asking an individual who is savvy with their pile of metal boxes. The latter is bound to have more energy.

Over the past few months I (with significant help from AI assistants) have been developing Digital Audio Workstation (DAW) plugins. Some sound synthesis things, but most of the emphasis has been on automating various aspects of composition. Generative, based on rules and pattern templates. I now have loads of VST plugins with mixed levels of success for the ideation that preceded them.

One thing I tried was having a DAW plugin call a little Web proxy, which in turn would call a remote AI service. The hope was to get it to generate solos in real time - the latency of the whole service-calling business put paid to that. So this one went on the shelf.

But a couple of days ago danbri drew my attention to reaper-mcp, which is kinda obvious once you realise the Reaper DAW can run Python scripts. It took me a couple of hours to get running (numpy didn't like my ancient Athlon II processor on that machine), and it needed a couple of bug fixes to run against the current Reaper - my fork. I now have it attached to Codex.

So I asked it to create a techno anthem (YouTube) using my plugins. It obliged. I expected it to glue together some of the generative plugins, but not, it wrote the midi itself. It's pretty dull, but as a demonstration of ability pretty amazing.

Last night I went for beers with Jacopo, told him about this, asked what he thought for a next step : Jazz in the style of John Coltrane! (This is why you need other people). So just now, ask so yer might receive, Coltrained (YouTube) it is. PS: Coltrained (rearranged) with more conventional (General Midi) instruments.

I wasn't entirely sure of the process Codex had used in the generation, so I asked for blog-style descriptions.

Over to AI...

Building a Techno Anthem from Scratch with Downspout and REAPER

I recently set myself a fairly specific challenge: start with an empty REAPER project, use the instruments and processors in the Downspout collection as the musical core, and turn them into a complete techno dance anthem rather than a short generative experiment.

The finished project runs at 132 BPM in 4/4, lasts 128 bars—just under four minutes—and uses eight tracks. The result combines a familiar club arrangement with Downspout's more algorithmic personality: a direct four-on-the-floor foundation, acid bass, anthem chords, a generated arpeggio, a melodic payoff, and increasingly strange textures around the transitions.

Choosing the palette

Before touching REAPER, I examined the Downspout repository and summarized the capabilities of all 24 plugins. That changed the way I approached the track. Instead of treating each plugin as an isolated novelty, I grouped them into musical roles:

  • generators and MIDI processors create structure;
  • instruments turn that structure into sound;
  • rhythmic effects add movement;
  • ambient and glitch processors handle transitions and contrast.

For this track, I settled on a deliberately compact palette:

  • DrumKit for the kick, hats, claps, and percussion;
  • Basilico for the monophonic acid bass;
  • Canticle for chord stabs, the lead, and breakdown harmony;
  • ArpGen feeding Floozy for the moving arpeggio;
  • Gremlin for unpredictable transition accents;
  • E-Mix and P-Mix for rhythmic gating;
  • Rift for glitch treatment;
  • Orchid and Ambo for held, spacious, atmospheric material.

That was enough variety to make the arrangement evolve without turning the project into a plugin catalogue.

Establishing the frame

I created a new REAPER project at 132 BPM. That tempo sits in a useful techno range: fast enough to feel urgent, but slow enough for the bass and large chord gestures to retain weight.

The song is organized as eight broad 16-bar regions:

  1. atmospheric intro;
  2. initial groove;
  3. build;
  4. first drop;
  5. breakdown;
  6. second build;
  7. anthem drop;
  8. outro.

Not every transition lands exactly on the same density curve. Some parts enter eight bars into a section, and several effects anticipate the next boundary. The grid is structural scaffolding, not a commandment.

Building the rhythm section

The kick is intentionally simple. DrumKit plays a four-on-the-floor pattern—one kick on every quarter note—with a delayed entrance during the intro, silence in the central breakdown, and a shortened outro. A techno kick earns its power through consistency and context; adding constant variations would have weakened the anchor.

The second DrumKit instance handles hats, claps, and open-hat variations. Its patterns become progressively busier:

  • the early groove uses restrained closed hats and backbeat claps;
  • the first drop introduces open hats;
  • the second build increases high-frequency activity;
  • the anthem drop uses the densest pattern.

E-Mix follows this DrumKit instance. Its role is not to replace the written rhythm, but to give the upper percussion an additional transport-aware pulse and stereo character.

I kept kick and bass centered. The upper drums received a slight pan offset, enough to open the middle without making the groove lean visibly to one side.

Writing the acid bass

Basilico supplies the bass voice. I wrote three related one-bar cells around C minor, using C, E-flat, G, and B-flat register relationships with occasional octave jumps. Each cell has four events, but the notes do not always fall squarely on quarter-note boundaries. Offbeat entries at three-quarter- and one-and-a-half-beat positions produce the push-pull movement that makes a simple monophonic line feel alive.

The three cells rotate between sections rather than repeating one pattern for the entire track. Velocity changes emphasize downbeats and selected syncopations, giving Basilico material it can use for accent-sensitive behavior. Notes remain short, leaving space for the instrument's envelope, glide, filter, and drive character.

The bass disappears during the main breakdown and returns in the build toward the anthem drop. That absence matters as much as any synthesis parameter: when the low end comes back, the arrangement feels larger without requiring an extreme level increase.

Creating the anthem harmony

The harmonic center is a classic minor-key dance progression:

C minor – A-flat major – E-flat major – B-flat major

Canticle plays these as compact chord stabs. The progression is intentionally legible and emotionally direct. Techno can thrive on ambiguity, but an anthem benefits from one element the listener can grasp immediately.

P-Mix follows the chord instrument, introducing probabilistic rhythmic gaps and stereo variation. This lets a sustained harmonic pattern breathe differently from one passage to the next while the underlying progression remains stable.

The chord part appears in the groove and both drops, but its volume envelope changes by section. It begins cautiously, grows through the first drop, retreats during the breakdown, and reaches its strongest point in the anthem section before fading toward the outro.

Generating motion with ArpGen and Floozy

The arpeggio track demonstrates the generator-to-instrument workflow at the heart of Downspout. ArpGen receives held seventh chords—C minor 7, A-flat major 7, E-flat major 7, and B-flat 7—and converts them into transport-synchronized motion. Floozy then turns that MIDI output into a more animated synthetic voice.

This track stays silent during the opening. It enters during the build, becomes audible in the first drop, disappears for the breakdown, and returns more strongly for the second build and anthem drop.

A conventional ReaDelay follows Floozy. The delay is there to extend the rhythmic pattern into the spaces between generated notes, while the track's conservative level prevents the repeats from masking the lead or chord stabs.

Saving the lead for the payoff

The lead does not appear until the final major drop. Canticle plays a four-bar melody in C minor built from a small set of recognizable gestures: a high C opening, a fall toward G and A-flat, an E-flat peak, and a response that resolves through the minor scale.

The motif repeats across 16 bars with enough space between notes for the processing chain to speak. Orchid adds voiced freeze and held-loop character, while Ambo supplies the wider time, shimmer, tape, and ambient field.

Keeping the lead out of the first half of the song makes it feel like an event when it finally arrives. The first drop proves the groove; the second drop delivers the theme.

Designing the breakdown

The breakdown uses a separate Canticle instance feeding Ambo. It plays four long minor and suspended-feeling chord voicings across 16 bars. Velocities are lower than the main stabs, and the notes overlap the space rather than behaving like rhythmic punctuation.

This track fades in at the start of the breakdown, grows toward its midpoint, and retreats just before the drums and bass return. The contrast is mostly architectural: remove the kick, reduce the bass, lengthen the notes, and let the ambient processor occupy the newly available depth.

Adding controlled instability

Gremlin provides sparse accents at section boundaries. Instead of running continuously at the front of the mix, it receives occasional low and mid-register trigger notes near bars 31, 47, 71, 87, 103, and 119. Rift follows it, turning those events into more disruptive transition material.

The Gremlin track is kept quiet most of the time. Its automation rises briefly near major boundaries and falls back immediately afterward. This makes the glitches feel like arrangement punctuation rather than a permanent layer of noise.

Mixing with envelopes

The mix uses broad automation rather than dozens of tiny corrective moves. Volume-envelope points sit mainly at structural boundaries:

  • the chord stabs rise between groove and drops;
  • the arpeggio fades into builds and out of breakdowns;
  • the lead remains effectively silent until its entrance;
  • Gremlin receives short transition-focused lifts;
  • the ambient breakdown track forms one large rise and fall.

These are arrangement envelopes as much as mix envelopes. They control attention: which layer owns the foreground, when density should increase, and how much room remains for the next arrival.

Static track levels establish the initial hierarchy. Kick and bass are strongest, drums sit below them, chord and lead parts occupy the middle, and atmospheric/glitch layers remain quieter. Moderate pan offsets separate complementary parts while the low-frequency foundation stays centered.

Working through the technical edges

Building the song through the REAPER MCP server exposed several compatibility differences between the server and the installed reapy 0.10 API. Track volume and pan properties needed to use REAPER's native information calls. Project saving required the correct native save function. MIDI construction became much more reliable after adding a batched clip operation instead of sending every note as a separate high-level request.

Envelope handling had two subtleties. A missing REAPER envelope is represented as a nonempty null-pointer string, so a simple truth test is insufficient. Volume-envelope values also need conversion through REAPER's envelope scaling mode; otherwise apparently successful points can be written with the wrong values.

I verified the automation by inspecting the saved .RPP data, not merely by trusting successful API responses. I also opened the final project from its requested path and ran an eight-second playback smoke test across the transition into the first drop.

The completed project

The final session contains eight tracks, 22 MIDI items, 18 plugin instances, and a 128-bar arrangement lasting approximately 3:53.

Its most important design decision is restraint. Downspout contains enough generative and destructive tools to make every track move constantly. The anthem works because those tools have assigned roles: stable rhythm at the center, generative movement around it, recognizable harmony above it, and controlled instability only when the arrangement needs a transition.

The result is not merely a demonstration of 24 plugins. It is a song built from a smaller, complementary subset—one that uses algorithmic tools to reinforce a familiar dance-floor arc rather than obscure it.

Following the Techno Anthem with an Original Modal Jazz Quartet

After building a full techno anthem through REAPER MCP, I tried a very different challenge: create a short original jazz piece that draws on the broad musical qualities associated with John Coltrane—modal harmony, motivic development, rhythmic urgency, and an increasingly intense melodic arc—without copying any particular tune or recording.

I began by reading Downspout's plugin summary and reducing the collection to a small acoustic-style quartet. Canticle supplied both a reed-like lead and a keyboard voice, Basilico used its upright model for bass, and DrumKit handled percussion. A shared ReaVerb bus gave the ensemble a common room rather than placing a different ambience on every track.

The piece is a 32-bar form in 6/8 at 168 BPM. It opens sparsely, states an original eight-bar head, expands that material into a developmental solo, and returns to the head in a higher and more forceful register. The harmony stays mostly minor and modal, with chromatic shifts and a dominant pedal providing contrast. Instead of generating unrelated solo notes, I built the improvisation from short cells taken from the head, then changed their register, rhythmic placement, density, and velocity across the middle section.

The rhythm section was written to support that arc. Basilico plays a six-note walking pattern in each bar, mixing chord tones with approach notes. Canticle's piano part uses restrained offbeat voicings rather than continuous block chords. DrumKit maintains the compound-meter pulse with ride cymbal, hi-hat, kick, and occasional snare comping. The parts remain on separate tracks so that every musical role is editable inside REAPER.

I sent the MIDI to REAPER in four batched clips: 124 lead notes, 240 piano notes, 192 bass notes, and 336 drum notes. Batching was important because sending individual notes through MCP would have made the session much slower and more fragile. I also saved the construction logic as scripts/reaper-modal-jazz-arrangement.py. The script accepts tempo and bar-count arguments and emits the same relative-time MIDI dictionaries used by REAPER MCP, making the arrangement technique reusable without relying on temporary files.

The mix was intentionally conservative. The lead sits slightly left, piano and drums slightly right, and bass remains centered. Lead, piano, and drums feed the shared room at low send levels, while the master stays at -1.5 dB for headroom. REAPER's master-FX helper exposed a bridge-side type error, so I did not claim that a limiter had been installed. The project saved successfully as an editable .RPP; the offline WAV render later exceeded the MCP timeout and produced no audio file.

This smaller experiment reinforced the main lesson from the techno project: generative tools become musical when they serve a clear form. The important work was not asking the system for hundreds of notes. It was defining an ensemble, giving each part a role, developing one recognizable idea, and preserving enough space for the arrangement to breathe.

A Different Approach to AI Music

Generative VST Plugins

Generative VST Plugins

score

With considerable help from Codex, I've built a bunch of these. They are over here on GitHub : code, docs.

This demo on YouTube features a bunch of them wired via sends in Reaper. Some of the sounds were made in the box, some created in modular. But all the midi notes have been generated algorithmically.

The bass line, as in the unintelligible score above was created by Ground :

screenshot

Here is a description of the algorithms.

Generative VST Plugins

A Tune Created for AI

A Tune Created for AI

A few days ago, after a morning in the music room I had a track I thought was ok, wanted to upload to YouTube, but couldn't help thinking it really needed some visuals to go with it. Last year, with the help of Claude, I made Hillside, a set of generative visualizations for a set of tracks I'd recorded (live here). It runs in a browser, canvas-based JS. So I dug that out and spent many hours with Codex trying to get it to render to mp4. It really was a gruelling session. Codex went down many blind alleys to get anything properly rendering. In the process managed to mess up the original generative algorithm. But it finally managed to get it to render one of the visuals as a reasonable vid (result here).

I couldn't help anthropomorphising Codex a bit. It'd put so much effort in. So then I asked it to make the kind of generative video setup you'd like to see, tell me what you want and I'll make the sounds. Twenty minutes later Codex had built something, and gave me a brief.

Tides

Tides is intended for quiet, spacious, late-night ambient techno.

Music Brief

  • Around 95-115 BPM, with a slow pulse but not sleepy.
  • Deep rounded kick, soft sub-bass, and lots of negative space.
  • Small delayed percussion clicks, filtered noise, and occasional metallic ticks.
  • Warm pads or drones that slowly change harmony.
  • No huge drops; more like pressure, drift, and small details emerging from darkness.

There was also a description of the visualization etc, here : tides.md

This morning I created something vaguely along the lines of the brief. I've been having a lot of fun recently creating VST plugins with Codex, so this was a good opportunity to try them out. The sounds are about 50/50 the Downspout Plugins and the modular rack (including neurotic firmware on a module to give the bass a bit of grit).

Then tried Codex's new visualization renderer. Took about an hour and the result was a bit disappointing. Some expanding circles and some very faint wavy lines.

But I saw the potential... Ok, I asked for the circles to be wavy, the faint lines to be more visible, and please add some procedurally generated sea creatures.

Another hour later, this was the result Tidepool. It looks like it might feature in a 20th century kids TV animation. But I'm happy with it.

A Tune Created for AI

Browse earlier articles