News for hackers. Stuff that matters.
Re:Audacity 3.0 by dharma1 on Wednesday March 17, 2021 @06:26PM (#26497565)
I’m working with the Audacity dev team on a redesign of the UI/UX. More on this soon!
Re:Audacity 3.0 by akersten on Wednesday March 17, 2021 @07:11PM (#26497952)
Another happy Audacity user here, great to hear it's going to get a refresh. My only request is that performance is kept top-of-mind - using Audacity is snappy and responsive even on ancient hardware, which makes it just a pleasure to use. UI interactions feel instant. The contrast to a slow Electron app like Slack is night and day.
Re:Audacity 3.0 by marcan_42 on Wednesday March 17, 2021 @07:49PM (#26498221)
I've found the exact opposite - Audacity used to be instant, but these days its UI is dog slow. It seems to struggle badly on high-DPI displays: it is almost unusable maximized on both macOS and Linux (X11) if you have a 4K or so display. It feels like it's actively gotten worse on this front.

I'm hoping this is something that improved in 3.0.0, because using Audacity is becoming increasingly impractical. I was just trying to listen to 10 tracks one by one yesterday and even just muting/soloing a track would take about a second; it was horrible. Shrinking the window helps, but it's silly to have a tiny window and scroll around when you have a 4K display.

I kind of suspect this to be a windowing toolkit issue, and originally I thought it was macOS-specific (since I first noticed when I tried to recommend it to friends who use that), but ever since I moved to a 4K screen on Linux I noticed it's bad here too...

The Mac story is here: https://forum.audacityteam.org/viewtopic.php?f=47&t=111105

The workaround is, well, not using HiDPI mode which is silly. But Audacity doesn't even seem to support HiDPI mode on Linux properly to begin with (the entire UI is small), so that's not it per se... I guess wxGTK just struggles when it has to draw 4x as many pixels?

Apparently it's bad on Windows too: https://forum.audacityteam.org/viewtopic.php?t=111857

Re:Audacity 3.0 by Elv13 on Wednesday March 17, 2021 @08:30PM (#26498509)
Those "classic" UI toolkit as raster engines. Both GTK/2/3 and QtWidgets 4/5/6 have OpenGL backends, but they are slower than the raster.

This is because the state machine that drives the draw context is synchronous. Every line, pixels (or anything, really) takes some CPU cycles.

Newer toolkits (QtQuick2, GTK4, Skia-based-ones) are hardware accelerated. They are slower of standard DPI, but much faster on HiDPI.

So, yes, they cannot be as snappy on HiDPI, the number of pixel gets bottlenecked by the single thread performance of the CPU. Those barely grow year-over-year, while the number of pixel went up a cliff overnight.

Re:Audacity 3.0 by Elv13 on Wednesday March 17, 2021 @08:53PM (#26498649)
(sorry, can't reply directly, marcan_42 comment is too deep in the tree)

> which tells me this isn't a simple pixel pushing problem but rather something more profound in Audacity.

That's probably because of the cursor animation (when you play). Audacity has to redraw the entire track widget each time the needle moves unless they implement special double buffering + special damage area slices. By default, Qt/GTK/wx are too dumb to understand layers properly. They will redraw the entire rectangle if you try to stack things with any transparency or non-rectangle clips. Even with proper double buffering, combining both frame buffers is still done on the CPU. That's 2x4x{width}x{height}x{fps} bytes up load to the GPU per second. for a 4k ARGB8888 video frame @ 60fps, that's like 4GB/s of raw transfer if you rasterize each frames in the CPU.

(disclaimer: former KDE dev)

edit: If you run KWin, you can enable the redraw compositor plugin and see for yourself which area of the window are repainted.

Re:Audacity 3.0 by TylerE on Wednesday March 17, 2021 @09:57PM (#26499004)
You can directly reply by clicking the timestamp ("1 hour ago") on the comment you want to reply to.

Yes, it's poor UI.

Re:Audacity 3.0 by pessimizer on Thursday March 18, 2021 @05:26PM (#26507734)
It's not comment depth that keeps the reply link from appearing. I think it's intentional rate-limiting of replies, but only applied to the thread view, not the comment view.
Re:Audacity 3.0 by marcan_42 on Wednesday March 17, 2021 @08:40PM (#26498560)
Audacity is the only app that is this bad (I run KDE; my entire desktop is Qt5 so clearly that is not comparable).

I've noticed that the Audacity issue seems proportional to the number of tracks (not how much of the screen they take up) and improves when I zoom in a lot (to the sample level), which tells me this isn't a simple pixel pushing problem but rather something more profound in Audacity. There is obviously something horribly inefficient about how waveforms are being drawn at lower zoom levels.

For comparison, I can run full-screen Ardour with an order of magnitude more tracks and complexity than Audacity and it still performs much better, even if it isn't perfectly smooth.

Re:Audacity 3.0 by dharma1 on Thursday March 18, 2021 @03:31AM (#26500362)
Audacity uses wxWidgets right now. We've been talking about migration to Qt 6 (and possibly QML for some things) but that would be a big re-platforming effort, still debating. Not sure if we can continue with wxWidgets and do a major UI/UX upgrade though
Re:Audacity 3.0 by Elv13 on Thursday March 18, 2021 @03:45AM (#26500424)
I have done it several time professionally (Motif, Qt3, GTK, etc, but not wx) to QtWidgets or QtQuick. It's been a while and I pivoted to other industries.

It's a potential project killer, but it can be done. The trick is to wrap all your objects in QObject classes. You keep the old UI code as-is as long as possible.

The first Jedi mind trick is to reverse the event loop. Qt supports GLib2 loops, but only as long as they are created by Qt. So you create a dummy QCoreApplication, start the event loop. Then you coerce GTK into using the glib event loop Qt created.

After that, you populate your QObjects I mentionned above. The `Q_PROPERTY` stuff is the important part. It *has* to be fully implemented for QML to ever work. For Qt5, you need to use Qt containers. This means porting your lists and other C++ types (or glib types) to Qt. For Qt6, I think you can get away with some of that, but not Qt5.

Then, make all the signals work. It is important that all properties have signals. The signals must be reliable. QML heavily relies on events for literally everything. Without events, your UX gets out of sync and crash.

The next part is models. Turn all list with selections to models. Don't try to render stuff using for-loops in QML, this is a terrible idea and will explode in your face. Qt Models are annoying to write (and get repetitive very fast), but reliable list models really greatly simplify the QML code.

When you have all those QObject to reflect your current codebase, you make a companion app. This is a small window (or LAN/Network smartphone UI using QtRemoteObjects).

Now you are ready for the UI. Add little features, one by one. Don't try to do everything at once. Again, as long as you can, keep the wx/GTK window alive and fully functional. Your app will look wierd with 1 wx window and 1 QtQuick window. However, having the fully functional old UI let you press buttons there and see the results being updated in QML. That let you polish/debug your signal/q_property code step by step.

Once you are "done" with your port, strip the UI code from the old codebase. Then refactor/clean the logic and turn it into a library. Then start merging your QObject shims and logic classes into a single class.

If you get there, congradulation, your port is complete. Time to annoy your users with a bunch of changes.

Re:Audacity 3.0 by dharma1 on Thursday March 18, 2021 @07:55AM (#26501718)
Thanks for the write-up! This is great, good to hear war stories. I've sent it to the devs - if they have any questions about the above, would it be possible to reach out for quick thoughts?
Re:Audacity 3.0 by Elv13 on Thursday March 18, 2021 @02:32PM (#26505889)
Same username on GitHub (public email there) and Reddit. I admit I am slowly losing the battle with my indox, so better ping on both. I would be glad to provide help where I can.
Re:Audacity 3.0 by felixyz on Thursday March 18, 2021 @06:37AM (#26501299)
Love this! Although I will almost certainly never have reason to apply it. (Still good inspiration for any big rewrite, and I'm starting one pretty soon.)
Re:Audacity 3.0 by floatboth on Thursday March 18, 2021 @06:50AM (#26501369)
Where did you find an OpenGL render backend in GTK2/3?
Re:Audacity 3.0 by Elv13 on Thursday March 18, 2021 @03:18PM (#26506430)
https://www.cairographics.org/backends/ GTK -> GDK -> Cairo -> OpenGL
Re:Audacity 3.0 by floatboth on Thursday March 18, 2021 @05:30PM (#26507777)
Did anyone actually try to make that run in practice? I don't think GTK supports that. You can't just magically hot-swap Cairo backends externally. Using the GL backend means you provide GL surfaces to Cairo instead of memory.
Re:Audacity 3.0 by Elv13 on Thursday March 18, 2021 @07:25PM (#26508652)
It runs like crap, that's why it isn't supported. But if really, really want to make it work, you can have your app make a surface, put a cairo surface in it, then render GTK there. I suggest you don't waste any time on this. Mozilla, Google and Samsung had many people _each_ assigned to fix it at some point. The Google gave up, bought Skia. Then Mozilla also gave up and used the now Open Source Skia. Samsung somehow kept poking at it for a few more years until they dissolved their Open Source division and scaled down Tizen. At some point Samsung make a Vulkan backend for unknown reasons.

With Qt 4/5, there is an environment variable, to play with. It sill runs like crap and is now deprecated.

edit: Of course, GTK4 have "real" backends for both Vulkan and OpenGL. They implement scene graphs like QtQuick rather than building a big bitmap like GTK2, GTK3 and QtWidgets.

Re:Audacity 3.0 by stjohnswarts on Thursday March 18, 2021 @02:45PM (#26506050)
Over a cliff?
Re:Audacity 3.0 by nyanpasu64 on Wednesday March 17, 2021 @10:25PM (#26499160)
> But Audacity doesn't even seem to support HiDPI mode on Linux properly to begin with (the entire UI is small), so that's not it per se...

On KDE HiDPI, the audio input/output device selector positions the dropdown boxes according to 100% scaling, but they're sized according to 125% scaling, so they overlap!

Re:Audacity 3.0 by marcan_42 on Wednesday March 17, 2021 @11:17PM (#26499399)
Ha, that one has been bugging me for ages but I never realized it was due to HiDPI! Suddenly it all makes sense.
Re:Audacity 3.0 by nyanpasu64 on Saturday March 20, 2021 @12:57AM (#26520893)
Correction: I turned off HiDPI and it still happens... wow this is worse than I expected.
Re:Audacity 3.0 by ClumsyPilot on Wednesday March 17, 2021 @07:44PM (#26498190)
Agreed, but thats the tragedy of desktop ui development. Either you get pretty but electron app where loading a few hundred messages grinds it to a halt

Or you get ancient looking Ui

Or you get platform spesific stuff!

Actually Java applications are kinda reasonable compromise

Re:Audacity 3.0 by yellowapple on Wednesday March 17, 2021 @08:01PM (#26498305)
> Actually Java applications are kinda reasonable compromise

As are .NET applications. Yeah, most .NET desktop apps in the wild are technically chock full of Windowsisms, I've found that said apps more often than not Just Work(TM) on e.g. Linux w/ Mono, and alternative toolkits like Avalonia help further.

Re:Audacity 3.0 by 177tcca on Wednesday March 17, 2021 @08:44PM (#26498592)
Material Design .NET applications okay?
Re:Audacity 3.0 by ketzo on Wednesday March 17, 2021 @06:42PM (#26497696)
Wow, that's awesome news!

I'm super interested in the UI design of really complex applications (like Audacity, or Photoshop, etc.). I would adore some kind of writeup on y'all's design process whenever you towards the end!

(Obviously a big ask for someone already doing a bunch of work for free, pls feel free to ignore me; just saying that I'd be interested :D)

Re:Audacity 3.0 by danybittel on Thursday March 18, 2021 @02:53AM (#26500226)
I've been designing a complex desktop application.. there's not that much info out there. I found these helpful:

Designing the Win95: https://socket3.wordpress.com/2018/02/03/designing-windows-9...

Also the final design guides: https://www.ics.uci.edu/~kobsa/courses/ICS104/course-notes/M...

A (really old) book: https://www.amazon.com/About-Face-Essentials-Interaction-Des...

Another book: https://www.amazon.com/Designing-Interfaces-Patterns-Effecti...

Oddly enough these are all ancient. There hasn't been much innovation in that space though. (apart from High Dpi and Dark Mode)

Blender recently did a redesign of their UI, they have lot's of discussions about their rationale.

Re:Audacity 3.0 by RyanHamilton on Thursday March 18, 2021 @05:22AM (#26500868)
Thanks for sharing those links. The win95 design was a great read, a proper data driven approach to user experience.
Re:Audacity 3.0 by PostThisTooFast on Thursday March 18, 2021 @05:02AM (#26500763)
"Dark mode" is not an innovation. It's a half-assed reversal of a regression.

Computers used to show light characters on a dark background. 8-bit platforms often defaulted to white text on a dark-blue background, which until just a few years ago was still available in Word as a checkbox option.

Then the "desktop publishing" craze came along, and brought the analogy of a computer screen to a piece of paper. But this inverse (black text on a white background) scheme ignored the fact that paper doesn't EMIT light. Using these systems was akin to reading the label on the surface of a lit light bulb all day.

But for two decades, Windows let you set up a system-wide color scheme whose colors would be inherited by (nearly) all applications. It was great; you could (and I did, in the early '90s) replace the dumb inverse default color scheme with a "charcoal" scheme... essentially exactly what most "dark modes" are today.

I think Unix GUIs allowed you to set up color schemes too, leaving only the vaunted Mac GUI as the hard-coded,glaring eyeball-strainer of the era.

But now that people are finally realizing that inverse color schemes suck, what did Microsoft do? REMOVE the color-scheme editor from Windows. So now we're being dribbled out "dark mode" one OS, Web page, and application at a time. And it's still hard-coded.

That's not innovation. It's pathetic.

Re:Audacity 3.0 by noisem4ker on Thursday March 18, 2021 @08:33AM (#26501975)
I fully agree that customization regressed, and it's a pity. However...

>paper doesn't EMIT light

Your retina doesn't care if the photons it receives are emitted (as with CRTs) or reflected (as with paper). If you feel like you're staring into a lightbulb, your monitor's brightness is set too high. Set it properly, and, in a well lit environment, your monitor's white should match that of the wall behind it, or that of a piece of paper on your desk.

Re:Audacity 3.0 by mortenjorck on Wednesday March 17, 2021 @08:42PM (#26498572)
Even more interesting to me, at least, would be a writeup on how the project came to be in the first place. Long-running open-source projects have a (perhaps unfair) reputation for being somewhere between ambivalent and hostile toward proposals for sweeping UX improvements, and it could be instructive to learn how this initiative got off the ground.
Re:Audacity 3.0 by eitland on Thursday March 18, 2021 @01:58AM (#26500007)
There was an interview many years ago, back when I was a student maybe, but I cannot remember where I read it (best guess is Sourceforge "Project of the Month" which used to be a thing back then at least.

The only thing I think I can remember clearly however was the question about the biggest regret which I think was one particular core datastructure that was an array but which they later wished they had used a linked list for instead.

Re:Audacity 3.0 by brokenmachine on Friday March 19, 2021 @12:15AM (#26510109)
I feel like changing an array to a linked list couldn't be that hard, but I don't know the particular complications.
Re:Audacity 3.0 by eitland on Friday March 19, 2021 @03:11AM (#26510739)
Exactly, and neither do I, I have mostly worked on Java and and with IDEs that would tell me in a nice way if what I did didn't make sense.
Re:Audacity 3.0 by cprecioso on Wednesday March 17, 2021 @07:17PM (#26497989)
I think you should check out Tentacruel’s videos on YouTube about the UX of music composing suites!
Re:Audacity 3.0 by xmprt on Wednesday March 17, 2021 @10:39PM (#26499228)
I found that video fascinating even though I couldn't really related to any of the tools he was talking about since I've never composed music in the past.

Having actually used Audacity and Photoshop, I'd love to learn a bit more about how those design decisions were made.

Re:Audacity 3.0 by cprecioso on Friday March 19, 2021 @06:23PM (#26518731)
I've never composed either, but most of his complaints are not about the specifics of the programmes but about how they fail at communicating them. Repetition, omission, modality, hiding, or over-highlighting, are problems that can crop up in any software, and he's teaching you how those are perceived by users.
Re:Audacity 3.0 by jagger27 on Wednesday March 17, 2021 @07:37PM (#26498137)
*Tantacrul
Re:Audacity 3.0 by germinalphrase on Wednesday March 17, 2021 @07:01PM (#26497869)
Even a short design rationale would be fascinating.
Re:Audacity 3.0 by noizejoy on Wednesday March 17, 2021 @06:46PM (#26497736)
You could volunteer ...
Re:Audacity 3.0 by dehrmann on Wednesday March 17, 2021 @09:28PM (#26498861)
Maybe this already happens, but I wish more designers contributed to open source. There are a a lot open source projects that are UX polish away from being viable alternatives to commercial products.
Re:Audacity 3.0 by WhiteNoiz3 on Wednesday March 17, 2021 @07:52PM (#26498241)
My biggest pet peeve - just allow me to save a .wav file without having me make a project or 'export' it! It would be a huge time saver as I am usually just editing one file at a time, not mixing.
Re:Audacity 3.0 by falcolas on Wednesday March 17, 2021 @08:12PM (#26498386)
Preferences -> Keyboard -> Assign keybind to "Export as WAV"

It's still called an export, but it's basically doing exactly what you're asking for.

Re:Audacity 3.0 by hunter2_ on Wednesday March 17, 2021 @10:06PM (#26499059)
I get it, but on the other hand isn't that a bit like saying "why do I need to print to PDF instead of just save as PDF?" The UI isn't ideal but the feature isn't terribly buried.

It's because the format you want (regardless of it being the same format you started with) can't store quite as much metadata about your changes as the app's native format.

Re:Audacity 3.0 by happyconcepts on Wednesday March 17, 2021 @11:44PM (#26499515)
Please be gentle for those of us who've grown accustomed to the UI thus far along the journey.
Re:Audacity 3.0 by tomcooks on Thursday March 18, 2021 @07:17AM (#26501501)
Exactly, a lot of pro users depend on this swiss army knife and they had to get used to work around it's peculiar UI.

Maybe a custom config profile that is very easy to tune, import and export would allow redesign to get radical without compromising old users

Re:Audacity 3.0 by the_cat_kittles on Wednesday March 17, 2021 @06:55PM (#26497814)
im sure youve heard it before, but priority 1 for me is get the playhead scrubbing reset and looping all sorted. something like logic is very intuitive imo. cheers!
Re:Audacity 3.0 by dharma1 on Wednesday March 17, 2021 @07:04PM (#26497896)
I also really like how intuitive looping is in Logic. They’ve done many things right - been a happy user since the Emagic days
Re:Audacity 3.0 by leviathant on Wednesday March 17, 2021 @06:47PM (#26497740)
This is fantastic news!
Re:Audacity 3.0 by SirLotsaLocks on Wednesday March 17, 2021 @08:34PM (#26498524)
That's really exciting
Re:Audacity 3.0 by MrMan on Wednesday March 17, 2021 @11:27PM (#26499438)
Please get them to add MMC sync, it would make recording much better
Re:Audacity 3.0 by pmayrgundter on Thursday March 18, 2021 @01:38AM (#26499952)
Please consider web first!
Re:Audacity 3.0 by majewsky on Thursday March 18, 2021 @08:17AM (#26501866)
There's enough web-only stuff as it is. I'm thankful for everything that does not require a constant internet connection. For instance, I have already used Audacity to edit a radio show while on a train.
Re:Audacity 3.0 by tomcooks on Thursday March 18, 2021 @07:17AM (#26501506)
And then when there's no internet in the studio you're stuck? Ehh
Re:Audacity 3.0 by pmayrgundter on Thursday March 18, 2021 @02:17PM (#26505699)
Well, take a look at eg theia-ide.org. you can begin use on web and then run locally, either as docker or built from git source project. Web is portable, even offline