Git Product home page Git Product logo

Comments (4)

mgkuhn avatar mgkuhn commented on September 15, 2024 2

@KronosTheLate: I know of SampledSignals.jl but haven't used it yet. (One of the things I have learnt over the years is that no “mission statement” can ever replace practical experience with actually using the thing.) Having said that, I'm generally a bit wary of special-purpose types with wide usability claims. They usually constrain the set of applicable methods quite a bit in practice and thus can add syntactic overhead with the ongoing need for wrapping and unwrapping the actual raw data at many steps. Or distract the compiler's optimizer. One of the attractions of the (original) MATLAB APIs was that they avoid such syntactic and mental overhead caused by elaborate type systems that the user has to master first, in favour of just using the basic built-in array types of the language, rather than specialists types that e.g. convert units of measurements (time, voltage) and other metadata, or even try to do interpolation for sample-rate conversion under the hood (a big can of worms, as there are lots of different application-specific interpolation and conversion strategies).

Another attraction of WAV.jl is that it has hardly any other packages as dependencies (mainly FileIO.jl). Therefore, I'd probably isolate support for specialist types, such as SampledSignals.jl into a separate glue module/package, to avoid dependencies (both technical and mental) for those who don't want to use such specialist types, and just want to get basic types such as Vector{Int16} to the OS drivers and back.

from wav.jl.

mgkuhn avatar mgkuhn commented on September 15, 2024 1

My suggestion at some point would be that we take WAV.jl as the basis for a new package AudioIO.jl, and try to make that the main native (i.e., not based on a C library such as portaudio) Julia Audio I/O package. However, this should be done in a non-backwards-compatible way, because WAV.jl currently implements an obsolete MATLAB API quite closely (the old wavread/wavwrite/wavplay interface, which MATLAB dropped some years ago), and it does so in a very MATLAB-ideosyncratic way (e.g., string parameters, allowing floating-point time indices, etc.). I would quite like to change the API in a number of ways into something that is far closer to how APIs are done in modern Julia, and perhaps also consider the modern MATLAB Audio API (audioread/audiowrite). Also, the package shouldn't be limited to just the WAV file format, as there are a number of other similar loss-less audio file formats (e.g. Sun's *.au format) that could easily be supported as well in such a package.

from wav.jl.

KronosTheLate avatar KronosTheLate commented on September 15, 2024

I mean, a native Julia all-in-one package with a modernized API for all audio IO purposes sounds like the dream.

Do you think that the API of SampledSignals.jl is a good basis for what you are imagining? It sound like its mission statement is to be the basis for stuff like this.

from wav.jl.

KronosTheLate avatar KronosTheLate commented on September 15, 2024

That sounds like a very reasonable stance. Are you sceptical of the idea of a generalized API in general, or just very wary of the pitfalls of that approach? If it is the second case, then possibly a revamped API for WAV.jl, battle-tested by yourself, could inspire the API of SampledSignals.jl. It just seems like there are many advantages of having a uniform API, and therefore that it is a goal worth striving for.

So what you imagine in AudioIO.jl is a pure-Julia alternative to what is currently the JuliaAudio-ecosystem? Because that just sounds lovely. If so, I consider this issue closed.

from wav.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.