Code Monkey home page Code Monkey logo

artnet-emu's Introduction

ArtNet Emu

An Art-Net listener for controlling Winamp, VLC media player and iTunes for Windows Support for iTunes is in the code, but not part of the build. You can uncomment the commented lines in Model/Players/ITunesMediaPlayer.cs to add support for iTunes.

Art-Net on Wikipedia

Art-Net is a royalty-free communications protocol for transmitting the DMX512-A lighting control protocol and Remote Device management (RDM) protocol over the User Datagram Protocol (UDP) of the Internet Protocol suite.

Lighting controller

This application makes Winamp, VLC or iTunes into a controllable "lighting" fixture, from within your lighting console.

To be able to send commands through the lighting controller, you must setup a fixture for your controller.

The fixtures uses 5 channel.

Fixture setup

Channel Name Description
1 Volume Audio output volume
2 Group Group index
3 File File index
4 Mode Which action to perform
5 Control Makes the action execute
Volume (channel 1)
0 - 255: Volume ranging from muted to 100% volume.
Group (channel 2)
0 - 255: Group index for playing specific files.
File (channel 3)
0 - 255: File index for playing specific files.
Mode (channel 4)
See table below
Control (channel 5)
See table below

Mode ranges

From To Mode
0 25 Ignore
26 50 Play file
51 75 Play file and stop
76 100 Stop
101 125 Pause
126 150 Resume
151 175 Next
176 200 Previous
201 255 Reserved

Note about Play file

When executing in Play file mode, playback is only started if the file is found with group index and file index.

Note about Play file and stop

Only Winamp supports stopping playback after the files has played - other players will treat this command as Play file.

Control ranges

From To Control
0 245 Ignore
246 255 Execute

Controlling the media player

Group and file are only used in mode Play file and Play file and stop.

Volume changes are always sent to the media player, regardless of other channel values.

Mode changes are only sent, with a value of Execute on the Control parameter.

If you need to play the same file twice, you can change Control to Ignore and then back to Execute. Or you can change Mode to Ignore and then back to Play file.

A note on Play file and stop

This is supported on Winamp only, and done by setting Manual playlist advance to on. The application will switch this setting on and off depending no which mode you choose.

Play file will set Manual playlist advance to off.

Play file and stop will set Manual playlist advance to on.

To manually change this setting in Winamp, go to Preferences -> General Preferences -> Playlist and find the checkbox under Advanced Playback Settings that says Manual playlist advance.

Setting up VLC

The application can control Winamp and iTunes on local machines with no additional setup required.

VLC is controlled over http, and you need to activate this in the settings for VLC.

From the main menu choose: Tools -> Preferences.

In the bottom left corner of the Preferences window where it says Show settings, choose All.

Select Interface -> Main interfaces and check Web.

Select Interface -> Main interfaces -> Lua. Type in a password under Lua HTTP -> Password. Save and restart VLC.

When setting up a VLC Remote configuration, the filepath must be in the form of a File URI, for the remote filesystem.

File control

A media player can be controlled to play individual files, on specific lighting queues.

The files are divided into a maximum of 256 groups, and each group can contain a maximum of 256 files. A maximum total of 65536 individual files.

Files can be given a group and file index by three different methods.

Setting up group and file indexes for files

Filelist

The file list locater are for large projects.

It searches for folder names that contain a number between 0-255, and has a filelist.txt in it.

The filelist.txt contains a list of the files you want to index, with the first line starting at index 0 (zero).

C:\Music
├── 006 Beats
│   ├── deadbeat.wav
│   ├── drop.mp3
│   └── filelist.txt
│
├── Effects 10 for show
│   ├── filelist.txt
│   └── wow.mp3
│
├── Extras 200
│   ├── filelist.txt
│   ├── movie1.mp4
│   └── movie2.avi
│
└── Not found 20
    └── audio.mp3

This will locate the three groups 6, 10 and 200 but not 20 - because of the missing filelist.txt in the Not found 20 folder.

Example of contents of C:\Music\006 Beats\filelist.txt

drop.mp3
deatbeat.wav
missing.mp3

The three files will be index according to line number, starting from zero.

drop.mp3 is indexed with group 6 and file 0.

deatbeat.wav is indexed with group 6 and file 1.

missing.mp3 is indexed with group 6 and file 2, but will show up as a missing file.

Filelists are not supported on VLC Remote player.

Filestructure

Filestructure gets the group index from the foldername, and the fileindex, from the filename.

C:\Music
├── 006 Beats
│   ├── deadbeat 05.wav
│   └── drop 3.mp3
│
├── Effects 10 for show
│   └── 1 wow.mp3
│
├── Extras 200
│   ├── movie1.mp4
│   └── movie2.mp4
│
└── Not found 20
	└── audio.mp3

This will load the following files:

Group 6

3: drop 3.mp3

5: deadbeat 05.wav

Group 10

1: 1 wow.mp3

Group 200

1: movie1.mp4

2: movie2.mp4

Group 20 will not load, because there's no number in audio (extension is not used as file-index).

Regex

If you know about Regex and how to make them, feel free to make your own. The locator for Filestructure is just a preformatted Regex.

Group-index must be first group in the match, and file-index must be seconds group in the match.

Make sure you keep numbers between 0-255, as wrong matches will result in errors.

Taking care of duplicate group/file indexes and missing files

Please notice that the application does not warn about missing files or overlapping group/file indexes. To avoid mistakes in your filelist/file naming, please check your imported files by rightclicking on a configuration, and choose View filelist, View duplicates or View missing. This is also a good indicator for checking the correct fileencoding for your filelist.txt, when working with filelists and international characters.

Common setups

VLC on local machine, using file structure

  1. First setup VLC to allow external control.

  2. Create at folder for your show music.

  3. Add sub folders with the group number in the folder name. The group number can be anywhere in the folder name, not just the end.

Folder structure example. Show music contains Intro 001, Lions 003, Sea monster 004, Speaks DE 202, Speaks FR 201, Speaks UK 200 and Tigers 002

  1. Add files into the folders with the file number in the file name.

File structure example.

  1. Add a media player in ArtNet Emu.

Right click. Add media player. VLC Local

  1. Setup the configuration for VLC. Be sure to select Filestructure under File scanning method. Point your Folderpath to the created top folder. Type in the password for VLC, and press OK.

VLC Config window

  1. View the file list, to see if Artnet Emu found your files. Be sure to check for duplicates.

Right click configuration

File list in ArtNet Emu

Connect you lighting console to Artnet Emu by pressing Start listener, and set the following channels to these values:

Channel 1 (Volume)
100%
Channel 2 (Group)
1
Channel 3 (File)
1
Channel 4 (Mode)
38 (Play)
Channel 5 (Control)
255 (Execute)

The first file in the first group should play.

VLC on local machine, using playlist

  1. First setup VLC to allow external control.

  2. Add a media player in ArtNet Emu.

Right click. Add media player. VLC Local

  1. Setup the configuration for VLC. Point your Folderpath to an empty folder. Type in the password for VLC, and press OK.

VLC Config window

  1. Open VLC and add files to the playlist.

VLC Playlist

Connect you lighting console to Artnet Emu by pressing Start listener, and set the following channels to these values:

Channel 1 (Volume)
100%
Channel 2 (Group)
0
Channel 3 (File)
0
Channel 4 (Mode)
163 (Next)
Channel 5 (Control)
255 (Execute)

The first file in the playlist should play.

You can navigate the playlist using these commands
Stop
Pause
Resume
Next
Previous

artnet-emu's People

Contributors

dependabot[bot] avatar hermandsen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

andreanilorenzo

artnet-emu's Issues

fade in/out control for visuals

I need a fade in/out control to smoothly fade any visuals in VLC.

It should be possible to adjust all video effect parameters (VLC->Tools-> Effects and Filters) remotely, espacially brightness and contrast.

I researched also for a way to control that via the VLC remote interface (lua http), but couldn't find that at the moment...

image

Port blocked by another instance

I'm suddenly getting a strange message when starting Artnet Emu:

Artnet Emu v1.2.2.0
Another instance is blocking the port.
the program might be running in the Background.

ironically I did not change anything in the setup. it was working fine last Sunday.
And this is the second PC where this pops up after a while.

I have both Artnet Emu and VLC in the Autostart group under windows 10

Any idea, what could be the cause here?

thanks
RalpH

Exception at path with inacessible folder(s)

If you choose a base folder for the media files with an inacessible folder ("access denied") inside, you will get an exception, as soon as you right click at the application entry and select "view files"

image

Crash by starting the Listener

I run an ArtNet with 1.0.0.42 as the sender's ip from a Win10 computer's secondary Ethernet extensioncard. The primary Ethernet Output shouldn't matter in this network.
However the Win10 Computer I want to address in this net runs at 1.0.0.43 statically. And the problem is: when I start the Listener of Artnet-Emu on the .43 PC, the status-box wents green, then black and then green again for a short time, because after this single blink Artnet-emu crashes without any Exception thrown.
I've tried sending DMX (in Universe 3) while starting, different IP's for the sender and I even removed registered players from Artnet-emu, but this error keeps occuring.

Artnet-emu sounds like a great and powerful tool, and I'm really thankful for the person developing this, but as I just described it didn't work in my setup. If I should provide any further information I will.

Autostart

Hi,

First of all Great project!!!!! Exactly what I need!
THANK YOU!!!

I'm using it on a small PC to Show content on VLC triggered from my lighting console.

However I have 2 questions:
Is there a way to get the app startet in listening mode automatically?
The plan is not to have a keyboard or mouse attached to the PC, and have it start VLC and EMU when powered on.
But currently you need to press start Listener once. Any way this could be autostartend? Maybe with an argument from the Console?

the second problem is not really related to EMU, but maybe you have a hint for me.
After finishing a clip VLC quits the Fullscreen mode revealing the Windows behind ist. I there any way to keep it in Fullscreen or maybe go to blank screen?

regards
Ralph

Is it able to include Live Video?

Hey Jasper,

Less an issue, more an idea or suggestion:

I'm using th Emu successfully to trigger videos on a remote PC running VLC.
Now I'm wondering, if it would be possible to activate the live video feed from a camera attached to that VLC PC?
Maybe with an additional command on channel 4?

Let me know if that's possible, or if this idea is way off.

RalpH

How to install?

There is no installer in the source files... how to install?
Couldn't find anything in the readme file.

Thank you!

NullReferenceException

After running Setup and trying to add a media player I get the following exception. I get this independently on two 64bit windows7 computers while a friend doesn't. Any clue as to why and how to rectify this would be awesome. Thanks :)

`See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
at ArtnetEmu.ConfigForm.GetConfigurationConfig
at ArtnetEmu.MainWindow.ShowConfigFormForm,Configuration
at ArtnetEmu.MainWindow.menuVLCLocal_Click(Object sender, EventArgs e)
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

************** Loaded Assemblies **************
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.7.3260.0 built by: NET472REL1LAST_C
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll

Artnet Emu
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Users/Alex%20del%20Bondio/AppData/Local/Apps/2.0/JP4NQOOM.72G/Q6M50276.0TE/artn..tion_0000000000000000_0001.0000_335bd7eab6499e54/Artnet%20Emu.exe

System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.7.3221.0 built by: NET472REL1LAST_C
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll

System
Assembly Version: 4.0.0.0
Win32 Version: 4.7.3221.0 built by: NET472REL1LAST_C
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll

System.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.7.3221.0 built by: NET472REL1LAST_C
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll

System.Configuration
Assembly Version: 4.0.0.0
Win32 Version: 4.7.3062.0 built by: NET472REL1
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll

System.Core
Assembly Version: 4.0.0.0
Win32 Version: 4.7.3221.0 built by: NET472REL1LAST_C
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll

System.Xml
Assembly Version: 4.0.0.0
Win32 Version: 4.7.3221.0 built by: NET472REL1LAST_C
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll

System.Deployment
Assembly Version: 4.0.0.0
Win32 Version: 4.7.3221.0 built by: NET472REL1LAST_C
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Deployment/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Deployment.dll

Microsoft.GeneratedCode
Assembly Version: 1.0.0.0
Win32 Version: 4.7.3221.0 built by: NET472REL1LAST_C
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

`

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.