frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: Nallely a modular reactive Python framework for custom MIDI instruments

https://github.com/dr-schlange/nallely-midi
2•drschlange•3mo ago
Hi HN! I'm Vince. I built Nallely, a modular reactive Python framework for creating custom MIDI instruments by patching signal-processing modules together, like a modular synthesizer for controls systems. Nallely focuses on real-time, thread-isolated, reactive behavior, letting you experiment with emergent behaviors.

Demo video: https://www.youtube.com/watch?v=rbMnKAdqAVI building a patch from scratch and hot-debugging a running instance near the end.

Key features:

* Visual patching interface for connecting reactive modules (neurons),

* Extensible via Python API, WebSocket, and/or code generation,

* Integrates any input source (MIDI, webcam, ...) to control synthesizers.

# Yes, but why?

Existing software/libraries that proposes MIDI manipulation are powerful but not friendly to live experimentation. They are low-level, hard to rewire on the fly, and often heavy for embedded or headless setups. I wanted a system that could also evolve dynamically where modules could be patched, hot-swapped, and debugged in real time.

# Architecture

The system is built around a reactive threading model with no shared data: each neuron lives in its own thread and communicates by sending messages through channels. No more CC,... , at the neuron level, everything is a signal (a simple int/float value through time). No global tick, each neuron works on its own time. Each neuron being reactive, they are sleeping the majority of the time. The system takes heavy inspiration from the "Systems as Living Things" philosophy and Smalltalk by treating each thread as a small living entity more than a processing unit. Here is how to code a simple Sample&Hold module:

    class SampleHold(VirtualDevice):
      input_cv = VirtualParameter(name="input", range=(0, 127))
      trigger_cv = VirtualParameter(name="trigger", range=(0, 1), conversion_policy=">0")

      @on(trigger_cv, edge="rising")
      def hold_value(self, value, ctx):
        return self.input
The control layer uses a small WebSocket protocol that the react-based web UI uses to control and introspect sessions. A WebSocket-bus neuron lets external application auto-register to it to send/receive signals: another neuron in the network can serve signals captured from any source. They're useful to distribute computation loads on different machines.

# What have I learned so far

A simple threading model can be powerful in a MIDI/music context:

* you can stop/resume a thread, stopping a part of the processing chain seamlessly;

* overflown neurons can mitigate the pressure without impacting the whole session;

* if a thread crashes, it is paused to give you the ability to debug the instance, and resume it;

* simple websockets have an acceptable throughput.

I was expecting a system entirely based on Python threads to be really ineffective, but it's surprisingly reasonable. Empirically I see ~1-2 % CPU per thread. A 20 threads classical session (~45 patches) uses roughly 21% CPU and 45MB RAM on CPython 3.13 GIL. CPython 3.14 no-GIL shows similar CPU but ~65MB RAM. Feedback loops raise usage (~38 %). Interestingly, on CPython 3.13 the load spreads across multiple cores, I suppose that the threads are sleeping enough to release often the GIL.

# Try it!

You can grab a precompiled PyInstaller built binary in the latest github actions artifacts. Doc is linked in the README, and deep-dive posts are available here: https://dr-schlange.github.io/nallely-midi/posts.

# I would love feedback

* What could be improved to make it easier to get familiar with?

* Are there blind spots or design choices that could be problematic long-term?

* Although it's MIDI-oriented, the system is really signal-agnostic, any idea for non-audio use-case? (e.g. visuals, etc)

Show HN: Look Ma, No Linux: Shell, App Installer, Vi, Cc on ESP32-S3 / BreezyBox

https://github.com/valdanylchuk/breezydemo
133•isitcontent•5h ago•14 comments

Show HN: I spent 4 years building a UI design tool with only the features I use

https://vecti.com
237•vecti•7h ago•114 comments

Show HN: If you lose your memory, how to regain access to your computer?

https://eljojo.github.io/rememory/
163•eljojo•8h ago•123 comments

Show HN: R3forth, a ColorForth-inspired language with a tiny VM

https://github.com/phreda4/r3
45•phreda4•5h ago•7 comments

Show HN: Smooth CLI – Token-efficient browser for AI agents

https://docs.smooth.sh/cli/overview
76•antves•1d ago•56 comments

Show HN: Slack CLI for Agents

https://github.com/stablyai/agent-slack
38•nwparker•1d ago•8 comments

Show HN: FastLog: 1.4 GB/s text file analyzer with AVX2 SIMD

https://github.com/AGDNoob/FastLog
3•AGDNoob•1h ago•1 comments

Show HN: Artifact Keeper – Open-Source Artifactory/Nexus Alternative in Rust

https://github.com/artifact-keeper
147•bsgeraci•23h ago•61 comments

Show HN: Gigacode – Use OpenCode's UI with Claude Code/Codex/Amp

https://github.com/rivet-dev/sandbox-agent/tree/main/gigacode
9•NathanFlurry•13h ago•4 comments

Show HN: I built a directory of $1M+ in free credits for startups

https://startupperks.directory
3•osmansiddique•2h ago•0 comments

Show HN: A Kubernetes Operator to Validate Jupyter Notebooks in MLOps

https://github.com/tosin2013/jupyter-notebook-validator-operator
2•takinosh•3h ago•0 comments

Show HN: Falcon's Eye (isometric NetHack) running in the browser via WebAssembly

https://rahuljaguste.github.io/Nethack_Falcons_Eye/
4•rahuljaguste•4h ago•1 comments

Show HN: Horizons – OSS agent execution engine

https://github.com/synth-laboratories/Horizons
20•JoshPurtell•1d ago•3 comments

Show HN: Daily-updated database of malicious browser extensions

https://github.com/toborrm9/malicious_extension_sentry
13•toborrm9•10h ago•5 comments

Show HN: BioTradingArena – Benchmark for LLMs to predict biotech stock movements

https://www.biotradingarena.com/hn
22•dchu17•10h ago•11 comments

Show HN: 33rpm – A vinyl screensaver for macOS that syncs to your music

https://33rpm.noonpacific.com/
3•kaniksu•4h ago•0 comments

Show HN: Chiptune Tracker

https://chiptunes.netlify.app
3•iamdan•4h ago•1 comments

Show HN: A password system with no database, no sync, and nothing to breach

https://bastion-enclave.vercel.app
10•KevinChasse•10h ago•5 comments

Show HN: Micropolis/SimCity Clone in Emacs Lisp

https://github.com/vkazanov/elcity
170•vkazanov•1d ago•48 comments

Show HN: Local task classifier and dispatcher on RTX 3080

https://github.com/resilientworkflowsentinel/resilient-workflow-sentinel
25•Shubham_Amb•1d ago•2 comments

Show HN: GitClaw – An AI assistant that runs in GitHub Actions

https://github.com/SawyerHood/gitclaw
7•sawyerjhood•11h ago•0 comments

Show HN: An open-source system to fight wildfires with explosive-dispersed gel

https://github.com/SpOpsi/Project-Baver
2•solarV26•8h ago•0 comments

Show HN: Agentism – Agentic Religion for Clawbots

https://www.agentism.church
2•uncanny_guzus•8h ago•0 comments

Show HN: Disavow Generator – Open-source tool to defend against negative SEO

https://github.com/BansheeTech/Disavow-Generator
5•SurceBeats•14h ago•1 comments

Show HN: BPU – Reliable ESP32 Serial Streaming with Cobs and CRC

https://github.com/choihimchan/bpu-stream-engine
2•octablock•10h ago•0 comments

Show HN: Craftplan – I built my wife a production management tool for her bakery

https://github.com/puemos/craftplan
566•deofoo•5d ago•166 comments

Show HN: Hibana – An Affine MPST Runtime for Rust

https://hibanaworks.dev
3•o8vm•12h ago•0 comments

Show HN: Beam – Terminal Organizer for macOS

https://getbeam.dev/
2•faalbane•12h ago•2 comments

Show HN: Total Recall – write-gated memory for Claude Code

https://github.com/davegoldblatt/total-recall
10•davegoldblatt•1d ago•6 comments

Show HN: Agent Arena – Test How Manipulation-Proof Your AI Agent Is

https://wiz.jock.pl/experiments/agent-arena/
45•joozio•15h ago•47 comments