https://github.com/ern0/lightorgan-batucada
💡 Arduino controlled 8-relay light organ plays a batacuda
https://github.com/ern0/lightorgan-batucada
arduino diy educational electronics hardware lightorgan music pet-project
Last synced: 9 months ago
JSON representation
💡 Arduino controlled 8-relay light organ plays a batacuda
- Host: GitHub
- URL: https://github.com/ern0/lightorgan-batucada
- Owner: ern0
- License: gpl-3.0
- Created: 2016-05-16T16:21:28.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2024-02-02T10:04:25.000Z (almost 2 years ago)
- Last Synced: 2024-02-03T10:57:03.977Z (almost 2 years ago)
- Topics: arduino, diy, educational, electronics, hardware, lightorgan, music, pet-project
- Language: HTML
- Homepage:
- Size: 3.91 MB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# lightorgan-batucada
Arduino controlled 8-relay light organ plays a batucada.
Prepared for ''ToneAThon'' 2016,
internal music competition at Ericsson.
(I will link the video as it will be available.)
## Why Batucada? ##
There is no long list of genres,
which can be played on 8 relays.
March is too square for an already square platform.
Bolero is better, but it is difficult to
implement monoton increasing volume with
8 channels of same rhythm instruments.
Finally, I voted on Batucada, because there are some
dynamic patterns, which are interesging enough to
fill a cca. 3 minutes song: crescendo,
solo teheme echoed by the choir,
and tempo increase.
## Technical background ##
### Hardware ###
Arduino Nano controls a relay module,
which are switching 8 LED lamps:
red, green, blue, white, red, green, blue, white.
That's all, nothing special here.
### Software ###
The requirement is a program, which plays a song when the
device is turned on.
So, the player use no interrupts,
only `digitalWrite()` and `delay()`
instructions.
It eats up some extra clock cycle, especially with the wrappers,
but please, no one will hear this delay,
it's a 16 MHz processor,
at least 16x as fast as a Commodore 16.
The `m()` (m for macro) macro sets the values of `v1`..`v8`,
then several `v()` (v for value) function call plays a
8-column pattern with these values.
The series of `v()` calls are generated from
OpenOffice/LibreOffice spreadsheet HTML export.
Writing patterns in text editor was uncomfortable,
that's why I choose spreadsheet, it's
the best pattern editor.
The `v()` function can switch a relay,
or make a quick double-switch.
There are two cases which must be solved:
set the initial state of lamps before a pattern
(see `mut()` and `lit()` functions),
and set (usually turn off) a lamp in a certain
position of the pattern, without using a separate column for it.
These tricks are needed because odd number of switch
leaves the lamp in the opposite state.
Probably, it's not the best method for songwriting,
I almost ran out of 8 columns, but it was
easy to implement and required no separate
editor or even a real player.
I have no further plans with it.
## License ##
Fork it, tweak it, enjoy.