Hacker News new | ask | show | jobs
by adrianh 3910 days ago
Hello! I make Soundslice (soundslice.com), which is interactive/reflowable sheet music in the browser, synced with audio recordings and more loveliness. I very deliberately use canvas instead of SVG.

Soundslice isn't a score editor -- "just" a renderer (as if rendering sheet music is easy...!) -- so that influenced my decision. But if I were making an editor, I might make the same decision.

The reason is performance. A single piece of sheet music (a "score") might include thousands of individual glyphs, and if each one of those is a DOM element (as with SVG), the performance just wouldn't be as good as canvas.

One big tradeoff is that, with canvas, you need to implement your own hit detection (e.g., figure out what the user clicked on). But that's not super hard, and it's the kind of thing you write once and use forever.

Here's a tech talk I gave about an earlier version of Soundslice, where I talk about the canvas advantages: http://37signals.com/talks/soundslice