Audacity Github



# 2. Audacity

Sound recording and editing software. The architecture is described as 'like a city', there are some impressive buildings, and some less impressive buildings. It is hindered by licencing issues but gets around these by supporing standard APIs - so said licenced code may be plugged in by a user. Thinking in layers, the base is 3rd party cross platform libs that expose general audio (PortAudio) and GUI (wxWidgets) APIs. These are in seperate DLL files (rather than being compiled into the core file). Size and speed suffer for this, but it allows other DLLs to use them directly at run time - greater extensability.

An abstraction mistake. There's a small story about the original implementation being for mono and not stereo. So the code defaults to one channel, but has been modified to check for 2 channels later on in many places. Better if originally designed for n channels. This issue was also locked in by exposing a GetLink method to get the pair of a channel if it had one, this method has been used throughout and somewhat locked them in. The GUI architecture also has problems - mixes between plugin code, application code, and special cases with absolute positioning etc. They are hoping for a rewrite with greater abstractions - UI components with no required awareness of the greater context.

A drawback of the cross-platform libs: it runs 3 threads, each in their own way. A GUI thread created by wxWidgets and updated every 50ms. An audio thread created by PortAudio for recording and playback. And a buffer thread handled by the application code to keep thins snappy. This creates complexity but it is forced by the expectations of the plugins, had they rolled their own and abstraction could have been made but without all the cross-platform benefits.

Some audio is too big to be handled with speed, or even to fit in RAM. Audacity splits audio into ~1MB 'block files' which are coordinated in an xml based .aup file. Edits only affect the relevant blocks. Block files also hold summary info which is used when zoomed out in place of processing the entire audio track. One issue on windows was lag with more than ~100 files were placed a single directory. So a hierarchy was created with never more than 100 files to a folder.

Audacity has grown organically, no plan was laied down, hence the city like code.

Set Audacity to use the External mic. Ensure you're recording in 16-bit PCM + 44100Hz. Do a sound check, record everyone in the room speaking. You want the lighter part of the meter bar (the green or red bar at the top) to bounce between -12db and -6db while people are talking. Audacity is an easy-to-use, multi-track audio editor and recorder for Windows, Mac OS X, GNU/Linux and other operating systems. Developed by a group of volunteers as open source. Recording from any real, or virtual audio device that is available to the host system. Export / Import a wide range of audio formats, extendible with FFmpeg.

The most applicable thing I've picked up from this is something like 'non-array like arguments make code smell... a bit', or at least indicate that some thinking / explanation is required. Also, writing cross platform creates restrictions - glad I'm in the web space, going to stick here as much as I can!

wxWidgets is a C++ library that lets developers create applications for Windows, macOS, Linux and other platforms with a single code base. It has popular language bindings for Python, Perl, Ruby and many other languages, and unlike other cross-platform toolkits, wxWidgets gives applications a truly native look and feel because it uses the platform's native API rather than emulating the GUI. It's also extensive, free, open-source and mature.

Learn more » or Download now »

Ingenuity Helicopter

Posted on

wxWidgets code probably doesn’t run on Mars (yet), but wxPython/wxWidgets isnevertheless one of the projects whose developers have been credited ascontributors to the NASA Ingenuity mission.

wxWidgets 3.1.5 Released

Audacity github tutorial

Posted on

wxWidgets 3.1.5 release is nowavailable on GitHub.You will find there archives with the library sources and documentation aswell as binaries for the selected Windows compilers such as Microsoft VisualC++, MinGW-w64and TDM-GCC.

Please notice that while 3.1.5 is officially a “development” version becauseit is not fully compatible with the “stable” 3.0.x, the list of backwardsincompatible changes is very short, so you shouldn’t have any problemsupdating to this version from 3.0.x in practice, and you’re encouraged to usethis release, including in production.

Changes in this release

In the nine months since the previous release, there have been more than 1600commits from 70 unique contributors (40 with multiple contributions), so it isimpossible to summarize all the changes in this document without making it toolong, please see the fuller changelog for more (but still not all)details, but some of the most important changes are:

  • New wxWebRequest and related classes provide a simple way to use HTTPSand HTTP/2 from wxWidgets applications using native libraries or libcurl.
  • Support EGL in wxGLCanvas and Wayland in wxMediaCtrl under Linux.
  • Many appearance and other fixes for macOS 11.
  • More improvements to wxGrid UI, API and performance.
  • wxImage improvements: add alpha support in Paste() and clipboard support.
  • API additions: wxPersistentComboBox, wxFileName::ResolveLink(),wxFileHistory::SetMenuPathStyle(), wxString::utf8_string(), wxEVT_FULLSCREEN.
  • Improvements: wxConfig now supports 64-bit integers, wxLog uses millisecondresolution in timestamps, XRC files can be loaded from URLs.
  • Yet more bug fixes, fixes for API inconsistencies and optimizations, notablyin wxDataViewCtrl, wxListCtrl, wxPropertyGrid.

Notice that in spite of all the changes, this release remains almost completelycompatible with 3.1.4 at the API level, so upgrading to it if you’re alreadyusing wxWidgets 3 should be straightforward.

Feedback

Please let us know about your experience with this release via any of thefollowing channels:

Or by commenting under this post.

Thanks to everybody who has contributed to this release and we hope that youwill enjoy working with it!

wxWidgets 3.1.4 Released

Posted on

Audacity Open Source Software

wxWidgets 3.1.4 release is nowavailable on GitHub.You will find there archives with the library sources and documentation aswell as binaries for the selected Windows compilers such as Microsoft VisualC++ and MinGW-w64.

Please notice that while 3.1.4 is officially a “development” version becauseit is not fully compatible with the “stable” 3.0.x, the list of backwardsincompatible changes is very short, so you shouldn’t have any problemsupdating to this version from 3.0.x in practice, and you’re encouraged to usethis release, including in production.

Changes in this release

In the nine months since the previous release, there have been almost 1700commits from 74 unique contributors (37 with multiple contributions), so it isimpossible to summarize all the changes in this document without making it toolong, please see the fuller changelog for more (but still not all)details, but some of the most important changes are:

  • wxOSX port now supports the latest macOS 11 on ARM hardware.
  • wxMSW comes with a new Edge-based wxWebView implementation.
  • Better, although still not perfect, per-monitor DPI support in wxMSW.
  • wxGrid was has been significantly improved and is now much user friendlier.
  • AUI appearance enhancements for non-default GTK themes and macOS dark mode.
  • wxWidgets may now be built with C++20 compiler.
  • Improvements to CMake build system.
  • Allow optionally forbidding dangerous implicit wxString conversions.

And, of course, there were many, many bug fixes in all ports, notably includingfixing several long-standing problems in wxOSX.

Notice that in spite of all the changes, this release remains almost completelycompatible with 3.1.3 at the API level, so upgrading to it if you’re alreadyusing wxWidgets 3 should be straightforward.

Feedback

Please let us know about your experience with this release via any of thefollowing channels:

Or by commenting under this post.

Thanks to everybody who has contributed to this release and we hope that youwill enjoy working with it!

wxWidgets 3.0.5 Released

Posted on

wxWidgets 3.0.5, the latest release in the stable 3.0 series, is nowavailable. Upgrading to it is strongly recommended for all users of theprevious 3.0.x release as it brings a lot of bug fixes and support for newercompilers (MinGW 4.9, 5 and 7), SDKs (macOS 10.10 and later) and libraries(GStreamer 1.0) but remains 100% compatible with 3.0.0, both at the API andthe ABI level, and so upgrading to it doesn’t require absolutely any changesto the existing applications.

The announcement post contains the fuller list of the most importantchanges in this release and they are described in even more details in thechange log.

As usual, in addition to the sources, you can also download binaries for theselected Windows compilers (any version of Microsoft Visual C++ from 2008 to2019, MinGW-TDM 4.9.2, 5.1.0 and 9.2.0, or MinGW 7.2.0, 7.3.0 and8.1.0). And you can read the documentation for this release online.

Thanks to everybody who contributed, by reporting bugs and submitting patches,to this wxWidgets release. We hope you will find it even better than theprevious one and will enjoy using it!

wxWidgets 3.1.3 Released

Audacity Github

Posted on

wxWidgets 3.1.3 release is nowavailable on GitHub.You will find there archives with the library sources and documentation aswell as binaries for the selected Windows compilers such as Microsoft VisualC++ and MinGW-w64.

Please notice that while 3.1.3 is officially a “development” version becauseit is not fully compatible with the “stable” 3.0.x, the list of backwardsincompatible changes is very short, so you shouldn’t have any problemsupdating to this version from 3.0.x in practice, and you’re encouraged to usethis release, including in production.

Changes in this release

There have been almost 2000 commits from 97 unique contributors (52 withmultiple contributions) since 3.1.2 releases, so it is impossible to summarizeall the changes in this document without making it too long, please see thefull changelogfor more details, but some of the most important changes are:

  • Support for per-monitor DPI and dynamic DPI changes under MSW.
  • More generally, many fixes for various controls appearance in high DPI.
  • Long requested support for freezing rows and/or columns in wxGrid.
  • New XRC handlers for wxDataViewCtrl, wxInfoBar.
  • It is now possible to use gradients when creating wxGraphicsPen.
  • Extended compiler (MSVS 2019) and platforms (macOS 10.14+) support.
  • Significant improvements to the (still experimental) wxQt port.
  • Important bug fixes for focus handling in wxOSX port.

Feedback

Please let us know about your experience with this release via any of thefollowing channels:

Github

Or by commenting under this post.

Thanks to everybody who has contributed to this release and we hope that youwill enjoy working with it!