ReadMeFirst.doc - Wiki

weaverchurchSoftware and s/w Development

Aug 15, 2012 (5 years and 1 month ago)

229 views

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
dios

o

View


Synthesisers, MIDI + Audio Ports

o

Select the appropriate MIDI output port



To compose a new song: View


Composer



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
organ


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
working.



Download and Open NetBeans IDE



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



File


Open File


beer
Midi



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


empty java file

o

Into this new java file, copy the entire contents of beerMidi.java



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



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



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?”

o

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

o

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
MIDI fi
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:

o

Songcompatible



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

o

SongRange



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

o

SongTuning



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
note.


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
ny
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
ft
-
most
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.


Note:

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.