Coder Social home page Coder Social logo

rsynth's People

Contributors

mgeier avatar piedoom avatar pieterpenninckx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

rsynth's Issues

SIMD support

Currently, the render_buffer method is generic over the floating-point type.
It's probably problematic to allow for SIMD, so this will probably be changed when we have a more clear understanding of how portable SIMD is going to look like in stable Rust.

Tracking issue for 0.2.0

Version 0.2.0 can make some breaking changes, so this is a list of things I would like to change before version 0.2.0:

  • Remove deprecated things
  • Add support for lv2 (#43)
  • Add support for alsa
  • Remove default implementation for AudioWriter::number_of_channels
  • Offline backend: support multiple midi inputs and outputs.
  • Offline backend: use ContextualEventHandler instead of EventHandler
  • Offline backend: support stopping
  • Remove support for VST 2.4
  • VST: use indexed events (more uniform)
  • Use a different mechanism for audio buffers
  • Make the API around AudioChunk more clean.
  • Decide on the data type for sampling frequencies.
  • Change the CommonMidiPortMeta trait so that no memory allocation is (i.e. do not require to return a String).
  • Make it possible to dynamically choose the name of the plugin application (e.g. if there are multiple instances). I.e.: the method name from CommonPluginMeta should not just return a slice.

Upgrade vst-rs dependency

vst-rs has recieved a new version. Time for an upgrade!

Note: version 0.2.0 of vst-rs fixed some soundness issues that will break rsynth's code. You will need to write some unsafe code for this upgrade. Be warned!

Note: this problem has already been solved for the jack backend, you can have a look at src/backend/jack_backend.rs for inspiration.

JACK CV?

JACK can also support digital CV, would be neat to see support for this in rsynth.

Add time-splitting middleware

It would be nice to have middleware that splits the input buffers and output buffers on timed events, so that the plugins down the chain can always assume that an event happens at the beginning of a buffer. This makes it easier to write plugins with sample-accurate timings.

stop allocating memory

Using vectors like for tracking keys pressed is a bad idea and makes the library inefficient.

Deprecate polyphony and envelopes

In order to clarify the scope of this crate, polyphony should be split off in a separate crate. Envelopes are quite embryonic and can simply be deprecated.

Need more code review

What is obvious for one person is not necessarily obvious for somebody else. So it would be good if pull requests, including mine, would be reviewed. Here by reviewing I mean "going to the diffs to see if there is something suspicious".

If you would like to review pull requests, you can reply to this issue and then I'll make sure to give you some time when there's a pull request that I think needs some review.

Improve voice stealing algorithm

The current voice stealing algorithm is very bare-bones and can definitely be improved.

This issue requires some knowledge on voice stealing algorithms. But frankly, there's enough low-hanging fruit to gain some improvements, even without deep knowledge on voice stealing.

This issue requires some knowledge about voice stealing algorithms.

Tonal example?

Hi! I'm just wrapping my head around writing my first plug-in. I wonder if it would be possible to provide an example that wasn't just noise - perhaps a sine wave synthesizer?

High CPU usage in example

The random function in the example test_synth.rs is causing significant overhead. A better approach would be to create a one-time sample beforehand and play it over in the audiobuffer.

Add the notion of "context"

There are some cases where a plugin may want to borrow (in the sense of Rust's borrowing system) some "context" from middleware higher up the chain:

  • multiple voices in a polyphonic instrument can share some state (e.g. the samples the voices are playing in a sampling instrument)
  • The object that is used to communicate with the host

It would be good to have this.

Middleware mechanism is too complicated

An example is the following piece of code:

#[cfg(feature = "stable")]
impl<Event, E, C, T, GenericEvent, Context> EventHandler<GenericEvent, Context>
    for AfterTouchMiddleware<Event, E, C, T>
where
    GenericEvent: Specialize<Timed<Event>>,
    Event: AfterTouchEvent,
    for<'a> E: Envelope<'a, T, EventType = Timed<u8>>,
    for<'ac, 'cc> C: EventHandler<GenericEvent, EnvelopeContextWrapper<'ac, 'cc, Context, E>>
        + EventHandler<Timed<Event>, EnvelopeContextWrapper<'ac, 'cc, Context, E>>,

See also this tread for a more in depth discussion.

Support stopping `jack` from inside the application

  • Add a trait TryStop to backend/mod.rs with a method stop. This trait is mainly for making it easier to use the same code for different backends. Calling the stop method stops the host, if supported.
  • Add a trait Stop that "inherits" from TryStop This trait indicates that stopping the host is supported.
    *Implement the Stop trait for JackHost by adding a field control of type jack::Control to the JackHost struct, initializing it to Continue and setting it to Quit in the stop method.
  • Adapt the implementation of the process method for JackHost by returning self.control instead of always Control::Continue

docs not auto-updating

with the new crate system, documentation isn't working:

error: manifest path `/home/travis/build/resamplr/rsynth/Cargo.toml` contains no package: The manifest is virtual, and the workspace has no members.

Improve envelopes

Okay, this is a broad issue. rsynth currently has some basic support for envelopes, but I feel like it could be improved. This will probably involve some architectural decisions, so feel free to ask me questions. Also, I don't expect this to be solved with one pull request, so feel free to already open a pull request for a small improvement, even if this would not close this issue.

Working on this issue requires some knowledge about real-time audio processing.

Update example to use the new system for meta-data

The examples in the folder src/examples still implement the meta-data traits "by hand". This can be improved by implementing the Meta trait instead. Showcase how easy it is now to define the meta-data!

Note: the vst-specific meta-data probably still needs to be implemented "by hand" right now.

Add support for file-based and in-memory testing back-ends

It would be nice to be able to create an application that takes a MIDI input and generates a WAV output just by choosing another back-end. It would also be nice to be able to render "in-memory", to be used in integration tests.

We can also provide some test functions that test for common pitfalls:

  • internal state is reset for each audio-buffer (e.g. phase is always zero at the beginning of each subsequent audio buffer)
  • separate voices in a polyphonic instrument each "set" a voice (sample = value instead of sample += value), thus overwriting what other voices are doing
  • each voice in a polyphonic instrument "adds to the mix" correctly (i.e. uses sample += value), but the output is not initialized to 0

License unclarity

The README.md states that rsynth is licensed "under the MIT/BSD-3 License", whereas the Cargo.toml file states "BSD-3-Clause".

@piedoom , which was your intention? Also, is it Ok if I re-lisence it under MIT/Apache V2? Edit: I also would like to add the following to the README: For the application of the MIT license, the examples included in the doc comments are not considered "substantial portions of this Software". Is that ok for you as well?

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.