1. 2

    As memory (hah) serves, this is useful when doing things that require low-latency stuff like signal and audio processing.

    1. 1

      Circular buffers are definitely used all the time in audio, but actually not for the performance – they’re used because they’re lock-free as long as there’s only one writer and one reader. Any sort of blocking operation in the audio/realtime thread is verboten, so circular buffers provide safe ways of message passing or buffering audio to/from other threads.

    1. 4

      Red author here, feel free to ask any question about it.

      1. 2

        Hey, I’m interested in potentially using Red as an embedded glue language in a multimedia application. Am I correct in thinking that the next release (coming sometime in July?) is going to focus on the embedding use-case?

        edit: Unrelated follow-up: is there any roadmap for 64bit support?

        1. 3

          You’re correct, next release will allow properly wrapping of the whole runtime and user apps in a shared library, for all our supported platforms (including cross-compilation), and expose a C-level API (so, callable from any other language with FFI support).

          For 64-bit, it’s not yet in the roadmap, as we need first to make some design decisions with regard to our memory model, we would like not to double the size of the current 128-bit cells size we rely on for boxed types. Once that done, we’ll need to add a 64-bit emitter for our code backends, and finally extend the linker for 64-bit support. So, as our short-term roadmap is very dense already, it’s unlikely we’ll be able to complete all that this year (though, iOS support requirements might push that work higher in our priority list).

      1. 5

        So, this is my first post in one of these threads. My primary project at the moment is a software synthesizer as a VST plug-in.

        This past weekend, I got another beta/alpha built and distributed to a small pool of testers, and this week I’m handling the ensuing bug-reports (which include null pointer derefs, various openGL platform issues, and just a wonderful smörgåsbord of smaller things). I’ve brought a designer on, so I’m looking forward to the UI (which currently looks like this) becoming less perfunctory and nicer both to look at and use.

        1. 1

          I’m an amateur synth buff, so if you have an OSX VST or AU available I’d be happy to help you test!

          1. 1

            Sure, I’ll drop you an email. Always good to have more people kicking the tires.

          2. 1

            a VST plug-in.

            Does it crash every 5 minutes, taking down the host application? Just kidding :) In my company’s experience that seems to be a common problem with 3rd party VST plugins. IIRC we now start a separate process for every call to a VST plugin so that it doesn’t take down our whole application when it inevitably crashes.

            1. 1

              I’m curious as to what your company does!

              It’s definitely been my experience that not all VST plugins are well-behaved. I suspect I have one that subtly corrupts memory in the host and leads to random crashes when loading plugins.

              That said, my synth has been rather stable. I have received very few bug reports of crashing (compared to other issies), and I’m valgrind-clean to boot.

              1. 1

                We just make audio and video editors. I’m not in the audio team, but I hear stories about the pain of dealing with 3rd party VST plugins that are essentially a black box but are potentially lethal to the host application :)

                Running valgrind or even just knowing what it is probably puts you in the top 1% of VST programmers :)

          1. 4

            For those who aren’t in the know, 64k means that this entire intro is distributed as an executable that is 64 kilobytes or less in size. The executable must be entirely self-contained, so it has to include the graphical code, the audio synthesizer, the music itself, and then any additional assets.

            The entire 64k compo this year was massive. Also worth a watch are the runners-up: mercury’s on and approximate’s Small matters of the heart.

            1. 2

              Considering the trend, I was surprised to see so many entries (so many good entries, nonetheless). 64k is a category that’s being abandoned by demoparties since it’s got a lot easy nowdays and people go “just do a demo instead”, even Revision joked on that.

              On the other hand, I found the PC Demo compo to be quite boring. (thank god for all the funny demos like Hackers' and “We Have Accidentally Your Whole Audience”, which at least made me laugh a lot)

              Although it was already posted, the most impressive demo of Revision 2015 was probably 8088 MPH

              PS: I wonder if they’ll make a “Invitation compo” next year.

              1. 2

                This is the second year in a row that the 64k outshined the PC demo compo by a considerable margin. In fact, I don’t even remember what won the PC demo comp last year (though I remember that “new” by still was a really interesting concept and the music was dope).

                I personally think 64k is interesting because of the limitations it imposes on the music. It’s cool to see people managing to sneak samples in regardless of the size constraint, but I feel like there’s some space left there to explore in general. There have been some interesting changes in the DSP world in the past few years (particularly with regards to filter implementation) and I’ve been experimenting to see how small I can get the code.

                1. 2

                  From a music perspective I guess it can still give a challenge, but from a graphical point of view 64k is more than plenty when you use raymarching, which I guess is why some people don’t see the point of 64k anymore.

                  I love Revision’s idea of a 8k compo, I think (and I hope) we will see some really complex stuff in there as more people get into that.

                  1. 3

                    There’s a long-standing discussion in the scene as to what categories a party should accommodate. Assembly offers 1K and 4K, but the 1K productions are almost universally fractal explorers with hideous bleeping in the background. 4K is more interesting to me, and every now and then you get real shockers like Elevated.

                    I, too, think 8K is a good compromise. You have enough room for decent music and something other than fractals, and still have to work hard to get all your assets in the provided space. Revision was a real treat this year.