midimonster icon indicating copy to clipboard operation
midimonster copied to clipboard

Support for sACN

Open sammysmallman opened this issue 8 years ago • 12 comments

Would it be possible that this could support Streaming ACN - E1.31?

sammysmallman avatar Feb 20 '18 15:02 sammysmallman

Yes, definitely! An sACN backend would probably share a lot of architecture with the existing ArtNet backend, so it might not even be that hard!

If you'd like to try your hand at it:

  • I found a protocol spec document for sACN/ANSI E1.31-2016
  • The backend lifecycle is documented in the big comment block in midimonster.h
  • The ArtNet backend as well as (in parts) the OSC backend could probably serve as examples for implementing it

To start a new backend, you'd have to

  • Create the files backend-name.h and backend-name.c
  • Add the new backend to line 2 of the makefile for it to be built
  • Implement int init() in the new backend

This would give you a basic backend entry point, from which you can register the backend with the core using the mm_backend_register function. This function takes a structure as argument which contains pointers to the other functionality provided by a backend.

I'm currently busy with exam preparation until Thursday, but after that I might be able to sneak in some hours of implementing this :)

Thanks for the suggestion!

cbdevnet avatar Feb 20 '18 15:02 cbdevnet

I'm also very interested in this. Might poke at it over the weekend.

mnemonicly avatar Feb 24 '18 01:02 mnemonicly

Do you know of any Open-Source sACN producers/consumers to test an implementation against?

The only platform supporting this in production which is available to me would be the GrandMA2 series (and that'll have to wait a few days), though I'd quite like to have my ArtNet Visualizer martrix support sACN, too, so that could be a self-fulfilling prophecy :D

cbdevnet avatar Feb 24 '18 03:02 cbdevnet

The only open source one I'm aware of is OLA. I've not played enough with it to ever make it work though. https://github.com/OpenLightingProject/ola/tree/master/libs/acn

mnemonicly avatar Feb 24 '18 03:02 mnemonicly

Just remembered that the MAdot2 series grant one Universe without having MA hardware connected, and the OnPC seems to support sACN, too (at least according to their docs) - might try with that.

Edit: Hm, according to their docs you need hardware, though I distinctly remember from somewhere that it does do one Universe without.

cbdevnet avatar Feb 24 '18 04:02 cbdevnet

Test with sACN Viewer: http://docsteer.github.io/sacnview/

Sent from my iPhone

On 24 Feb 2018, at 04:15, cbdev [email protected] wrote:

Just remembered that the MAdot2 series grant one Universe without having MA hardware connected, and the OnPC seems to support sACN, too (at least according to their docs) - might try with that

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

sammysmallman avatar Feb 24 '18 15:02 sammysmallman

I just pushed a partial sACN backend implementation, currently only supporting input via sACN. The mapping syntax is the same as the ArtNet backend, documentation will be updated when output is implemented.

Tests with sACNView seem to work :)

cbdevnet avatar Feb 25 '18 20:02 cbdevnet

I'll give this a try with eos tomorrow, my current project would be much better off with sACN instead of artnet.

mnemonicly avatar Feb 26 '18 01:02 mnemonicly

Output support is now implemented, still missing are

  • Keepalive frames (same as the ArtNet backend, and will probably fix it for both then)
  • Universe discovery
  • Documentation
  • A way to designate an instance as output-only

Limitations:

  • Blackout flag is ignored
  • No universe synchronization
  • The default kernel limit for multicast groups is 20
    • This can be changed by modifying the kernel parameter or circumvented by not having all instances join their universe's multicast group

cbdevnet avatar Feb 27 '18 18:02 cbdevnet

Thanks for this. I gave sACN support a try today and it seemed to work fairly well out of the box. I noticed that it used universe where artnet used uni, which was not immediately clear in the configs (or maybe you've updated artnet as well).

I did notice more glitches/dropped messages today than I did when testing with artnet last week. I have not dug into the details enough to see if it's midimonster dropping messages or if its something else in my network thats changed, just an observation.

mnemonicly avatar Feb 28 '18 00:02 mnemonicly

Everything except keep-alive frames is now implemented, marking this backend as complete for now.

Keep-alive frames are on the TODO list.

cbdevnet avatar Mar 01 '18 16:03 cbdevnet

With be5df1c4e639ca6a7cd70a3122039a1de4588e28, keepalive frames are implemented

cbdevnet avatar Mar 02 '18 02:03 cbdevnet