Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Controllers? #14

Open
roboraptor opened this issue Aug 25, 2022 · 13 comments
Open

Controllers? #14

roboraptor opened this issue Aug 25, 2022 · 13 comments

Comments

@roboraptor
Copy link

Just a question what can we imagine under this?
Or maybe you already have something in your sleeve again?

I imagine something like LEDFx interface to turn on ad off outputs 👀
That would be ✨ Awesome ✨

@CaiB
Copy link
Owner

CaiB commented Aug 25, 2022

Hi,
I’m loving your enthusiasm for CC.NET :)
Could you explain what you mean by LEDFx interface? I’m not familiar with how that works.
Controllers are sadly still in the planning phase, I have ideas for what I want to implement, but nothing done yet. I’d be open to hearing your suggestions though!

@roboraptor
Copy link
Author

Sir, please, look at this 👀
https://github.com/LedFx/LedFx

And would love to see you two collaborate. ❤️
No offense but being able to switch effects on and off is priceless.

@roboraptor
Copy link
Author

Here is a Dashboard view
obrazek

There is no need to be that fancy for a first controller, but I can imagine having possibility to at least enable or disable outputs.
I can see something like this?
obrazek

@CaiB
Copy link
Owner

CaiB commented Aug 26, 2022

I can definitely understand only wanting output at certain times. Watching a YouTube video with voiceover while having CC.NET running is not pleasant.

It sounds to me like you want a UI on the computer to control CC.NET while it's running. This is definitely something I already had in mind for the controller system, but it probably won't be a fancy UI like that anytime soon 😅

For controllers, I was effectively thinking that it could work on a plugin-like system where you install what you want (by just downloading a DLL and putting it in a defined folder), and controllers can take inputs from whatever source they are designed for, and control any aspect of any part of the running CC.NET instance.

Some of the controllers I had ideas for:

  • Keyboard shortcut
  • Tray icon
  • UDP packet receiver
    etc.

I think this would cover the functionality you are looking for. Any thoughts?

@roboraptor
Copy link
Author

roboraptor commented Aug 26, 2022

The best thing would be to have UI over webpage like LEDFx so Sound producer can run the software with Listeners but there can be second person accesing it and controlling it over LAN.

Totally don't need to be anything fancy! 😉 Name of output with on/off button is just enough! everything else can be set up just like it is now.

Keyboard shortcuts are already covered with fullscreen and such ❤️
Tray icon is a fancy way to know if program crashed. ✨
UDP packet receiver with a little WebServer is maybe what I am talking about. 👍

@roboraptor
Copy link
Author

I was thinking about it again,,, 🤔

I'm still on 🔝 with the UDP packet receiver thingy for at least enabling and disabling outputs.
I can write a little html file by myself and just clicking links is enough.

But you can probably elaborate about the shortcuts, it got me interested.

@roboraptor
Copy link
Author

I see something coming in the autobuilds 👀

@roboraptor
Copy link
Author

You are really getting into it 👀

@CaiB
Copy link
Owner

CaiB commented Sep 13, 2022

I have put together a proof-of-concept extension system and controller. If you'd like to give it a try, do the following:

  • Download the newest autobuild (184+): Make sure to download both CC.NET and the Extensions ZIP files
  • Extract CC.NET as usual, and run once to generate the Extensions folder
  • Extract the CC.NET-Ext-WindowsController.dll file into the newly created Extensions folder where CC.NET is
  • Edit your config by replacing the Controllers section at the bottom with this:
    "Controllers":
    [
        {
            "Type": "#ColorChord.NET.Extensions.WindowsController.KeyboardShortcut",
            "Name": "KeyboardTest",
            "Shortcuts":
            [
                {
                    "Target": "Outputs.TestingPackets.Enable",
                    "KeyCombo": "CTRL + ALT + C",
                    "Name": "My Toggle"
                }
            ]
        }
    ]
  • Edit the "Target": "Outputs.TestingPackets.Enable" line to match your PacketUDP instance name (mine is called "TestingPackets" but yours may have a different name)
  • Make sure to remove any DisplayOpenGL modes for now, as there's a bug that won't allow controllers to exist at the same time (will fix this soon, it's a bit more work)
  • Run CC.NET, and press CTRL+ALT+C from anywhere in the system (even when CC.NET is not the active window)
  • Your packets should stop/start being output each time you use the shortcut

Right now it just works on boolean settings (on/off) against PacketUDP, and obviously all of this still needs to get documented, but I thought you might want to give it a try early :)

The idea of the extensions system is that it will allow anyone to easily develop extensions for ColorChord.NET and offer them for download and easy installation (just drop the DLL into the Extensions folder) without me needing to do anything.

@roboraptor
Copy link
Author

As a proof of concept it looks like working!
I will try more when I have my lights next to me.

@CaiB
Copy link
Owner

CaiB commented Sep 18, 2022

As of autobuild 188, controllers should now work even if a DisplayOpenGL is also running.

@CaiB
Copy link
Owner

CaiB commented Sep 21, 2022

I've been thinking about this a bit more, and have come up with a plan for what I want to do with CC.NET in this regard.

As it stands, the config files, while very capable, are understandably a bit difficult to get accustomed to as a new user. I don't intend to move away from the current format, as I think it works very well, but I would like to work on making a system that allows you to add/remove/manipulate CC.NET components in real time via an easy to use GUI. Then the resulting configuration can be saved into a JSON file for use from then on, using the current config format.

However, I don't see myself making any kind of web-based configuration tool. Adding a webserver is a significant amount of additional complexity and opens the gate for a lot of new problems. I also just don't really like working with web stuff, so I wouldn't really enjoy doing something like that, and therefore it doesn't really make sense in the context of my fun personal project. That said, with the new extensions and controllers system, it will be possible, and I'd be open to someone else taking on this task and shipping it as an installable extension for CC.NET.

If someone reading wants to work on this, or any other kind of extension, I'd absolutely be willing to help you out with the CC.NET interfacing in your project (assuming you're reasonably comfortable with .NET development already). I also plan to write some documentation explaining how extensions are intended to be implemented.

@roboraptor
Copy link
Author

roboraptor commented Sep 21, 2022

the config files

I wouldnt say, they are difficult. Ony thing I miss is all the defaoult values. I need to go to documentation and copypaste them one by one manually. But that is all that bothered me with config file.
If the system is here to function as a real-time controller for running CC.NET - Thats what I am looking for. ❤️

web-based configuration tool.

I think the UDP receiver is more than enoug for anybody to connect with already working webservers?
It just need to be open for functions. (As we tried turning off the output packets)

work on this, or any other kind of extension

Sadly, I am not really a .NET guy, that would be a long run for me.

I Really appreciate all the time you spent in this project. ❤️
I hope it is still fun for you as it is for me. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants