www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Digital Audio Workstation in D

reply Tanel =?UTF-8?B?VGFnYXbDpGxp?= <tanel58 hotmail.com> writes:
This may be a pipe dream, but I want to create (with the help of 
other developers, of course) a DAW using D.

The reasons are mainly:
+ The design can be very complex
+ Realtime playback is a requirement
+ You can do a lot of things with audio

It would be interesting to see how D could handle a big project 
such as this.

I can't do it on my own, however.
So I'm asking, is there anyone in the D community who would be 
interested in a project of this likeness?
Feb 14 2016
next sibling parent reply Tanel =?UTF-8?B?VGFnYXbDpGxp?= <tanel58 hotmail.com> writes:
My current attack plan is:
+ Use SDL2 wrappings in GFM as a base
+ Create helper libraries for mixing etc.
+ Create a simple keyboard-controlled program that uses the 
helper libraries to play notes.

After that, a comprehensive design of the actual program should 
be created.
That is where your input becomes most valuable.
Feb 14 2016
next sibling parent reply Andy Smith <andyrsmith googlemail.com> writes:
On Sunday, 14 February 2016 at 22:07:27 UTC, Tanel Tagaväli wrote:
 My current attack plan is:
 + Use SDL2 wrappings in GFM as a base
 + Create helper libraries for mixing etc.
 + Create a simple keyboard-controlled program that uses the 
 helper libraries to play notes.

 After that, a comprehensive design of the actual program should 
 be created.
 That is where your input becomes most valuable.
Sounds like a very interesting project. Wish you the best of luck :-) A few nuggets that may prove useful... Going after industry heavyweights like Ableton, Bitwig, (Apple even!) is a pretty daunting prospect. I wouldn't want to discourage anyone but it will be no mean feat to produce something that people genuinely prefer using to these tools. That's not dismissing you at all, it's simply that the bar is very high at the moment with these tools. There must be something in the water in Berlin but there's so much great stuff coming out of there at the moment ... I'd maybe consider choosing your battles - one very credible and realistic 'on-ramp' would to be to initially produce something akin to supercollider with a distributed architecture that lets you start with an audio engine but defer all the user interface aspects to a traditional DAW and handle the interaction via OSC/Midi or one of the plugin architectures. Another suggestion, if you *do* go the whole user interface route would be to consider partitioning your user interface code so that it can be used for other contexts/applications. I'd literally bite the hand off anyone that were to offer a GUI toolkit of the quality of Ableton, Blender or Logic's environment, Max etc. so that I could use it in a finance context but these tools (even when opensource) tend to be lamentably tied to the application they were designed to enable :-( ( If I'm wrong in saying this please let me know I'd be very keen to hear!) . Cheers, A.
Feb 16 2016
parent reply Ola Fosheim =?UTF-8?B?R3LDuHN0YWQ=?= writes:
On Tuesday, 16 February 2016 at 11:21:16 UTC, Andy Smith wrote:
 Going after industry heavyweights like Ableton, Bitwig, (Apple 
 even!) is a pretty daunting prospect. I wouldn't want to 
 discourage anyone but it will be no mean feat to produce 
 something that people genuinely prefer using to these tools.
Well, Abelton Live is quite limited when it comes to sample processing. If you stick to non-real time sample processing then it is quite possible to create a solid application within a reasonable timeframe. As an example, a fellow norwegian, Øyvind Hammer, created a mixing program (distributed so that it could run on multiple computers) in the 90s for X11: http://music.columbia.edu/~brad/mix-macOSX/
Feb 16 2016
parent reply Andy Smith <andyrsmith googlemail.com> writes:
On Tuesday, 16 February 2016 at 11:34:36 UTC, Ola Fosheim Grøstad 
wrote:
 On Tuesday, 16 February 2016 at 11:21:16 UTC, Andy Smith wrote:
 Going after industry heavyweights like Ableton, Bitwig, (Apple 
 even!) is a pretty daunting prospect. I wouldn't want to 
 discourage anyone but it will be no mean feat to produce 
 something that people genuinely prefer using to these tools.
Well, Abelton Live is quite limited when it comes to sample processing. If you stick to non-real time sample processing then it is quite possible to create a solid application within a reasonable timeframe.
I think we've got vastly different ideas of what the intended use-case of a DAW actually is :-)
Feb 16 2016
parent Ola Fosheim =?UTF-8?B?R3LDuHN0YWQ=?= writes:
On Tuesday, 16 February 2016 at 12:36:37 UTC, Andy Smith wrote:
 I think we've got vastly different ideas of what the intended 
 use-case of a DAW actually is :-)
Probably, but a sequencing, sound generation, sample editing, mixing and live mixing are essentially five different feature sets. Gotta pick one. (IIRC Mix was real time and could use MIDI for automated sliders. It was used for contemporary electro acoustic music.)
Feb 16 2016
prev sibling parent Tanel =?UTF-8?B?VGFnYXbDpGxp?= <tanel58 hotmail.com> writes:
On Sunday, 14 February 2016 at 22:07:27 UTC, Tanel Tagaväli wrote:
 + Use SDL2 wrappings in GFM as a base
On second thought, abstracting platform-specific APIs seems a better idea. Would allow for more control, require less dependencies and I'm sure there are other good reasons.
Feb 16 2016
prev sibling next sibling parent reply Rikki Cattermole <alphaglosined gmail.com> writes:
So here is how I see the current situation.
- Multiple image libraries, no current leader
- Multiple windowing solutions, no current leader
- No audio solutions (atleast reasonably)

I'm currently working on image + windowing for Phobos [0].
Manu Evans is working on color primitives.

Currently nobody is working on audio primitives. Things like 
reading/writing files. Playback and recording.

Are you interested in taking ownership of the more basic primitives?

[0] https://github.com/rikkimax/alphaPhobos/
Feb 14 2016
parent reply Tanel =?UTF-8?B?VGFnYXbDpGxp?= <tanel58 hotmail.com> writes:
On Monday, 15 February 2016 at 02:31:21 UTC, Rikki Cattermole 
wrote:
 Are you interested in taking ownership of the more basic 
 primitives?
Ownership as in "Only I can work on this."? If so, no. I have little to no experience with audio I/O, X11 or DirectX/Windows API. I'm just a somewhat quick learner, especially when learning something can help achieve my goals (in this case, being able to customize the software I use to create music). Being "fully D" is not a priority to me, initially depending on SDL and later switching the low-level libraries to pure D implementations is totally fine. Once I've learned more about the insides of audio software and the native APIs on multiple platforms, I might be able to contribute to said audio primitives. Until then, Ketmar seems a more suited candidate (already has a multi-channel sound engine, Follin[0] in the works (only on ALSA, though) ). P.S. Thanks for your work on windowing and image handling, will be very useful once an actual GUI for the DAW is needed. [0] http://repo.or.cz/iv.d.git/tree/refs/heads/master:/follin
Feb 14 2016
next sibling parent reply Ola Fosheim =?UTF-8?B?R3LDuHN0YWQ=?= writes:
On Monday, 15 February 2016 at 07:55:22 UTC, Tanel Tagaväli wrote:
 Once I've learned more about the insides of audio software and 
 the native APIs on multiple platforms, I might be able to 
 contribute to said audio primitives.
I think you should forget about creating abstractions. Use the low level audio API for the platform directly. But you haven't really said what features you want. You basically need to read up on signal processing... A good DSP C-library is the main bottleneck for such a project. I haven't been able to find a BSD style licensed high quality polyphase resampling library. Which is what you need if you want to efficiently change pitch on the fly. If someone knows of one, please let me know :-).
Feb 15 2016
parent reply Guillaume Piolat <contact gam3sfrommars.fr> writes:
On Monday, 15 February 2016 at 10:52:17 UTC, Ola Fosheim Grøstad 
wrote:
 I haven't been able to find a BSD style licensed high quality 
 polyphase resampling library. Which is what you need if you 
 want to efficiently change pitch on the fly.
This library exist, the author Aleksey Vaneev is basically a DSP greek semi-god. https://github.com/avaneev/r8brain-free-src By the same author: https://github.com/avaneev/avir
Feb 15 2016
parent reply Ola Fosheim =?UTF-8?B?R3LDuHN0YWQ=?= writes:
On Monday, 15 February 2016 at 14:39:38 UTC, Guillaume Piolat 
wrote:
 This library exist, the author Aleksey Vaneev is basically a 
 DSP greek semi-god.
 https://github.com/avaneev/r8brain-free-src

 By the same author: https://github.com/avaneev/avir
Hm, looks like an upsampled sinc filter. Have you compared it to these? https://ccrma.stanford.edu/~jos/resample/Free_Resampling_Software.html
Feb 15 2016
parent reply Guillaume Piolat <contact gam3sfrommars.fr> writes:
On Monday, 15 February 2016 at 23:49:35 UTC, Ola Fosheim Grøstad 
wrote:
 On Monday, 15 February 2016 at 14:39:38 UTC, Guillaume Piolat 
 wrote:
 This library exist, the author Aleksey Vaneev is basically a 
 DSP greek semi-god.
 https://github.com/avaneev/r8brain-free-src

 By the same author: https://github.com/avaneev/avir
Hm, looks like an upsampled sinc filter. Have you compared it to these? https://ccrma.stanford.edu/~jos/resample/Free_Resampling_Software.html
I haven't. It is said in places that ~4x sinc oversampling followed by a spline interpolation yield really good results.
Feb 16 2016
next sibling parent Ola Fosheim =?UTF-8?B?R3LDuHN0YWQ=?= writes:
On Tuesday, 16 February 2016 at 10:34:46 UTC, Guillaume Piolat 
wrote:
 It is said in places that ~4x sinc oversampling followed by a 
 spline interpolation yield really good results.
There is a finish article (PDF) that lists how different oversampling ratios (2-32x?) and interpolation techniques affects quality and performance. There are some interesting tradeoffs. But for existing libraries, only testing will help. :)
Feb 16 2016
prev sibling parent Ola Fosheim =?UTF-8?B?R3LDuHN0YWQ=?= writes:
On Tuesday, 16 February 2016 at 10:34:46 UTC, Guillaume Piolat 
wrote:
 It is said in places that ~4x sinc oversampling followed by a 
 spline interpolation yield really good results.
Here's the PDF I thought of: http://www.student.oulu.fi/~oniemita/dsp/deip.pdf
Feb 16 2016
prev sibling parent reply Rikki Cattermole <alphaglosined gmail.com> writes:
On 15/02/16 8:55 PM, Tanel Tagaväli wrote:
 On Monday, 15 February 2016 at 02:31:21 UTC, Rikki Cattermole wrote:
 Are you interested in taking ownership of the more basic primitives?
Ownership as in "Only I can work on this."? If so, no.
Onwership as in somebody needs to spear head the work ;)
 I have little to no experience with audio I/O, X11 or DirectX/Windows API.
 I'm just a somewhat quick learner, especially when learning something
 can help achieve my goals (in this case, being able to customize the
 software I use to create music).
The major reason why I'm not working on this myself is because I already have enough on my plate and I have no clue about audio code. Most of what you need is fairly simple, its just a lot to take in.
 Being "fully D" is not a priority to me, initially depending on SDL and
 later switching the low-level libraries to pure D implementations is
 totally fine.

 Once I've learned more about the insides of audio software and the
 native APIs on multiple platforms, I might be able to contribute to said
 audio primitives.
 Until then, Ketmar seems a more suited candidate (already has a
 multi-channel sound engine, Follin[0] in the works (only on ALSA,
 though) ).
Ketmar definitely would not want to work on it. The only person I know who could is p0nce and he's pretty busy as it stands with his own audio work.
 P.S. Thanks for your work on windowing and image handling, will be very
 useful once an actual GUI for the DAW is needed.

 [0] http://repo.or.cz/iv.d.git/tree/refs/heads/master:/follin
Feb 15 2016
parent Guillaume Piolat <contact gam3sfrommars.fr> writes:
On Monday, 15 February 2016 at 11:03:09 UTC, Rikki Cattermole 
wrote:
 Ketmar definitely would not want to work on it. The only person 
 I know who could is p0nce and he's pretty busy as it stands 
 with his own audio work.
Indeed, but as part of speed/regression testing there is a crappy VST host in dplug:host sub-package that can be used to process data with an audio plugin. Which allows you to reuse the wealth of plugins out there.
Feb 15 2016
prev sibling parent reply SomeDude <lovelydear mailmetrash.com> writes:
On Sunday, 14 February 2016 at 21:57:38 UTC, Tanel Tagaväli wrote:
 This may be a pipe dream, but I want to create (with the help 
 of other developers, of course) a DAW using D.

 The reasons are mainly:
 + The design can be very complex
 + Realtime playback is a requirement
 + You can do a lot of things with audio

 It would be interesting to see how D could handle a big project 
 such as this.

 I can't do it on my own, however.
 So I'm asking, is there anyone in the D community who would be 
 interested in a project of this likeness?
A DAW is a major undertaking that would test the language boundaries for sure. The real time requirements mean that the GC is excluded. Cockos, the makers of REAPER, have a few C libraries that could be used, among which a solid VST wrapper and general libraries that they use in their software. As for audio, it's also worth having a look at the JUCE C++ lib.
Feb 16 2016
next sibling parent reply Ola Fosheim =?UTF-8?B?R3LDuHN0YWQ=?= writes:
On Tuesday, 16 February 2016 at 10:14:35 UTC, SomeDude wrote:
 The real time requirements mean that the GC is excluded.
Not necessarily, but you need clean separation.
 Cockos, the makers of REAPER, have a few C libraries that could 
 be used, among which a solid VST wrapper and general libraries 
 that they use in their software.
 As for audio, it's also worth having a look at the JUCE C++ lib.
Isn't JUCE dual licensed as GPL/commercial? If you go GPL/LGPL then you have lots of libraries to choose from. E.g. Csound has lots of code that can be reused. But it would make more sense to build on Audacity.
Feb 16 2016
parent Guillaume Piolat <contact gam3sfrommars.fr> writes:
On Tuesday, 16 February 2016 at 10:20:33 UTC, Ola Fosheim Grøstad 
wrote:
 Isn't JUCE dual licensed as GPL/commercial? If you go GPL/LGPL 
 then you have lots of libraries to choose from. E.g. Csound has 
 lots of code that can be reused.
GPL license is incompatible with the VST license. You can't use JUCE to create GPL VST hosts or clients without paying for it.
Feb 16 2016
prev sibling parent Guillaume Piolat <contact gam3sfrommars.fr> writes:
On Tuesday, 16 February 2016 at 10:14:35 UTC, SomeDude wrote:
 Cockos, the makers of REAPER, have a few C libraries that could 
 be used, among which a solid VST wrapper
You probably mean IPlug, it's a very good library but it's for plugin clients, not hosts.
Feb 16 2016