Giter VIP home page Giter VIP logo

Comments (15)

psobot avatar psobot commented on May 12, 2024 10

Glad to see the interest here! Just to clarify: what kind of MIDI support are people looking for? It seems @MaxGodTier's request is around real-time MIDI, @Muzz is looking for static rendering of MIDI files, etc. This might be a number of different issues in one:

  1. add support for virtual instrument plugins in addition to effects (i.e.: MIDI -> Audio instead of the current Audio -> Audio)
  2. add support for MIDI file I/O and MIDI-to-Audio rendering (maybe via integration with Mido)
  3. add support for sending MIDI messages to effect plugins during effect rendering (i.e.: Audio + MIDI -> Audio)

It'd be good for Pedalboard to support all of these eventually, but I'm curious to know which to prioritize.

from pedalboard.

jorshi avatar jorshi commented on May 12, 2024 5

@psobot - thanks for following up on this!

Use case I would be most interested in would be static midi to audio rendering with VSTi plugins. Iโ€™m interested in ML research with synthesizers, so being able to programmatically adjust parameters and render sounds using simple midi files / objects would be ideal. There are a couple other python options out there that support this, but they arenโ€™t pip installable. Having a pip installable package for VSTi rendering would be amazing!

from pedalboard.

psobot avatar psobot commented on May 12, 2024 3

There isn't yet, but this is something that would be possible to add.

One minor complication: Pedalboard doesn't run in real-time on its own, so communicating with the plugin via MIDI would have to happen via some new API, rather than a virtual MIDI device. JUCE (the C++ library underneath Pedalboard) allows this kind of thing by effectively passing a list of MIDI messages in with every process call - something like:

my_plugin = pedalboard.load_plugin("...")

# Prepare a list of MIDI messages to send to the plugin as the audio is processed, of the format:
#     (time_offset_in_seconds, [midi_byte, midi_byte, ...])
# For example, this sends a single Note On message at a time index of 0 seconds:
midi_messages: List[Tuple[float, List[int]] = [(0.0, midi_note_on(C4, 127))]

output = my_plugin.process(audio, sample_rate=sample_rate, midi_messages=midi_messages)

This could work, but I'm considering if there are more ergonomic APIs that could be used rather than just overloading the process method with additional arguments.

from pedalboard.

GabFitzgerald avatar GabFitzgerald commented on May 12, 2024 2

+1

really interested in virtual instrument plugins supporting MIDI -> Audio

from pedalboard.

MaxGodTier avatar MaxGodTier commented on May 12, 2024 2

It seems @MaxGodTier's request is around real-time MIDI

Actually I find it more convenient to render the results directly (faster) to a file than a real-time solution (slower), I just didn't know that was the easiest solution to implement!
In my case scenario, the VST plugin is adjusting the pitch from an existing audio signal (. wav) to fit the notes being played from a midi track (.mid) like in this video I showed (wav file contains only static noise, mid file is playing music), I'm not sure if that's more like 2 or 3, however I don't require real time (it's actually better if it renders it to a file directly!)

from pedalboard.

olilarkin avatar olilarkin commented on May 12, 2024 2

+1 please support loading instruments :-)

from pedalboard.

Muzz avatar Muzz commented on May 12, 2024 1

Yes to all of the above, though i feel that you should probably prioritize in terms of what functionality matches what is there already.

Offline vst instrument midi rendering is a little served niche so would be a great first stop.

from pedalboard.

kenhepen avatar kenhepen commented on May 12, 2024 1

+1 to all of three above.

I'm interested in sending midi messages to effect plugins in continuous mode. Example: I want to use pitch corrector and I want to send midi notes to it like:
image
and as result I want pitch corrector to work continuously, like it works now when I just pedalboarding whole file with fixed settings. I mean not like cycle (https://github.com/spotify/pedalboard#does-pedalboard-support-changing-a-plugins-parameters-over-time) , because cycle with every iteration will reset parameters of pitch corrector and pitch of vocal will fluctuate.

So somehow whole pedalboard needs to "feel time", bars, frames, milliseconds.

from pedalboard.

JourneyToSilius avatar JourneyToSilius commented on May 12, 2024 1

Same here, I would like to be able to read midi files that I generate and map them to VST synths as to create a full track

from pedalboard.

Muzz avatar Muzz commented on May 12, 2024

Just want to pipe up, and say that midi support would really be helpful here, and really open up the possibilities with this library.

Even just static midi rendering would be great.

from pedalboard.

jorshi avatar jorshi commented on May 12, 2024

+1 !

from pedalboard.

valleyofblackpanther avatar valleyofblackpanther commented on May 12, 2024

Is there any branch in this repo where this issue is being developed? @psobot

from pedalboard.

psobot avatar psobot commented on May 12, 2024

@valleyofblackpanther Somewhat - @robclouth has an open pull request that started to add MIDI message support, but that PR has been abandoned for some time and I don't know of any other efforts to add MIDI support at the moment. Pull requests are welcomed though!

from pedalboard.

valleyofblackpanther avatar valleyofblackpanther commented on May 12, 2024

@psobot do you think this python midi api could be used in the process of building the midi support. I think this api could be used to build the midi messages. But still I think it would be great if you could take a look at it.

from pedalboard.

psobot avatar psobot commented on May 12, 2024

@valleyofblackpanther If we were to build in MIDI support, it'd be great to use Python's duck typing avoid adding an explicit dependency on any specific MIDI library. MIDI messages are just tuples.

from pedalboard.

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.