igorski / MWEngine

Audio engine and DSP library for Android, written in C++ providing low latency performance within a musical context, while providing a Java/Kotlin API. Supports both OpenSL and AAudio.
MIT License
259 stars 45 forks source link

Ableton Link integration with the sequencer #63

Open teotigraphix opened 5 years ago

teotigraphix commented 5 years ago

Hi,

This is really just a question if you have thought about this implementation?

I am going to try it myself but I thought I would get your input first to see if there were any problems you see or even that you haven't thought about it. :) (either way)

Mike

igorski commented 5 years ago

Had not thought about Ableton Link specifically but more towards inter application sharing like Audioroute.

Depending on the protocol in question, it shouldn't be more work to the engine than adding a hook in the same place where DriverAdapter::writeOutput() is called (when you desire to stream audio). If you look to send MIDI events, you could provide a similar hook within sequencer.cpp on the getAudioEvents()-call though you will have to translate buffer offsets to MIDI specific timings (shouldn't actually take a lot of effort as each AudioEvent in MWEngine can return its play offset and duration in seconds, similar to MIDI).

That's however the integration within MWEngine, there is also the other integration of getting it built alongside / within the library and getting the configuration to work (not entirely sure how quickly Ableton Link can be setup for Android, as only Windows / macOS / Linux support is provided out of the box according to their docs.

teotigraphix commented 5 years ago

Thanks for the response.

Audioroute would definitely be a bonus, Android needs something like this to at least get things moving towards a collaborative approach.

I ask about Link because I have 2 apps up right now that are more/less island apps and I get the question all the time if Link is going to be added.

I pretty much have studied most of the source code, so your answer was a great start.

This shows some implementation on Android, albeit a "reach" since it's PD.

https://github.com/libpd/abl_link