ReadMeFirst.doc - Wiki

weaverchurchΛογισμικό & κατασκευή λογ/κού

15 Αυγ 2012 (πριν από 8 χρόνια και 11 μήνες)

351 εμφανίσεις

Playing any

MIDI song on the beer bottle organ:

Get/make a MIDI File:

Download (free version) of Anvil Studio (see wiki link) and install the program

Plug in the USB MIDI cable

Plug the MIDI OUT cable into the input on the Beer Bottle Organ

Open Anvil Stu



Synthesisers, MIDI + Audio Ports


Select the appropriate MIDI output port

To compose a new song: View


Enter the notes you want on the staff by clicking. When you’re done with your composition,
go file

Export MIDI file.

Alternatively, do
wnload any song from the internet in MIDI format to use on the beer bottle

Making Your MIDI Compatible with the organ:

Install the latest version of java SDK on your computer (see wiki link)

The program does not have any form of GUI (interface) yet,

so it’s easier to interact with it
through some kind of IDE. I used NetBeans, and if you choose to the steps below should get it

Download and Open NetBeans IDE

Create a new Project. Call it “BeerMIDI”, careful with capitals


Open File


In “Source Packages”, right
click ‘beermidi’ and choose new

empty java file


Into this new java file, copy the entire contents of

Replace the contents of “” with my (download from wiki)

The program will still not compi
le, as all references to jMusic objects/methods will be

Need to add jMusic classpath (see wiki link under jMusic)

The program should now (fingers crossed) compile and run... hit the big green “play” button
to find out.

A window will appear pr
ompting the user to select a MIDI file.

You’ll now be prompted with “
Which track num
ber would you like to tune for?”


Scroll up the dialogue window if necessary to see “
Number of tracks =


Each track represents a different MIDI instrument in the song.
Enter a track number
and hit enter. (NOTE: If a track says is has for example 4 tracks, in some cases there
are only three (1
3) tracks that can be tuned for).

You’ll be given some information about the track and what’s been done to it, and 3 new
les have been created.

To find these files, navigate to the folder where your NetBeans project is.

If your original MIDI file was called “Song”, you’ll now see:



This is the file that will be sent to the arduino to control the valves on the
eer bottle organ in real time. To listen to as a MIDI file, it won’t make any
sense (except rhythmically).



This is how the song should sound when played by the beer bottle organ,
and is here for comparison’s sake.



Contains all the not
es the bottles need to be tuned to, to play the song.

Notes are in ascending order and play for one second each.

Lowest note is for the left
most bottle, moves across to the right with each

Playing the Song:

Back in Avil studio, go to file

Open son
g and navigate to the “Compatible” MIDI file created
earlier. This MIDI file will sound like nonsense through your computer speakers, that’s ok.

Due to some unknown glitch, the song won’t work with the organ until you go cntrl+A to
select everything, copy
it, open a new song and paste it there.

Hit play, and you should see the red LEDs flashing in time to your song, as well as the valves
opening and closing.

Tune The Bottles:

At this stage, the beer bottles need to be tuned manually. You can do this using a
microphone/guitar tuner combination. And pouring water into/emptying it out of the bottles until
each note is attained.

Open the “Tuning” version of your song in Anvil.

Read musical notes required and tune the bottles accordingly. Lowest note goes to el
bottle, and they move across to the right.

Play the song again, and this time it should sound the same as your “Range” MIDI file.


I made substantial progress towards a version of this program that is capable of creating MIDI files
that are p
olyphonic (play more than one note at a time). The code for this is also available on the
wiki page and can be compiled similarly.