[HN Gopher] Continuous Looper
       ___________________________________________________________________
        
       Continuous Looper
        
       Author : lukastyrychtr
       Score  : 63 points
       Date   : 2022-04-15 11:59 UTC (1 days ago)
        
 (HTM) web link (beijaflor.io)
 (TXT) w3m dump (beijaflor.io)
        
       | ta988 wrote:
       | I wish we would have something like JUCE but in Rust.
        
         | nunja wrote:
         | Some good work in this direction: https://github.com/robbert-
         | vdh/nih-plug
         | 
         | Also, have a look at the vibrant Rust Audio community on
         | Discord!
        
       | adriand wrote:
       | Is Rust a common choice for audio programming? What are the
       | pros/cons?
        
         | necubi wrote:
         | From my experience also building a live looper in rust
         | (https://github.com/mwylde/loopers):
         | 
         | Pros
         | 
         | - Rust is much more pleasant to write (for me at least) than C
         | or C++
         | 
         | - lots of good libraries for the non-audio stuff (like lockless
         | queues)
         | 
         | - the compiler checks for potential data races, making complex
         | multithreaded programming much easier
         | 
         | - C++ audio plugins are notoriously unstable, rust makes it
         | much easier to write reliable code
         | 
         | - easy custom allocator support to help prevent accidental
         | allocations in the audio thread (which can potentially lock)
         | 
         | Cons
         | 
         | - the rust audio ecosystem is much less mature, so you're going
         | to need to figure out a lot of basic things yourself and
         | potentially write patches for core libs like jack and core
         | audio
         | 
         | - some stuff is more or less unsolved, like building audio
         | plug-in GUIs
         | 
         | But overall, I think it's totally worth it. Audio programming
         | requires tight control over allocations and locking in order to
         | ensure that the audio thread remains live, and generally needs
         | high performance to stay within your latency budget. Rust makes
         | it easier to achieve those goals without giving up safety and
         | reliability.
        
           | PaulDavisThe1st wrote:
           | > C++ audio plugins are notoriously unstable, rust makes it
           | much easier to write reliable code
           | 
           | as the author of a C++ DAW (host), I would say that the
           | biggest issues with plugins generally have little to do with
           | the language they are written in, but their interactions with
           | the host via the often ambiguous nature of the plugin API(s)
           | semantics.
           | 
           | As an aside, other than (obviously) the first item you list,
           | all of those "pro" things are available for a C++ plugin
           | developer (not necessarily via the compiler; we use valgrind
           | for example to do data race detection).
           | 
           | And as another aside, while a new developer may make some new
           | developer errors when starting out with audio programming,
           | reading Ross Bencina's paper (linked in TFA) will clear that
           | stuff up fairly quickly. What it won't do is let you know
           | that, for example random() in the C standard library may take
           | a lock.
        
       | v-yadli wrote:
       | Pretty much a software Octatrack.
        
       | mrspeaker wrote:
       | This is great! I've been trying to learn audio programming for
       | ages and this (along with repo:
       | https://github.com/yamadapc/augmented-audio) look like really
       | fantastic resources!
        
       ___________________________________________________________________
       (page generated 2022-04-16 23:01 UTC)