Show HN: I made a generative online drum machine with ClojureScript
Hacker News (score: 32)Description
My goal was to build something that was not only fun and easy to use for beginners but also powerful enough for serious producers. I did extensive research on existing drum machines, analyzed their UX, and tried to build something that adds something new.
It's a nearly 100% client-side app, written in ClojureScript, and is a PWA so you can install it to your home screen for an app-like experience.
Besides the standard grid editor, Beat Maker has some unique features that I think HN readers might find interesting:
- Procedural sample generation. One annoying thing about writing beats is searching through folders full of samples. I wanted to improve this and so I added the ability to generate new samples with a single click, giving you an infinite supply of unique drum samples. * Generative beat creation. If you're looking for inspiration, Beat Maker can generate entire patterns for you as a starting point. You can then edit and tweak the beat to your liking. Great for solving the "blank canvas" problem and giving you something good to start from. * Advanced export options. This is where it really shines for producers. You can export your work as: * A standard WAV loop * Individual stems (ZIP) * A MIDI file * A ZIP file of all your samples as WAVs * A SoundFont (.sf2) drum kit from your generated samples * An Impulse Tracker (.it) file for use in trackers like Renoise, OpenMPT or a Polyend * Pocket Operator/Volca sync. It can output a sync signal on the left audio channel to sync with these hardware devices for perfect timing. * Per-Note FX. You can add effects like volume slides, repeats, and start volume changes to individual notes for more complex drum phrases incorporating flam and roll.
As an old school tracker guy, I'm particularly excited about the Impulse Tracker export mode. I was surprised to discover how many DAWs (including hardware like Polyend) can import this format. Of course, you can also pull up Impulse Tracker on DOSBox, or the more modern re-implementation, Schismtracker for that retro experience.
By the way, the beat generator feature is not trained on any artists or anything like that. It's an algorithm I built from scratch myself.
The audio engine is built on a declarative audio graph (using `virtual-audio-graph`), inspired by React's virtual DOM, which makes managing the Web Audio API much cleaner. If you're building web based audio apps I highly recommend checking out this library.
I'd love for you to try it out and let me know what you think. Feedback (and the inevitable bug reports) most welcome! Thank you!
P.S. Also, here's a video summary: https://youtu.be/qVmEn9z3H24
More from Hacker
Show HN: 30k IKEA items in flat text
Show HN: 30k IKEA items in flat text OP here.<p>I took the unofficial IKEA US dataset (originally scraped by jeffreyszhou) and converted all 30,511 products into a flat, markdown-like protocol called CommerceTXT.<p>The goal: See if a flatter structure is more efficient for LLM context windows.<p>The results: - Size: 30k products across 632 categories. - Efficiency: The text version uses ~24% fewer tokens (3.6M saved total) compared to the equivalent minified JSON. - Structure: Files are organized in folders (e.g. /products/category/), which helps with testing hierarchical retrieval routers.<p>The link goes to the dataset on Hugging Face which has the full benchmarks.<p>Parser code is here: <a href="https://github.com/commercetxt/commercetxt" rel="nofollow">https://github.com/commercetxt/commercetxt</a><p>Happy to answer questions about the conversion logic!
Show HN: Stash – Sync Markdown Files with Apple Notes via CLI
Show HN: Stash – Sync Markdown Files with Apple Notes via CLI
Show HN: Pion SCTP with RACK is 70% faster with 30% less latency
Show HN: Pion SCTP with RACK is 70% faster with 30% less latency SCTP is a low level protocol focused on reliable packet transmission. Unlike hopelessly flinging packets from one device to another, it makes sure that the packets are correct using CRC, removes duplicate packets, and allows for packets to be sent in any order.<p>Going into an established library, I thought that everything was already implemented and that there wasn't anything to do until I went through the existing issues and organized all the tasks and decided on an order. Sean DuBois (<a href="https://github.com/Sean-Der" rel="nofollow">https://github.com/Sean-Der</a>), one of the co-creators and current maintainers of Pion, an open-source pure Go implementation of WebRTC (which uses SCTP), introduced me to a dissertation that was written about improving SCTP from 2021 (<a href="https://duepublico2.uni-due.de/servlets/MCRFileNodeServlet/duepublico_derivate_00073893/Diss_Weinrank.pdf" rel="nofollow">https://duepublico2.uni-due.de/servlets/MCRFileNodeServlet/d...</a>). To my surprise, the features in it weren't actually implemented yet, and generally went unused even though it depicted pretty big improvements. This came as a bit of a shock to me considering the countless companies and services that actively use Pion with millions of users on a daily basis.<p>This led to two things: 1) implement the feature (done by me) and 2) measure the performance (done by Joe Turki <a href="https://github.com/JoeTurki" rel="nofollow">https://github.com/JoeTurki</a>). If you're interested in reading more, please check out the blog post where we go over what SCTP is used for, how I improved it, and the effort that went into making such a large improvement possible.<p>This also marks a huge milestone for other companies and services that use SCTP as they can refer to the implementation in Pion for their own SCTP libraries including any real-time streaming platforms such as Microsoft Teams, Discord screen share, Twitch guest star, and many more!<p>For my personal background, please take a look at a comment below about what it was like for me to get started with open-source and my career related journeys. Thanks for reading!
Stacked Diffs with git rebase —onto
Stacked Diffs with git rebase —onto
No other tools from this source yet.