Show HN: Wavvy – web-based audio editor (Audacity port) (wavvy.app)
I originally developed a WASM port of wxWidgets for https://dj.app/. When it came time to open source wxWidgets-wasm, I decided to port another complex app as a test case, and Audacity seemed like the obvious choice. In the process, I also needed to write a new host API for PortAudio for playback and recording in the browser.
https://github.com/ahilss/wxWidgets-wasm
114 comments
[ 5.1 ms ] story [ 193 ms ] threadTangential question, but why did Audacity seem like the obvious choice? Not a knock on the product - I use it often - but I'm just curious about why it was chosen.
I would say wxWidget and QT are probably still the most used cross platform desktop GUI toolkits.
I’m curious what porting wxwidgets involved — are you rendering them with the 2D canvas API, WebGL, or is all the rendering done by WxWidgets and you just have to send a framebuffer into a canvas?
It's an amazing project! If the OP is here, do you have any plans for accessibility to screen readers? I suppose it's a similar problem to that with Flutter.
I also wander if there is a possibility to combine your wxWidget port with the work going into WASM Python...
Edit:
Taking a closer looks at how the wxWidget port works, wxWidgets has multiple backends using native widgets on each platform. They also have wxUniversal which draws each widget itself to a frame buffer, this port uses that as a base to draw the ui to html canvases.
[1] https://github.com/ahilss/wxWidgets-wasm/blob/master/build/w...
It’s an edge case for sure. Since the video is hosted weirdly and no video downloaders I’ve tried can get the video downloaded with the audio.
So we simply stream the video normally in the browser, and capture the audio output directly into Audacity.
everything looks very smooth.
did you manually manage the sharedarraybuffer?
I was excited to see Dr. Jeep's Hardcore mix of Dissociate in the default library for dj.app - that's been my jam lately, really niche track to come across in the wild :)
For example, say you wanted to make a 3D editor/CAD program or full-featured DAW from scratch - what would you use?
https://github.com/zamtmn/zcad https://wiki.freepascal.org/Projects_using_Free_Pascal
Has Audacity ever had safety issues in the past?
Because it sounds like you'll be going to a lot of effort to prevent a problem that had never surfaced in over a decade of use.
So of course they freak, when it is suddenly creeping in, in something they trusted.
In the second case, intentions have been hidden or they have changed, which obviously erodes user trust.
It wasn’t clear it was opt-in (although maybe the code was clear?).
Either way, adding telemetry (especially to open source) is obviously going to cause a ruckus, so they obviously mishandled the situation.
Guess we’ll see then :)
[1]: https://forum.audacityteam.org/viewtopic.php?f=47&t=114242&s...
> I originally developed a WASM port of wxWidgets
I had some fun looking at the commits here[1] and I can imagine a lot of classic wxWidgets apps are going to be ported to wasm now. Congrats, that a lot of dedication!
[1] https://github.com/wxWidgets/wxWidgets/compare/master...ahil...
https://ec.europa.eu/social/main.jsp?catId=1202
Have your popcorn ready to watch how this will freak out plenty of big corporations, rushing to fix their products, services, and websites from their accessibility "short-sightedness" of times past.
Depending on circumstances, failing to comply may cause heavy fines and having the product removed from market.
My guess is this show will peak in 2025.
I'm not experienced with accessibility, but I pay attention to it whenever I can to increase my own awareness. A very common feedback when it fails (e.g. in software, online conferences, ...) is: "Accessibility must be part of the plan from early on. Trying to add it afterwards basically always fails."
Not only does your comment show ignorance of a significant percentage of humans, it also shows you have zero idea of the fact that good accessibility provides service to everyone.
Have you ever struggled to use your smartphone while driving (temporary blindness, because your eyes are focused on the street),
or pressed the wrong button while sitting in a bumpy, shaking bus, because the button you actually wanted to press was way too small (temporary hand coordination disability)?
Accessibility's best practices also exist for everyone to enjoy a great usability.
Disabled people represent between 10% and 20% of the world population, and that's not even including those who don't identify as disabled but would nevertheless benefit from more accessible technology. If you've ever adjusted the text size in your browser or enabled captions while watching media, this group includes you.
/S
> I'm sure there are ways to add accessibility to a web port of WX
and not
> Just uttering my careful warning that you should please, please, please think 3, 4, 5 times before deciding to actually use this UI library for serious projects.
because, as you acknowledge, this is a hobby project. The goal is to do something cool and fun and push boundaries of what's possible. So if pushing accessibility for all web apps is your goal, why not seize this moment to say "hey let's find ways to make WASM apps more accessible" rather than saying "nobody should use this for serious projects"? Why not try to fix it rather than shutting it down? Doesn't it benefit people more if we find a way to make accessibility easy, rather than discouraging people because it's hard?
There are lots of cool and interesting technical problems in there that somebody who takes the time to make something like this could have interest in: How do OCR or other accessibility tools understand canvasses? How can we communicate with them? What addons to WASM or wxWidgets would achieve this goal?
Of course the problem is fixable. But in the meantime, until it's fixed, a disabled person could fail to get a particular job, or even lose a job they already have, due to an inaccessible application. It's important to remember that the stakes are really that high. If we want to prevent that from happening, I think it's worthwhile to try to persuade application developers to not use inaccessible GUI toolkits, particularly for new projects. We can do that at the same time that we work on making more GUIs accessible.
Can we? People don't typically work on tools they don't intend to use. Where are the people doing the fixing going to come from if the conventional wisdom is "even if you use this for a side project, you're harming disabled people?"
Another way of framing your suggestion here is that toolkits with the resources to make themselves accessible without community help will always dominate toolkits that don't have those resources. That stifles progress for anyone.
> But in the meantime, until it's fixed, a disabled person could fail to get a particular job, or even lose a job they already have, due to an inaccessible application.
This kind of stake-raising honestly feels toxic to me, sometimes. You can make the same argument about almost anything. Eventually, you're going to get tuned out, because the knee-jerk reaction expressed to any new project is "well, you didn't do thing X I wanted, so I refuse to care even if the project has merit."
What's wrong with saying "hey, this is cool, but be aware if you wanna use wxWidgets for production app, know it's inaccessible and so you'll have more work to do to make your app accessible, which I assume you want to do, because it's the right (and often profitable!) thing to do"?
Why do we have to escalate it to "If you make side projects with wxWidgets, you're encouraging people to use them for production apps and therefore causing disabled people to lose their jobs"? It's purposefully taking everything in the most negative way possible.
Put another way, how is your argument distinct from the following: "Working on Audacity, a project for audio, privileges hearing people over Deaf people, and therefore could deprive Deaf people of programming jobs would go to text-based projects if there were fewer commercial audio engineering products helping people to replace text resources (blogs, etc.) with audio (podcasts, etc.). Therefore, Audacity is harmful and one should not work on it."
'Don't use X for reasons ABC' is a great advice! Why use unusable X if some other thing Y works?
Have you tried using Wavvy on a smartphone? Guess what: it's effectively unusable on smartphones: - touch events aren't leveraged. - hover and right click aren't available, and keyboard shortcuts don't have an appropriate substitute; therefore core audio editing tasks cannot be accomplished in any acceptable manner.
If you are accustomed as I am to use Audacity on a desktop PC - clicking, cutting, shortcutting your sound files effortlessly - but then use Wavvy for the first time, you gonna feel...
disabled.
And that's only a glimpse into what the experience must be for a blind person using Wavvy. Here is an experiment: Close your eyes, use Wavvy. Only OCR allowed...
Being an awesome POC, the accessibility issues aren't Wavvy's "fault", but wxwidget's (and Audacity's by depending on wxwidget).
Considering audio is especially valuable for visually impaired people, having a usable audio editor is very valuable.
Now imagine, as it's so often the case in IT, everybody jumps on the latest bandwagon ("Docker all the things!", "Electron all the things!"), and suddenly everybody "WASM-canvases all the things!".
Now imagine Audacity decides "WASM-canvas" is the way to go for Audacity distribution; no more separate builds for Windows, Linux, macOS, just one WASM-canvas build.
And so do other software projects. And so does your company with its IT department software contribution... more and more, you cannot do your tasks the way you used to...
Back to the comment: constructive critique is always helpful:
- It helps Wavvy to consider using an alternative audio editor. - It helps Audacity to improve their usability and accessibility and consider another widget provider. - It helps wxwidget to fix their accessibility shortcomings.
We discuss problematic tools, libraries, websites, and services all the time at HN - be it for privacy concerns, performance issues and whatnot. We all learn from that why e.g. having a slice of privacy is also a good thing for us personally. So is accessibility, even when it's just the slices involving good layouts, readable fonts, unconfusing button naming, logical tabbing order, consistent shortcuts across applications, big-enough advertising close buttons, unfrustating timepickers... , ..., ...
> I don't think that kind of scolding - which is what it comes off as - is productive for solving the problem of "X is not accessible"...
ClawsOnPaws is neither scolding, nor is it coming off as it for me. They apologize upfront, says "please, please, please", says "my aim is not to discourage anyone from trying out new things".
If there was one polite, constructive comment at HN it be it.
> ...because it presumes the problem is unfixable.
I don't understand how you came to the conclusion that this was even remotely implied.
> But I think you should consider focusing on this: "I'm sure there are ways to add accessibility to a web port of WX"
I think you should consider focusing on this: "I'm sure wxwidgets could follow basic accessibility best practices and leverage accessibility APIs which are provided by operating systems already for years."
> why not seize this moment to say "hey let's find ways to make WASM apps more accessible"
I'm not an WASM expert, but I'm versed in accessibility features specified by W3C and implemented in browsers. As WASM can interact with Javascript, and Javascript allows all kinds of web accessibility standards interactions, this part is solved. What's required then is a mapping from OS accessibility calls (wxwidgets' duty) to browserland (WASM...
With regards to the rest, suffice it to say that I don't find the slippery slope argument persuasive. Given, though, that we're mostly arguing about how to approach doing the thing we both agree should be done, figured I might try and think about things that actually achieve the goal instead.
Rather than encourage everyone to never use WX widgets for any reason in a website, maybe you should be encouraging people (or working yourself) to add this accessibility feature.
But thats not optimal, right? But most do not care, as long as they are not part if that subset.
I mean, I find it hard to care too much either, when my main concern are all the missing and buggy features, that needs fixing first..
I allmost see accessibility as charity. I want to add it to my apps, mainly because it is not nice to ignore people needs(and who know, with bad luck I might end up in that group one day), but not because I expect great monetary returns.
I'm not trying to knock the app or the work put into wxWidgets. But, we need to not regress in supporting the entire world and not just the English speaking subset. I don't really want to go back to the 80s/90s. I like that in general, with HTML, international text input/editing just works.
You should not. A mentor once told me that we disabled people tend to apologize too much. You are right to point out the problem of accessibility in this context, despite the negative responses you've received.
Of all the GUI toolkits with wasm ports, IMO wx is the most amenable to using native HTML controls rather than doing everything with canvas. I'm sure that kind of port would take more work though.
So if we wanted to spend the time, could we be over-focusing on "just manipulate the DOM" as a solution? WASM conceives of the web browser as the "OS", or at least as hardware, and JavaScript as a means to manipulate that "hardware" (ask the browser to do things). Most operating systems expose APIs that let you do accessible things (read the screen, automate UI actions, etc.). Then frameworks like QT, for example, hook into those APIs from their own code to provide generic accessibility regardless of OS.[2]
So, maybe one half of the solution here is that to try to develop a neutral API WASM can use to emit accessibility information which can then be read by JavaScript running in the browser, and transformed into objects in the DOM? Then you could write an interface to that from your framework (something like QT would be a better starting point than wxWidgets, though, admittedly) and you'd get what you need.
Not that any of that is easy. But it would be fun, and naively, seems not too much harder than "rewrite app X in WASM to use the DOM" for much broader impact.
Maybe this discussion already happened and there are very good reasons not to do this - but I couldn't find anything about it in previous arguments.
[1] https://news.ycombinator.com/item?id=17349170 [2] https://doc.qt.io/qt-6/accessible.html
One thing I can learn from your work is to how the canvas is rendered. For my project Glicol (https://glicol.org) I use the Web Audio Analyser Node for visualisation but I am considering to use SAB to send even non-audio channels and render the canvas in real-time. It would be great to explore the process if you can write more on your GH repo.
side note, such a fun list of abandoned projects here [1] and here [2] to browse through.. many sadly broken links but i remember checking some of them out back in the day. there was so much activity in the open source audio sphere back in the early 2000s.
[0]: https://ccrma.stanford.edu/software/snd/snd/snd.html
[1]: http://www.linux-sound.org/one-page.html
[2]: https://wiki.linuxaudio.org/apps/daw_apps
I really dig your dj.app, it looks a lot like an app I sometime I use called Mixxx[1], which is open source[2]. But I think it's built using QT instead of wxWidgets. Anyways, now that I know there's a similar web-app available I might start trying dj.app out! thanks!
1. https://mixxx.org/ 2. https://github.com/mixxxdj/mixxx