Fareed Barakaفريد بركة

neuro-sonix

Neuro-Sonix

Text-to-music sonification engine

NeuroSonix turns alphabetic text into a full musical composition — pitch, rhythm, dynamics, and harmony — rendered straight to MIDI, to audio, and to a picture of the score. Idea conceived by Khaled Barakeh, developed and implemented by Fareed Baraka.

Rebuilt from the ground up: what began as a handful of hand-glued scripts producing one archival piece is now one real engine, extended to compose, synthesize, and visualize any text on its own.

View on GitHub Connect on LinkedIn

How It Works

Pipeline

Text │ A-Z → 26 consecutive chromatic semitones (A=C2 .. Z=C#4) ▼ Pitch │ note length ← each letter's information content (rare ▼ letters land longer, common ones pass quickly) Rhythm │ velocity ← a rise-and-settle arc per sentence, with ▼ accents on word starts, capitals, and punctuation Dynamics │ a Markov chain over diatonic chords, reweighted at each ▼ step by how well each chord fits the melody underneath Harmony │ 7ths, cadences at every sentence end, walking bass between ▼ chords; arrange: countermelody, arpeggio & percussion, staged in Arrangement │ → MIDI (up to 6 tracks) → audio (dreamy synth: chorus, ▼ rubato, echo & reverb) → piano roll → interactive player

Harmony comes from a hand-authored Markov chain over functional-harmony tendencies, not a trained neural network — now with 7th chords, real cadences at the end of every sentence, and a walking bass line between chords. The audio is rendered by a built-in synthesizer tuned deliberately dreamy: soft-bloom attacks, unison chorus on every voice, notes that stretch into their own silences, a tempo-synced echo, and a large, dark reverb — with the noisier elements (a ticking hi-hat, breath hiss, hard bass drive) pulled back or removed. A finished piece never has to leave the pipeline for a DAW or soundfont.

Try It Yourself

Interactive player

Play either demo piece back with a synced, animated piano roll — the melody, harmony, countermelody, arpeggio, bass, and percussion all moving together, with the source text highlighted letter by letter as it sounds.

Open the interactive player

A Missing Camera

The original piece, 2024

The composition that proved the concept: a testimony rendered note by note through NeuroSonix's original chromatic encoding.

A Missing Camera — NeuroSonix composition

Manifesto

New demonstration piece · chromatic melody

"Language becomes an instrument..." — a short text about the engine, sonified by the engine, in D minor, fully arranged: melody in blue, Markov-generated harmony in orange with real 7th chords and cadences (roman numerals mark each chord), a parallel-harmony countermelody in violet, an arpeggiated chord layer in gold, a walking bass line in green, and a soft chime marking each new sentence — all staged in gradually rather than playing from the first note, with legato phrasing, rubato-like note stretching, echo, and a large dark reverb giving it a dreamy, unhurried quality.

Piano roll of the Manifesto piece showing melody, harmony, countermelody, arpeggio, bass, and percussion tracks with letters and chord names labeled

Manifesto — NeuroSonix composition

Play interactively

Entropy

New demonstration piece · tonal melody

A short text about the engine's own rhythm rule — rare letters ringing longest — sonified by that same rule, and in tonal mode: the melody is snapped onto D minor's scale instead of staying fully chromatic, so it sits fully consonant with the same countermelody, arpeggio, bass, and percussion arrangement as Manifesto.

Piano roll of the Entropy piece showing melody, harmony, countermelody, arpeggio, bass, and percussion tracks with letters and chord names labeled

Entropy — NeuroSonix composition

Play interactively

Modulation

New demonstration piece · scale modulation

"A scale is not a fact, it is a choice of what to leave out..." — six sentences, six different modes sharing the same tonic (D dorian → phrygian → aeolian → mixolydian → lydian → major), the same words landing in a different light each time. Every scale change is marked on the piano roll with a dashed line and its name; the chord letters themselves are computed correctly for whichever mode is active at that moment, not just major and minor.

Piano roll of the Modulation piece showing six labeled sections in different modes, each with its own chord roman numerals, melody, harmony, countermelody, arpeggio, bass, and percussion

Modulation — NeuroSonix composition

Play interactively

Explore the Full Project

Code & data

The full engine, its source, and both demonstration pieces are documented on GitHub, alongside the original 2024 prototype.

View on GitHub Connect on LinkedIn