Juce audio connection kit

i have finished the first step in making jack working with juce. i’ve used the AudioFilterPlugin codebase and added a JackFilterStreamer (ala AudioFilterStreamer) that bypass the internal AudioDevices (alsa) and work in standalone mode as a jack plugin wrapping your AudioFilterBase derived plugin. This way works great for audio only plugins. I need to find a way to plug in the midi system too, but bypassing system AudioDevice i’m unable to attach any midi callback. I’m supposed to write jack support as an AudioDevice (rather than an AudioFilterPluginWrapper) to do that ? or i can do it other ways ? if someone can help me here sure we can release some good stuff for the linux audio community.

here is the AudioFilterDemo plugin in action controlling gain of zynaddsubfx.

Oo, that’s a neat solution! I had a look at implementing jack support myself, but seeing that juce doesn’t make it easy to implement your AudioIODevice subclasses (or at least, doesn’t make it easy to integrate them with the other AudioIODevice subclasses), I left it alone.

Unless I’m mistaken, jack just provides a gui for the alsa sequencer api, so midi input should just work as it would in a normal juce app (try starting a standard juce app with a MidiInput, and you should see an entry for it in the midi patchbay in qjackctl), although obviously MidiOutput won’t work until someone implements it…

I’m not familiar with the juce audio plugin framework though - does it handle midi differently?

  • Niall.

i have not looked in the documentation of juce, how hard could be implement midi with the juce classes provided but i will do soon, also converting the streamer interface into a complete device. last time i’ve looked into linux_Midi.cpp it was only showing empty functions with the unhappy word “implement me”… :wink:

tempting to do it… i’ve done my own Midi output classes for windows, which was really easy, but i’ve not managed to even get juce to compile properly on my linux box yet, which is a big bummy shame. otherwise i’d have a stab at it now.

interesting work kraken! when i get juce+linux partying i’ll have a closer look

See here. I implemented the MidiInput class myself, but didn’t/don’t have any need for MidiOutput, so didn’t bother with that.

  • Niall.

ok i’m trying to get midi output working using alsa_seq. searching for documentation i’ve reached this, that seems to be a good example code for jack<>alsa midi communication (here)… now i really need to make midi output working since i’ve moved completely into linux, thrashed my winzoze installations into the bin, now i feel miles more confortable than before for everything… i only lack a “Sequencer” with capitalized S… jack is incredible, doing interapp audio linkage at os level, now with fst and dssi i’ve managed to make some vst work in linux very smoothly (some ampsims and glitchmuzik effects i’ve got from my old box and can’t throw) but i don’t feel confortable with midi and notation: museseq (what is ‘tempo 100%’ ? ‘%’ of what ?), or seq24 for tracking my music are a pain… a real usable sequencer still need to be written for linux. i’ve looked into wired but i think we (as tuxers) can and should make ‘jacktion’ for linux…

Huh… I didn’t realise jack had it’s own midi api. I wonder why they did that? Alsa already allows for inter-app connections with midi.

Have you looked at Rosegarden? One of my colleagues at uni is a contributor (he’s adding microtonal pitch tracking to it, I think), though I have to admit I’ve never actually used it myself - to be honest it would take something pretty special to drag me away from my current setup with tracktion on Windows.

  • Niall.

juce on linux is far the best running library for applications out there. there is no qt, no gtk, no wx, no tcl/tk, no anything at all. and juce apps here just works smooth and fast as hell.

yes me too, it’s a bit tricky to get jack midi connections (having midi port as well as audio ports) until in juce there is implemented something like AudioDevices but for midi, pluggable and registerable at runtime, not only a single MidiInput and a single MidiOutput.

yes i’ve tried it but i don’t feel confortable with it. and it have lot less midi input/output options than museseq or seq24…

[quote=“NiallM”]to be honest it would take something pretty special to drag me away from my current setup with tracktion on Windows.
[/quote]

yeah, switching out from my windows audio environment was a very hard thing to do. but i admit that i’m very exausted of using windows, doing always the same things with the same setup and tools, tired of seeing always the same applications and options here and there.
i don’t know, maybe when i need to get back to make some wacky weird industrio-noizy track like i was used to, i can turn on my windows machine again… but until that, i want to struggle with linux, and make something useful for audiomakers… 8)

now vkeybd is playing midi that is received by the jucedemo and forwarded to the zynaddsubfx… and midi monitor is catching the generated midi events…

why now jucedemo shows midi output in jack midi connection but not midi input (only selectable by its internal audio component selector) ?

ok i think i got it. still there are some issues (when starting the application
the default midi input is already connected to device at index 0, but if you
try to disconnect it, application crash in the messageDispatchLoop); and
internal timecode syncronization to jack master isn’t already implemented
but i will focus on this soon. apart from these issues that probably can be
solved by more skilled coders (juuuules!), midi i/o and audio i/o in jack is
working seamlessly without any glitch or slowlyness, even running for a long
time… so now will be possible to port generic juce audio plugins to jack audio
without any change to the codebase !

hope there are some linux geek over there that are interested :wink:

That looks like some cool stuff you’ve got going there kraken. I’ll certainly help out, though have never used Jack before, and will need to get some of those other apps installed on my linux setup.

Whenever you’re ready, feel free to throw the code my way and I’ll take a look through.