webdev23 / phpCorsair

Controls Corsair RGB keyboards with php and the web audio api
https://webdev23.github.io/phpCorsair/
Apache License 2.0
1 stars 1 forks source link
audio ckb ckb-daemon corsair corsair-devices curl keyboard php php7 rainbow rgb webaudio-api

phpCorsair!
Spectral audio based events for corsair RGB devices.

Controls Corsair devices running under the ckb-daemon with php

Deploy and run:
git init && git pull https://github.com/webdev23/phpCorsair.git && chromium-browser --app=http://localhost:9040/phpcorsair! | php -S localhost:9040
Dependencies:

php7.0 curl

sudo apt install php7.0 && sudo apt install curl

To serve daemon.php from the folder:

php -S localhost:9040

Or as a daemon:

nohup chromium-browser --app=http://localhost:9040/phpcorsair! | nohup php -S localhost:9040 &

You may want to close the terminal and keep the program running, with screen:

sudo apt install screen

screen chromium-browser --app=http://localhost:9040/phpcorsair!

To run from the folder if the daemon is listening open the file with chromium browser, or with this command line:.

chromium-browser --app=http://localhost:9040/phpcorsair!

Rainbow only via the terminal:

php <(curl -s https://raw.githubusercontent.com/webdev23/phpCorsair/master/rainbow)

or just:

./rainbow

All files should stays on the same folder, as they are going to talk to each others. This should be all.

Here is a youtube video of the beginning of this project, showing some features: https://www.youtube.com/watch?v=H7mKN2PASGM

Enjoy!