Musical Intelligence Engine
Not a key detector. Not a compatibility matrix. A reasoning engine that understands your entire library, predicts how every choice will feel to the room, and speaks to you like a world-class mentor standing beside you.
The Problem
DJs spend hours, sometimes days, searching for the right track to follow the one before it. Not because they lack taste or skill, but because the combinatorial space is beyond human cognition.
Every track relationship is governed by at least five independent dimensions: harmonic compatibility (key, mode, cadence resolution), rhythmic coherence (groove signature, syncopation density, swing alignment), timbral continuity (spectral density, frequency band occupation, sonic texture), energy trajectory (arousal level, tension-release cycle, peak placement), and emotional arc (dopamine anticipation, hedonic adaptation, narrative momentum).
A library of 500 tracks produces 249,500 possible pairings. Each pairing scored across five dimensions yields over a million data points. The human brain, limited to roughly four simultaneous variables in working memory (Cowan, 2001), cannot evaluate this space. It approximates. It relies on habit. It gets lucky sometimes.
The DJs who build truly great sets, the kind that feel like a single unbroken journey, arrive there through one of two paths: weeks of obsessive trial and error, or the rare gift of a flow state where intuition briefly touches what cognition cannot reach.
Doors of Harmony takes away the burden of this process without taking away the joy or the skill. It does not remove the need to be creative. It lays the foundation to create the most extraordinary soundscape experience a DJ can have.
Your track choices still matter. Your taste still defines everything. Doors of Harmony finds the best order of your favourite music, scored across every dimension the brain cannot hold at once. The set is still yours. It is still intimate, still personal. But now the invisible relationships between your tracks are visible, and the impossible combinatorial space becomes navigable.
Sell the problem you solve, not the product you have. β Richard Branson
Architecture
Raw signal becomes musical wisdom. Each layer is purpose-built. The moat is the reasoning layer: it explains WHY, not just WHAT.
Industry-standard libraries extract low-level audio features. BPM, beats, stems, MIDI. The raw material before interpretation.
The product. Every analyzer was purpose-built to extract what matters musically: groove fingerprints, emotional arcs, raga classification, harmonic relationships. No off-the-shelf solution does this.
Analysis feeds into a Claude-powered reasoning layer with 10 function-calling tools. It speaks in feelings and moments, not scores. Mentor voice. Structured output. Actionable intelligence.
Musical Intelligence
Each analyzer was built because no existing tool gave us what we needed. Together they form a complete musical fingerprint of every track in your library.
BPM, key, mode, beats, energy level, and structural sections. The skeleton everything else is built on. Essentia key detection for accuracy beyond librosa defaults.
Chord progression extraction and cadence detection. Finds the harmonic DNA: what chords are actually sounding, what resolutions are happening, what the actual key center is.
Not a single mood tag. Four independent emotion signals tracked across the track's timeline. Energy, valence, tension, and release curve as the track breathes.
Swing percentage, syncopation score, polyrhythmic layers. The groove signature: where the energy lands relative to the beat. Is it on-grid techno or off-beat, alive, pulling? The difference between music that makes you move and music that doesn't.
Modal analysis section by section. Detects when a track shifts mode mid-journey. Dorian verse, Phrygian bridge, back to Dorian. The color map of the track's harmonic world over time.
Finds the hooks. Melodic fragments that repeat and evolve. The motif map tells you what's memorable about a track and where those moments live for strategic mixing.
Musical phrases classified as questions (tension, unresolved) or answers (resolution, arrival). Phrase alignment is rule 1 of The Rules. This analyzer finds every phrase boundary in the track.
Scores every track against 7 Indian ragas and 6 Arabic maqams across four independent dimensions: note content, melodic movement, emotional quality, and temporal character. The foundation for Raga Mode.
The core. Given any two tracks, scores their compatibility across eleven musical dimensions: harmonic, modal, energy, groove, timbral, emotional, rhythmic, and more. The Callipari spectrum replaces Camelot's binary compatible/incompatible with a graduated map of musical possibility.
Intelligent sample detection and slicing. Finds the moments worth extracting: the drops, the melodic peaks, the textural openings. Sets up the MIDI export pipeline.
Five frequency bands (sub, low-mid, mid, high-mid, air) analyzed for density. Finds the creative openings: where in the frequency spectrum is space available for layering, sampling, or EQ carving during a blend.
Reasoning Engine
Analysis feeds into function-calling tools. The engine quantifies internally. It translates to experience externally. Never says "incompatible." Always says what it will feel like.
Scores entire library against current set state. Returns ranked candidates with harmonic, energy, groove, timbral, and arc scores. Explains each recommendation in plain language.
Input venue, time, crowd state. Output: 30-minute energy arc curve with 5-minute targets. Four arc types: underground, festival daytime, festival indoor, radio. Crowd state shifts the curve up or down.
Full transition recipe for any two adjacent tracks: cue points, EQ moves, blend technique, phrase alignment, spectral complement analysis, mix window options.
Natural language search across analyzed library. "Find tracks in the Yaman raga family with energy 5-7 and dark groove" returns ranked, explained results.
Deep-dive on any two tracks. What is their harmonic relationship? What will the crowd feel? What technique should be used? What are the risks? What are the opportunities?
Updates internal set tracking: current track, position, valley history, phi point tracking, warnings. The engine's memory of where you are in the arc.
Given any track, generate the modes and melodies that will work harmonically. The creative map around any song in your library.
Full analysis readout for any track: all 11 dimensions, emotional trajectory, raga classification, spectral space, groove fingerprint.
Passive monitor. Fires warnings: stasis detected (12+ min energy flatline), valley needed, opening restraint violated, resolution window approaching.
Re-weights all scoring based on context: venue type, time slot, style direction, crowd state. A festival peak slot wants different logic than a closing sunrise set.
"Track B would be a parallel minor shift β same root note, same BPM, but the mode drops to Aeolian. The floor stays under your feet, but the light changes. It will feel like walking through a door into a darker room. The crowd isn't ready for the tritone yet β they haven't peaked. Save that for after track 9. This is the right emotional deepening for where you are in the arc."
Products
The DJ product is the wedge. The psychedelic product is a separate premium offering. Both run on the same intelligence foundation.
A living map of your entire music universe. Build sets with reasoning that feels like a world-class mentor beside you. The preparation tool for serious DJs.
Glanceable second-screen coaching during the actual performance. Attention is scarce. Every extra sentence is a burden. This is the instrument panel with taste.
A separate clinical and ceremonial music guidance product. Session architecture matched to pharmacological curves. Not a mode. A different product with different trust requirements.
Raga Mode
Not a filter gimmick. A structural philosophy. Indian classical music spent 2000 years solving the exact problem DJs have: how to create a coherent, evolving, emotionally intentional long-form tonal journey.
The raga tells you: this is the tonal world. The sa (root) is your anchor. Depart from it, explore the degrees, build tension around the vadi (emphasized note), and return home. The structure IS what enables the freedom. Rules free the DJ.
Neuroscience
Every rule in the engine is anchored to peer-reviewed research. The DJ's art is the brain's biology made visible.
Groove activates the motor cortex before conscious processing. Syncopation β energy landing between beats β creates the anticipation-reward loop. This is why off-beat music makes you move even when you're trying to stand still.
The caudate (anticipation) activates harder than the nucleus accumbens (reward). "When is it going to drop?" is chemically MORE engaging than the drop itself. Invest in the build. Don't rush to the payoff. The Zeigarnik effect: unresolved tension is remembered longer.
Sub-bass frequencies couple with the vestibular system. The 18-100Hz range creates physical sensation before auditory processing completes. This is why bass is somatic: it's a body event, not just a sound. The bass swap during a transition moves the physical ground beneath the crowd.
After 8-12 minutes at the same energy level, hedonic adaptation kicks in. Receptors saturate. The crowd stops feeling the energy. A dip to valley resets the receptor. The next push to the same energy level feels higher than before. You MUST dip to make the peak hit harder.
The crowd unconsciously tracks bar count. Neural entrainment to 8, 16, and 32-bar structures is automatic and pre-cognitive. A transition at the right phrase boundary feels RIGHT in the body. Mid-phrase, it feels WRONG. This is neurological, not taste.
Kahneman's peak-end rule: the remembered quality of an experience is dominated by how it felt at its peak and how it ended. A great peak with a lazy ending equals "good set." A great peak with a beautiful resolution equals "unforgettable set." The last 15% is not afterthought. It is the memory.
The Rules
The same principles apply at every scale: the transition, the arc, the live blend. Break them and people feel it, even if they can't explain why. The engine holds these rules so the DJ can hold the vision.
Mix on 8, 16, or 32-bar boundaries. The body entrains to phrase structure. When the kick drops on bar 1, it feels RIGHT. On bar 13, it feels WRONG.
Tracks sharing 2+ chord tones blend. More shared notes = smoother. Fewer = tension (which can be good). Callipari's universal law: a graduated spectrum, never binary.
0-1 point: seamless. 2-3: noticeable. 4+: dramatic or jarring. Weber-Fechner law: perceived delta depends on current energy level, not absolute change.
Long blend (16-64 bars): Track A and B create a THIRD thing. Neither A nor B β a composite that doesn't exist in either track alone. That's the "where does this rhythm come from" feeling.
Maintain sonic palette across transitions. The vibe is the thread. Don't break it without intention. Shift the palette gradually over 2-3 tracks, not in one jump.
0-3 BPM: undetectable. 4-6: noticeable. 7+: requires breakdown, cut, or creative bridge. 86.1% of real DJ transitions adjust BPM less than 5%.
Sustained high energy diminishes impact. After 8-12 minutes at energy 8, the crowd stops feeling it. A dip to 5 for 2-3 minutes resets the receptor. The next push to 8 feels like 10.
Each valley floor should sit slightly higher than the previous one. The audience perceives endless ascent even as energy regularly dips. Logarithmic perception makes the rising floor felt subconsciously.
No dimension should flatline for more than 12 minutes. If energy holds, shift harmony. If harmony holds, shift rhythm. Attention span research: novelty resets the attention clock.
The build fires more dopamine than the drop. Invest in the build. Zeigarnik effect: unresolved tension is remembered better than resolved. Create moments that almost resolve but pull back.
Hold back in the first 15-20%. The opening establishes the floor so the ceiling feels higher. Anchor at 3 and your peak at 9 feels like +6. Anchor at 7 and the same peak feels like +2.
The last 15% must feel like a deliberate landing. Peak-end rule: great peak + lazy ending = "good set." Great peak + beautiful resolution = "unforgettable set."
During a blend, Track A and B should fill each other's frequency gaps, not fight over the same frequencies. The composite becomes richer than either track alone.
EQ isn't just avoiding clashes. It's sculpting the blend. The bass swap IS a moment. The crowd feels the foundation shift under them. Every EQ move is a narrative event.
During a blend, there are moments where neither track is fully present. The crowd hears a THIRD thing β a composite that exists only in that transition. This is what separates DJing from playlist playback.
Arc Prediction
Input venue, time slot, and crowd state. The engine predicts the optimal energy arc for the next 30 minutes. Four arc types derived from Richie Hawtin, Adam Beyer, and Dubfire sets. Crowd state shifts the curve in real time.
The Interface
Every track is a star. Relationships glow with meaning. Drag to the timeline and watch the universe reorganize around your choice. The Obsidian graph view β for music.
Differentiation
| Capability | Mixed In Key | DJOID | Doors of Harmony |
|---|---|---|---|
| Key detection | β | β | β + modal color per section |
| BPM analysis | β | β | β + groove fingerprint + swing |
| Compatibility scoring | Binary (yes/no) | Camelot wheel only | 7-level graduated spectrum |
| Emotional arc tracking | β | β | β 4-signal trajectory per track |
| Set arc intelligence | β | β | β peaks, valleys, Shepard principle |
| Natural language reasoning | β | β | β mentor voice, explains WHY |
| Constellation graph | β | β | β living relationship map |
| Raga / tonal world filtering | β | β | β 7 ragas + 6 maqams, 4D scoring |
| Arc prediction by context | β | β | β venue + time + crowd state |
| Transition recipes | β | Basic cue points | β cue points + EQ + spectral analysis |
| Neuroscience-backed rules | β | β | β Salimpoor, Brickman, Kim, Grahn |
The First Demo
The first unforgettable version is a full set build. Not two songs. A whole set, organized according to principles of harmony and groove. No existing tool lets you drop 50 or 100 tracks, pick three anchors β your peak song, your favorite, the one they're all waiting for β and have the engine weave the perfect sequence so that song arrives like a revelation.
The hard problem
Two songs is easy. Everybody knows that. But understanding why these 5, 10, 20, 30 songs belong together in this order, on a bigger fractal scale β that is what breaks human brains. The machine sees the whole chain. You see the journey.
The wow moment
On top of the sequence, it says: this melody comes back three times. That is why it has meaning. It becomes part of the tapestry of your sonic signature. The engine surfaces what your subconscious already felt but could never explain.
Three stages
01 Set Intelligence
Drop 100 songs. Pick three anchors. Get a sequence you could never have built yourself. Manual set building with superintelligence. You still DJ. The machine thinks for you.
02 Sonic Exploration
Coolest loops. Best rhythms. Meaty melodies that can be woven through a whole set. Start sliding things, moving things. Paint something. This is where it gets extraordinary.
03 Sonic Perfection
A scale from 60 to 100. Most DJs don't even play at 60. The engine pushes you toward 85, 90. Big DJs perfect on top of suggestions, design sounds, import them, push the envelope further than their brain alone could reach.
"The human brain cannot create a non-stop great set. The brain gets tired. DJing is mental: buttons, sounds, effects, everything at once. If this machine does that without getting tired, creating amazing sets, it shows you possibilities. You learn from it. It saves your brain space to create sonic magic."
β Janua, March 2026
Why This Matters
There is a story about a chess grandmaster who lost two kilos of body weight during a single match. Not from moving. From thinking. The mental effort was so intense it physically consumed him. People do not understand this about elite cognitive performance.
DJing is cognitive work
Preparing a set is an extreme use of brain power. You deplete cognitive strength before you even walk in. Then in the booth: BPM alignment, phrasing, bars, loops, spectral density, energy flow β all simultaneously, in real time, in front of a crowd.
What DoH frees
If the machine handles set construction, you arrive fresher. More space to play, to experiment, to feel the room. Not replacing the DJ. Freeing their headspace for the part only they can do β the part that cannot be automated.
The traditionalist argument
On April 1, 2026, Pioneer posted a joke about removing the sync button from their mixers. Many DJs reacted with genuine joy. This virtue signaling is the same argument that showed up when CDs replaced vinyl, when Traktor replaced CDs, when the sync button appeared. The resistance is always about identity, never about quality.
The DJs who freed themselves from manual beat-matching did not become worse DJs. They became more present. They focused on taste, instinct, the room. Doors of Harmony does that at the set-construction level. Every generation calls the next tool blasphemy. Then it becomes baseline.
"Once you see it, you will never look back."
β Janua, April 2026
Tech Stack
Python analysis engine, FastAPI server, React + Three.js + D3.js frontend. Claude API for reasoning. Tauri for desktop packaging when ready. Every choice made for quality, not convenience.
Raga Arc Architecture
What started as a question about emotional arc structure in DJ sets became something larger. Fourteen insights discovered in one night. This is the intellectual foundation of Doors of Harmony.
A library of 500 tracks produces 249,500 possible pairings. Each pairing scored across five dimensions yields over a million data points. The human brain, limited to roughly four simultaneous variables in working memory (Cowan, 2001), cannot evaluate this space. It approximates. It relies on habit. It gets lucky sometimes.
The DJs who build truly great sets arrive there through one of two paths: weeks of obsessive trial and error, or the rare gift of a flow state where intuition briefly touches what cognition cannot reach.
The wrong approach: "This track is in Raga Bhairavi."
The right approach: "Here is how a master musician builds tension, peaks, and resolves over 60 minutes. Use this shape."
The raga becomes an invisible blueprint. The DJ never needs to know the word "raga." They see: "Deep Journey (90 min, slow build, single peak at 70%)" or "Dawn Energy (60 min, rising warmth, no hard peak)."
3,000 years of performance tradition distilled into a draggable arc template. The source is invisible. The shape is everything.
The raga arc is fractal. The Alap-Jor-Jhala-Gat shape repeats at every zoom level. Not metaphor. Measurable. Voss & Clarke (1975, Nature): music follows 1/f noise distribution, self-similar structure across all timescales.
A DJ does NOT return to their own root (Sa). They resolve to the next DJ's root. Each set is a complete arc, but tilted upward. The overall party arc keeps ascending even though each individual set has its own internal arc.
Exception: the closing DJ. They DO return to the true root. They complete the party raga. Their gat is the real resolution.
This mirrors Indian classical concert structure: 3-4 performers, each starting higher than the last, the evening itself forming one ascending journey made of smaller complete journeys.
The ending key of a set is NOT arbitrary. The brain tracks tonal center across the entire set. If 40% of tracks were in A minor / C major territory, that becomes the set's emergent Sa. Ending on or near this center = resolution. Ending far from it = "something missing."
Opening key memory: The brain remembers the opening. Returning to opening key creates completion. Sonata form: depart from home, return to home. (Huron, 2006)
Peak-end rule: People judge experiences by the peak moment and the ending. Not the average. (Kahneman, 1993). Last 5-10 minutes are disproportionately defining.
For DoH: Calculate the set's emergent tonal center from all chosen tracks. Recommend ending keys that resolve to it. Not one fixed Sa. YOUR Sa, derived from YOUR set.
These are not mood labels. They are specific interval relationships that trigger specific neurological responses. They can be detected in any music, not just Indian classical.
| Raga | Mechanism | Emotion |
|---|---|---|
| Bhairav | Half-step intervals create gravitational pull toward anchors | Meditation, settling |
| Malkauns | Removing the fifth eliminates resolution, infinite suspension | Fearless depth |
| Bhairavi | All-flat notes = maximum melodic pull, beauty within sadness | Completion, everything |
| Yaman | Raised fourth = upward aspiration, forward momentum | Romantic longing |
| Darbari Kanada | Slow oscillation on flat notes = gravitas | Majestic detachment |
| Hamsadhwani | Leaping intervals, no fourth = buoyancy, soaring | Joy, invocation |
| Bhoopali | Remove desire (Ni) and attachment (Ma) = non-attachment | Serene clarity |
Download 3-5 performances of the SAME raga by different masters. Run through DoH energy analyzer.
If arc shapes are consistent across performers: the arc belongs to the raga itself. Hypothesis confirmed. Extract templates.
If arc shapes vary wildly: the arc belongs to the performer. Study performers instead.
3 ragas x 3-5 performances = 9-15 recordings. Surgically chosen for maximum contrast.
The raga arc architecture is not a DJ feature. It is a universal framework for structuring human experience through music. Three products emerge from one engine.
DoH doesn't just arrange your tracks. It tells you what's missing. The DJ goes digging with purpose, not browsing randomly. Surgical shopping guided by the arc.
A psilocybin session IS a raga. Unlike a multi-DJ event, a therapy session has NO relay. The tonal center (Sa) must be maintained through the entire journey.
Why: The unconscious mind needs a harmonic HOME when the ego dissolves. The Sa acts as the tanpura drone: always present, always grounding. Too much harmonic wandering = no sonic ground = difficult experiences become overwhelming instead of transformative.
Research backing: Mendel Kaelen (Imperial College London, Psilodep trials) found music acts as a "hidden therapist" during psilocybin sessions. Musically coherent sessions produced better therapeutic outcomes than random playlists. The structure is not decoration. It IS the therapeutic container.
The DJ loses themselves because the combinatorial space is too large. That IS the problem DoH solves. The engine holds what the brain cannot. The visuals show what's working without requiring understanding of why.
Harmony = beauty emerges. Sacred geometry patterns form when combinations align across the 5 dimensions. More perfect = more complex, more beautiful geometry. The DJ sees harmony, doesn't read numbers.
Clash = geometry breaks. Lines fragment, patterns dissolve, colors shift to amber/red. You feel the clash before you hear it.
The intelligence is invisible. The feedback is visual and instant. Drag, combine, look.
Traktor has 4 decks, loops, stems, remix decks. The tools for multi-layer mixing exist. What's missing: no intelligence, no overview, no arc. DoH is the MAP. The DJ performs in their tool of choice. DoH is where you PLAN, where you SEE the whole journey, where the intelligence lives.
The DJ pins key moments: "This is my peak track." "This is my opener." Everything else moves accordingly. The engine finds the optimal path between pinned moments. Like GPS: you set the waypoints, the engine calculates the route.
The engine is honest. It doesn't force a bad combination. It says what's possible, what's a stretch, and what's missing. Then it shows you where to buy the missing piece.
"Your library gives you 74% of what this arc needs. Valley at 45 min is unfilled. Bridge from peak to close is missing."
The engine doesn't guess. It knows exactly what's missing across all 5 dimensions.
"You're at 82%. This track at $1.29 takes you to 94%. Want me to find it on Beatport?"
Affiliate revenue on every surgically recommended purchase. Incentives align: better engine = more tracks sold.
So many DJs lose the crowd at some point. It's so hard to keep the brain and body engaged and locked in. No wonder drugs are used. But if we apply everything we learn here, maybe we can tap into the natural and universal principles of sonic immersion.
This is the mission. Not a tool. Not a product. A mission.
"One day I will do a TED talk on what we created."