8 ms·
Show HN: SOUL Language 1.0 – A platform for writing and running audio code
- samuell 6y agoI would have expected a code example on the front page.
- julesrms 6y agoWell, that's just a press release page, but it does have a link to the examples: https://soul.dev/examples/ https://soul.dev/examples/ You can also browse the example code on the github: https://github.com/soul-lang/SOUL/tree/master/examples/patches https://github.com/soul-lang/SOUL/tree/master/examples/patch...
- skohan 6y agoI would also have appreciated a code example above the fold, even on the press release. When I read about a new language, the first thing I want to see is what the code looks like.
- CamperBob2 6y agoIn this case, it's equally important to hear what the code sounds like. Try their demo page, it's actually very nifty.
- tgv 6y agoImpressive.
- samuell 6y agoAh, missed the main website (just thought the github one was just that). On soul.dev the examples are indeed easy enough to find. Looks like an interesting project!
- Gys 6y ago‘ This site uses a code editor which is not suitable for small screens. Please view on desktop/tablet.’ I was curious to see some code, but I guess that has to wait.
- julesrms 6y agoThere's plenty of code to see! Our playground site has been up and running since 2019, and people are already developing products with SOUL. https://soul.dev/examples/ https://soul.dev/examples/ EDIT: ah, I misunderstood you.. You mean you'd found the examples but the playground page didn't fit on a phone. Yeah, it's tricky to squeeze all the stuff needed into a small space! We're planning to do a huge redesign of the site in 2021 to turn it into a much more powerful developer portal, and we'll certainly look at other form-factors in doing that.
- schwartzworld 6y agoTurning my phone sideways worked for me
- rectang 6y agohttps://soul-lang.github.io/SOUL/docs/SOUL_FAQ.html https://soul-lang.github.io/SOUL/docs/SOUL_FAQ.html > What is the licensing/business model? > Our intention is to make SOUL entirely free and unencumbered for developers to use. All our public source code is permissively (ISC) licensed. We’re currently keeping some of our secret sauce closed-source, but the EULA allows use of it freely to encourage its adoption in 3rd party hardware and software. Ultimately, we plan to commercialise SOUL by licensing back-end drivers and other IP for use by vendors who are building SOUL-compatible hardware products.
- QuadDamaged 6y agobeen bit by another audio engine that had the same license and pulled a bait and switch. No thanks.
- cesaref 6y agoHi, one of the developers here. How would it be possible to allay your concerns? I think we've tried to be as clear as possible with our intentions - how could we rule out such possibilities with our license agreement?
- naewonawonga 6y agoIf there's no mechanism to bind those intentions to the intellectual property, what you're building is just another time bomb which will eventually detonate at the expense of your users.
- devenblake 6y agoDisclaimer: *I'm not your target audience*; I don't plan to use your product even if you made it public domain. I never want to agree to an EULA before starting to develop something outside of a professional setting. That's an immediate dealbreaker for me. But even if I did - I wouldn't be able to disassemble or reverse engineer your software (2.2)? Also - why are there so many clauses in the EULA telling me to obey really specific laws? Aren't these redundant to section 2?
- rectang 6y agoA few questions which spring to mind: * Can I use SOUL to create freestanding interactive performance environments a la Pure Data? * What prospects are there for beefing up hardware to run more DSP and bring down latencies? Are there, or will there be open-hardware DSP projects which run SOUL, or open-source runtimes which achieve high performance on standard issue CPUs? If the company behind SOUL goes under (Roli, I think), what happens? * Could I write a program in SOUL that does real time beat detection given an audio signal, say a steady drum beat (to make things simple)?
- julesrms 6y ago> Can I use SOUL to create freestanding interactive performance environments a la Pure Data? SOUL does have a JIT compiler and you can live-code it, and you can certainly use it to write programs that generate musical patterns etc.. So sure, the language could be used like that. Our background and focus has always been more from the pro-audio side of things rather than performance, though, so the tools we've built so far aren't really targeted at performance use-cases, it's more about development of apps and plugins. > What prospects are there for beefing up hardware to run more DSP and bring down latencies? Are there, or will there be open-hardware DSP projects which run SOUL, or open-source runtimes which achieve high performance on standard issue CPUs? If the company behind SOUL goes under (Roli, I think), what happens? Right now we've not had the resources to get stuck into that side of things deeply yet - hoping to be able to do more on it this year. (And ROLI aren't going to go under, ha!) > Could I write a program in SOUL that does real time beat detection given an audio signal, say a steady drum beat (to make things simple)? Yep, totally the kind of thing we're expecting people to do with it.
- cesaref 6y ago> Are there, or will there be open-hardware DSP projects which run SOUL, or open-source runtimes which achieve high performance on standard issue CPUs? The binary release includes a build of the soul command for Bela, which is a very cool low latency board + OS for audio (https://bela.io/ https://bela.io/) based on xenomai. It's probably as close as we get to open hardware for DSP, and it puts you in the sub millisecond latency range.
- 6y ago
- jarmitage 6y agoCongrats Jules :) What's the latest on using SOUL with platforms like Faust and Bela?
- julesrms 6y agoWe've had it running on Bela for ages now. This year we'll be releasing the SOUL network protocol, so that we can properly control remote "SOUL venues" on hardware like Bela (our current Bela network is a bit of a bodge to get it running). Faust has also had SOUL support for a while. Not sure what's new over there but maybe Stephane will see this and comment :)
- jarmitage 6y agoNice, it's great to see this project go from C++ rant to reality. Can't wait to never write C++ ever again :) On licensing, how will it work for creators of open source hardware? Will they still need to pay a licensing fee if they are targeting a specific device with closed driver IP? Or could there be an exception there? Do you also see yourselves supporting open low-level hardware (RISC-V, FPGA, ...?), and in that case would you consider opening your driver IP for those targets?
- justforyou 6y agoPlease answer the above questions.
- naewonawonga 6y agoVery important questions, deserving of an answer.
- julesrms 6y agoRight now, we haven't got an official position on how we'll handle the back-end licensing, but it's a sensible assumption is that we'll have an open-source reference implementation that people can use, and then our own optimised or custom versions that we can license. RISC-V is an easy one to support, as our JIT uses LLVM so it's just a case of adding a build flag for that. FPGA is more interesting. I think there could be some really clever tricks we can do for soul programs which are highly parallel, but that kind of rocket-science stuff is probably going to have to wait until we have a couple of PhD students to work on it :)
- Tade0 6y agoCurrent tools for audio coding are complex and non-portable Thank you for addressing this. I was meaning to get into making VST plugins of my own, but currently in order to do that one has to jump quite a few hoops and often as the work grows in complexity so does the required expertise.
- cesaref 6y agoWell that's definitely something we've been wanting to help with. One of the supported features of the soul system is to export a JUCE project from a soulpatch - it cross compiles to a C++ project supporting all the standard plugin formats, so you can get AU support for OSX, and VST3 support on Windows out of that one project. JUCE is one of Jules' previous projects and is pretty much the standard for building cross platform audio plugins used by commercial plugin vendors (https://juce.com/ https://juce.com/)
- deleted 6y ago[deleted]
- offtop5 6y agoLooks very very cool. Does it compile to a VST. Would love to see an example with a gui ! My dream is to make a sample chopper I can use directly from maschine
- julesrms 6y agoYes - the command-line tool will take a SOUL patch and emit a full, ready-to-build JUCE project that will create all the plugin formats (and a standalone app).
- offtop5 6y agoWait , does that mean I need to install the whole build chain ? Anyway to do that in a Docker container, maybe a ci/cd pipeline where I can just push my code and get an VST as a build artifact.
- julesrms 6y agoYeah, at the moment you need to build it. Our ambition is to eventually offer that as a service via soul.dev so you can just download a binary.
- maxpollack 6y agoIf you want to build the resulting JUCE plugin on Github Actions, you can borrow my workflow code https://github.com/maxwellpollack/juce-plugin-ci https://github.com/maxwellpollack/juce-plugin-ci
- Mizza 6y agoCool! For those interested in audio-specific languages, I've had some success with Vult, a transpiled language which runs everywhere, compiles to Pure Data and runs on the Teensy. I used it to make some really powerful, extremely performant filters. http://modlfo.github.io/vult/overview/ http://modlfo.github.io/vult/overview/
- cesaref 6y agoYes, that's very nice. I particularly like the fixed vs float implementation
- ellis0n 6y agoIt looks interesting. Add syntax highlighting code samples to the link and change "Code Examples" link to "Playground / SOUL Editor", etc.
- tgirod 6y agoInteresting! I wonder if the patch format has support for OSC messages for external interactions - so far I only found MIDI support, but maybe I missed something...
- julesrms 6y agoThe patch format is for the same use-case as VST, AudioUnit etc, where OSC isn't really a thing. OSC is more something you'd want to use for a stand-alone program, which needn't be written as a patch. But yes, would be nice to add some OSC wrappers one day. Maybe it's the kind of thing that someone else will contribute before we get around to it.
- hctaw 6y agoI tried out SOUL back when it was first unveiled and I have some questions for the 1.0 release: - Is time/frequency analysis and its analogs a first class citizen? (STFT, wavelets, other real-time spectral/cepstral algorithms) - How do I embed the SOUL runtime into an application? Can SOUL scripts be used like user scripts in a larger application?
- julesrms 6y agoFull support for wide streams (i.e. streams of overlapping windowed blocks, suitable for frequency-domain work) is still to-do (though we've planned for it all along!) We've tried to make embedding it as easy as possible - there's a DLL, and a simple COM interface and a few header-only C++ classes to load and JIT-compile a patch dynamically. We have an example project showing how to do this. FWIW Tracktion Waveform is doing exactly this, and only has a few hundred lines of glue code to enable patches in a full-blown DAW.
- hctaw 6y agoGood to hear! I'll stay in C/C++ until its ready then - I look forward to not needing to prototype in one language and implement in another, but for now the biggest motivator is how easy it is to do spectral/cepstral things in MATLAB (bit of a pain to write windowing code in C++, hard to test, and easy to get wrong). Why COM (and is it actually COM, or is it COM-inspired like VST3)? It's a bit of a pain to interface with it from hosting languages (C is much more straightforward, particularly when worrying about C++ exception safety and garbage collection).
- thatsadude 6y agoDoes it support matrix multiplication, matrix inversion, SVD, etc.? These are very important operations for array processing. I cant seem to find them in SOUL's documents.
- cesaref 6y agoNo, the language does not currently cover matrices. Our primitives include int, float and complex in 32 and 64 bit sizes, and we also have vectors of these types. We have spoken about extending this to matrices, but it's not in the current language. It would be very nice to include this, as it would open up some useful patterns for analog modelling and ML runtimes.
- hogliux 6y agoIMHO SOUL is a game changer in audio just like OpenGL/Direct3D/etc. was a game changer in the graphics world. Think of all of the graphics technologies that were enabled by OpenGL/Direct3D/... and consider the equivalent for sound/music. The trend is clearly going into the direction of application-specific processors and a lot of hardware already has dedicated DSP chips for audio. It is high time that a standard language is proposed to access them in a unified way just like OpenGL did. Full disclosure: I worked with Jules and Cesare at ROLI/JUCE where Jules was my mentor and colleague. If anyone can pull this off, it’s them.
- pjmlp 6y agoOpenGL only did that in a very constrained way, because game consoles never bother to actually support it, despite urban myths. The PS 2 had a timid attempt with ES GL 1.0 + Cg, and some Nintendo models do support a subset, miniGL sytle, and that is about it. Most studios kept writing engines with plugins for various 3D APIs.
- djaychela 6y agoI'm certainly not at a level to be able to use this kind of thing fully, and I've had several attempts in the past to try to learn to create audio plugins/instruments (as audio is my main domain, I'm a dabbling programmer), but this looks like it could help get me where I want to go. I have a (probably dumb) question. I've looked through the docs, and I can't see how you would play a sample back (i.e. to create a simple sampler, which is one of the projects I'm most interested in creating). Am I missing something, or is that something that wouldn't be present at that level, and you'd need to roll your own? EDIT: I've just read the code for the simple piano, and I see that it implements the sample playback itself, so I guess that answers my own question!
- julesrms 6y agoOur "Minimum Viable Piano" example is a multi-sampled piano, which should show you how it works: https://soul.dev/lab/?id=MinimumViablePiano https://soul.dev/lab/?id=MinimumViablePiano
- jckl 6y agoThank you for all the effort, you and your team do inspiring work. After building a pretty big C++ audio app, I think it's time to make a change, and try something a bit kinder (SOUL).
- julesrms 6y agoThanks! Hope you enjoy it!
- dang 6y agoIf curious see also 2019 https://news.ycombinator.com/item?id=19789361 https://news.ycombinator.com/item?id=19789361 2018 https://news.ycombinator.com/item?id=18631453 https://news.ycombinator.com/item?id=18631453
- anticristi 6y agoI'm definitely not the target audience for this, but I can't help wonder: Why introduce a new turing-complete language, instead of building on top of an existing language suitable for "gluing things together"? Python and Lua come to my mind.
- julesrms 6y agoThe use-case for SOUL is about as far from a "glue" language as you can get! It's a language for writing the absolute lowest-level, close-to-the-metal, bit-twiddling realtime code which you'd then glue together using a higher-level language like C++, javascript, python, lua, etc.
- emmanueloga_ 6y agoIs SOUL similar to https://faust.grame.fr/ https://faust.grame.fr/ ? The marketing looks similar: "Faust (Functional Audio Stream) is a functional programming language for sound synthesis and audio processing with a strong focus on the design of synthesizers, musical instruments, audio effects, etc. Faust targets high-performance signal processing applications and audio plug-ins for a variety of platforms and standards." "The core component of Faust is its compiler. It allows to "translate" any Faust digital signal processing (DSP) specification to a wide range of non-domain specific languages such as C++, C, JAVA, JavaScript, LLVM bit code, WebAssembly, etc. In this regard, Faust can be seen as an alternative to C++ but is much simpler and intuitive to learn."
- pierrec 6y agoI'm not affiliated with either but I've used Faust a lot. I believe SOUL intends to be directly supported by various platforms, whereas Faust compiles to whatever kind of code runs on different platforms. So if you like Faust, you might end up compiling Faust to SOUL for some platforms. Faust also has a more advanced syntax. SOUL basically looks like C, while Faust is more functional and designed from the ground up to represent graphs, as such it can look pretty alien. In particular, partial application in Faust is great for graphs but it also means there are 100 ways of writing a program.
- sletz 6y agoSome comments on Faust and SOUL: - you can compile Faust code to SOUL, and export it (as the .soul and .soulpatch files) from the Faust Web IDE https://faustide.grame.fr/ https://faustide.grame.fr/ (or https://fausteditor.grame.fr https://fausteditor.grame.fr for a simpler version) - lower-level tools like "faust2soul" are part of the Faust distribution: https://github.com/grame-cncm/faust https://github.com/grame-cncm/faust and https://github.com/grame-cncm/faust/tree/master-dev/architecture/soul https://github.com/grame-cncm/faust/tree/master-dev/architec... - using Faust/SOUL on Bela and having SOUL as the intermediate language to JIT compile Faust code is certainly possible, but not the easiest way ! Bela developer Giulio experimented a more direct Faust JIT support on Bela (since Faust can directly generate LLVM IR code and JIT it) here: https://github.com/giuliomoro/bela-faust-jit https://github.com/giuliomoro/bela-faust-jit, but this projet is a bit frozen by lack of time to improve it. Feel free to bring it to life again.
- hootbootscoot 6y agoCool! I have a few questions, I hope are not stupid. I'll confess to not having delved into the heart of SOUL source yet. 1) what are these "audio processors" that computers already have embedded in them? (DSP cores and associated extensions or an MCU controlling the audio-HW-codec state machine and providing a buffer for the computer or?) 2) Does SOUL engage in the audio sub-system hardware in any way or perform any firmware like activities? DMA engine configuration typically driving the audio engine I/O, right? 3) Do external audio DSP hardware like UAD provide, for example, pipe audio out and then back into the computer, typically? Could such hardware be addressed if it weren't proprietary?