Coder Social home page Coder Social logo

zig-synth's Introduction

zig-synth

An audio synthesizer in Zig

Roadmap

  • Sound

    • Polyphony
      • Basic polyphony
      • Voice stealing
      • Apply parameter updates across all voices
    • Unison
      • An efficient way to implement Unison could be to have multiple scanners per oscillator, where each one has a slightly offset step size. However, I need to look into that first.
    • Modulation
      • Modulation Matrix (?)
        • With Zigs comptime abilities it seems like there is a performant, but still very dynamic implementation for this.
      • Because you cannot have threads in WebAssembly, I will probably have to create a separate instance on the UI thread, where I calculate the modulated values and then send those to the audio worklet.
    • Filter
  • Tech

    • Windows (WASAPI) Support
    • Linux Support (I will need to look into possible APIs first)
    • Build as VST. I don't really know how VSTs work, but from what I read it seems like it's just a shared library with a set of defined exports.
    • User Interface
      • I plan on having multiple render backends, like:
        • Metal on macOS. When this is finished I don't see a problem with getting the whole thing to run on iOS either.
        • DirectX / OpenGL on Windows
        • WebGL in the browser. This is what I will target first, because it's the most approachable one for me.. I will need to workout a proper API anyways. Maybe even a DOM-backed UI will work for that.

Building

First of all git clone https://github.com/schroffl/zig-synth this repository and run zig build in it.

  • The standalone version only runs on macOS for now. To start it execute zig build run in the cloned git repo. If you have a MIDI input device, you can go into src/host/macos.zig and set the proper midi_hint value.

  • The single-file browser build can be found in zig-cache/bin/zig-synth.html. Sadly, this only works in Chrome at the time of writing. Firefox et al. haven't implemented the Audio Worklet API yet. Ironically, since Microsoft Edge now uses Chromium it probably runs there too.

Useful Resources

A list of useful resources that I find during development:

zig-synth's People

Contributors

schroffl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

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.