项目介绍

rossmckelvie/midi-lights 是一个托管在 GitHub 上的开源项目,主要使用 Python 编写,目前获得 14 个 Star、2 次 Fork。

仓库全名
rossmckelvie/midi-lights
Star 数
14
Fork 数
2

README 摘要

midi-lights Choreographed Christmas Lights Controller for the Raspberry Pi Powered by MIDI MIDI files can be used to choreograph Christmas lights to music! midi-lights runs on a Raspberry Pi and the same hardware setup that works with LightShow Pi: a relay that toggles the power to 8 outlets. GPIO pins 0-7 are mapped to channels 1-8 of the relay. A MIDI file contains a list of messages, each with a note, note status…

完整内容见 GitHub 原始 README 或本页 。

常见问题

midi-lights 用什么语言开发?

主要使用 Python 编写,目前有 14 个 Star。

如何获取 midi-lights 的源码?

可以直接克隆仓库:git clone https://github.com/rossmckelvie/midi-lights.git,默认分支为 master;安装与运行步骤见仓库 README。

midi-lights 最近还在维护吗?

仓库最近一次更新为 2018年11月27日,当前没有未关闭的 Issue;Star 数为 14,可作为社区活跃度的参考。

关于

GitHub 原始描述(英文)

Choreographed Christmas Lights Controller for the Raspberry Pi

描述取自 GitHub 官方 API,保持仓库作者书写的原文。

简要分析

热度分
19
价值分
9
活跃状态
归档

语言占比

HTML
JavaScript
Python
Shell
Vue

贡献者

README

midi-lights

Choreographed Christmas Lights Controller for the Raspberry Pi

Powered by MIDI

MIDI files can be used to choreograph Christmas lights to music! midi-lights runs on a Raspberry Pi and the same hardware setup that works with LightShow Pi: a relay that toggles the power to 8 outlets. GPIO pins 0-7 are mapped to channels 1-8 of the relay.

A MIDI file contains a list of messages, each with a note, note status (on or off), and a time to wait before changing the status. A mapping of notes to lights allows the entire show to be choreographed with a keyboard.

If you don’t like MIDI, the cached command list from a midi file is stored as JSON. This file is what is sent to the remotes, and the midi file is not required for playing (only for running choreograph.py)

Usage

Create a config.json file, a sample is provided. Modify to fit your setup. Install packages from src/requirements.txt

Choreograph a song

./bin/choreograph wizards or python src/choreograph.py --song=wizards

This generates the JSON command files

Launch a node & wait for instructions

./bin/nodeup upstairs or python src/hardware_server.py --node=upstairs

Note: you will have to launch a master node server. The play process below will make a request to localhost to kick off the song

Play a choreographed song

./bin/play wizards or python src/play.py --song=wizards

MIDI Note-to-Channel mappings are defined in config.json

Turn all lights on or off

./bin/hardware on or python src/hardware.py --toggle off

评论

暂无评论