There is no standard user interface to a synthesizer, yet there is a great synthesizer in the cheapest kids toy. Goal is to develop an open source, standardized user interface to a synthesizer.
Synthesizer interfaces typically have limited selection or a knob for every possibility. Neither engage kids. Parents end up throwing away any kids toy that generates sounds.
Drums seem to be the starting point of making synthesizer. And the most attractive drum interface seems to be the beat bearing [video]. Electronic music and DIY festivals exist at which this synthesizer could be demonstrated.
The original block diagram had the FPGA attached to the flatscreen monitor through a VGA output. However, it was decided that having a computer connect to the monitor would be easier. The current diagram has arrows depicting the flow of information through the system.
Electronics
We used an open-source software that allows people to design prototypes on the computer called fritzing in order to create a more detailed and accurate block diagram.
The way the program works is by dragging and dropping parts from the parts bin onto the screen and connect them.
Our first attempt at using fritzing did not depict an accurate diagram of the system. The reason is because fritzing does not have the Papilio Platform Papilio One (an FPGA platform) or the Papilio Platform LogicStart Metawing V1.2 in their database.
Papilio Platform Papilio One
Papilio Platform LogicStart Metawing V1.2
FPGA stands for Field Programmable Gate Array. FPGA is a circuit designed to be programmed by a customer or designer after it has been manufactured. A papilio uses FPGA in order to become a digital circuit.
We learned it is possible to create your own fritzing parts and add them to the program. According to fritzing, a file is made up of a metadata file, and up to four SVG files. There are also multiple image files since there are multiple ways to view an image in fritzing (breadboard, schematic, and pcb). Fritzing uses specific font and templates for their parts which are available for download here. In addition, since there are so many files associated with making one part, many of the websites gave instructions on how to name/organize files to make it easier to find them.
Once all of the files are ready, they are uploaded into fritzing and there it can be determined where the pins and connections should be placed.
As the project moved forward, we decided to put the Fritzing aspect of the project on hold. However, the research we have done is a good starting point which can be used in the future.
User Interface
First Design
The MIDI shield has three buttons and two analog knobs, and the Papilio Platform has a joystick and eight switches. Each will have a different function. The required functions are listed below:
Buttons
Select/Reset: push briefly to start sequence, hold to clear
Memorize: save current setup to layer new sounds
Instrument Select: cycles through available instruments
Knobs
Volume control
Tempo control
Pitch control
Papilio switch to toggle functions
Switches
Individual rows - edit on/off
Toggle Knob functions
Toggle instrument type for Instrument Select
Joystick
Measure select
Loop select
Creating a music sequence:
Press Select
Press Instrument Select to choose instruments for each row
Place marbles
Press Select to run/test sequence
Press Memorize to save sequence
Rearrange marbles and choose new instruments
Press Select to run/test new layer
Press Memorize to add loop to sequence
Save Options:
Separate program on PC to save/load songs
Songs play independent of Processing
Microphone Input & Looping
Looping is becoming a part of performance. This video shows a looping machine being used with two petal latch/moment function and other devices. All music originated through a microphone. No synthesizer was used. No midi codes as found in the example midi arduino software below are being used. Everything is done by recording the microphone. Do the steal balls substitute for the pedals and buttons? Can an arduino interface be better than the different looping interfaces of various vendors?
Market Survey
These features and functions of electronic music need to be surveyed in order to expand the features:
An arduino is a single-board multi-controller that makes using electronics easier. It can be plugged into a computer via a USB port. It also has a DC power jack.
MIDI stands for Musical Instrument Digital Interface. In other words, MIDI is data that tells an instrument what to play. The MIDI Breakout allows the arduino (or other micro-controller) to communicate with electronic instruments. A MIDI shield is similar to the MIDI Breakout except that it has additional buttons and knobs.
The Arduino Uno SMD
MIDI Breakout board
MIDI shield
Casio CTK 519 Keyboard
MIDI cable
USB cable
For this project, a MIDI Shield must be used, not a MIDI Breakout board.
Soldering Midi Shields
However, the MIDI shield did't work. And after trying many times, discovered that the board was soldered incorrectly. Instead on one strip of solder running across the analog pins, each pin needed to be soldered individually.
Incorrectly soldered MIDI shield
Correctly soldered MIDI shield
Make sure that each pin is soldered individually!
The MIDI Shield is made up of the following parts:
The board
In/Out ports
Momentary push buttons
Potentiometers
Analog pins
SparkFun states that potentiometers are used to control volume, tone, and pitch.
MIDI
Introduction to Arduino Midi programming
Binary numbers play a major role in programming MIDI. In the Mary Had A Little Lamb Code (see here) most of the code is comprised of a set of numbers. Below is an example of a portion of the code. These numbers are referring hex (0x) numbers.
Binary, decimal, and hex (short for hexadecimal) are all ways to write the same thing. This site says "0x" indicates that the number is a hexadecimal number. The 90 which follows the 0x refers to the decimal; thus, 0x90 equals 10010000, or 8 bits of information.
Arudino Code
A table of common commands and their meanings
Command
Meaning
//
Whatever is following is just a comment
0x90
Turn note on
0x80
Turn note off
0X1E; note < 0x5A; note ++
Start on note 30 (0x1E) and if the following notes are less than note 90 (0x5A), add one note (note ++). In other words, play a scale
delay (100)
Delay the next note by 100 milliseconds
0x00 (in the velocity column)
Play the note at a silent velocity. Mutes/turns off the key
int
Integer
int note = [command]
Command is only followed in that particular section
void
Whatever is in that command is super important (they are followed throughout the entire code)
void setup
Command is only done once
void loop
Command is done over and over
Serial begin (31250)
Setting of the MIDI baud rate (baud rate = symbols per second). 31250 bits sent per second.
void noteOn(int cmd, int pitch, int velocity)
Says what the three values in the noteOn mean.
MIDI Code
From MIDI tutorial learned that there are 16 MIDI channels, meaning up to 16 instruments can be played at once.
The velocity value determines how loud the note is played.
Volume
Velocity Value
pp
31
p
42
mp
53
mf
64
f
80
ff
96
In order to play two notes at once, simply have two "noteOn" lines in a row (see below).
noteOn(0x90,0x4B,0x60);// E flatnoteOn(0x90,0x50,0x60);//A flat
The middle column of numbers in the code (0x4B, 0x50) correlate with a note on the keyboard. Their binary numbers are 01001011 and 01010000 respectively. Using different combinations of numbers are used to play different notes. Note values range from 0-127 (middle C = 60, C# = 61, D = 62, etc.).
According to the MIDI tutorial, the sounds use a "program change" message to indicate that a different instrument is being played. A program change contains one status byte and one data byte. A status byte is 1100 CCCC and one data byte is 0XXX XXXX. The MIDI channel (0-15) is XXXXXXX. It is important to note that once you determine the note you want to be played, you must convert it to a hex number. This site can convert to hex as well as the windows calculator.
The general MIDI Level 1 Patch Map was used to determine what tone is used (piano, violin, space pad, etc.). For example, suppose a xylophone tone was wanted. Look at the chart, determine the number (in this case, 14), and then convert it to hex (0E). Then insert it into the code.
Switch to tone-map G (press "Transpose/Tune/MIDI" button until the tone map screen appears in the viewing window, press the "+" key so the window says "Tone map G)
Plug in "out" side of MIDI cable into "out" port on MIDI shield
Plug in the "in" side of the MIDI cable into the "in" port of the keyboard
Coding Tips
Make sure the right hex number is selected. It's very easy to get the hex and decimal numbers confused.
Double check EVERYTHING. This will save so much time in the long run.
Labeling helps (but only if the labels are correct)
Understanding how the code works helps greatly
Test Arduino/Midi Shield Code
A sample MIDI code
Goal: To play a simple series of notes
>/* MIDI note player This sketch shows how to use the serial transmit pin (pin 1) to send MIDI note data. If this circuit is connected to a MIDI synth, it will play the notes F#-0 (0x1E) to F#-5 (0x5A) in sequence. The circuit: * digital in 1 connected to MIDI jack pin 5 * MIDI jack pin 2 connected to ground * MIDI jack pin 4 connected to +5V through 220-ohm resistor Attach a MIDI cable to the jack, then to a MIDI synth, and play music. created 13 Jun 2006 modified 13 Aug 2012 by Tom Igoe This example code is in the public domain. http://www.arduino.cc/en/Tutorial/Midi */voidsetup(){// Set MIDI baud rate:Serial.begin(31250);}voidloop(){// play notes from F#-0 (0x1E) to F#-5 (0x5A):for(intnote=0x1E;note<0x5A;note++){//Note on channel 1 (0x90), some note value (note), middle velocity (0x45):noteOn(0x90,note,0x45);delay(100);//Note on channel 1 (0x90), some note value (note), silent velocity (0x00):noteOn(0x90,note,0x00);delay(100);}}// plays a MIDI note. Doesn't check to see that// cmd is greater than 127, or that data values are less than 127:voidnoteOn(intcmd,intpitch,intvelocity){Serial.write(cmd);Serial.write(pitch);Serial.write(velocity);}
Keyboard Synthesizer Manual
The Casio CTK 519 Keyboard user manual gives information about MIDI. It said that MIDI messages are received by attaching the "out" port to the device and the "in" port to the keyboard. The manual also said that there are 16 MIDI channels on the keyboard and that both the sending machine and the receiving machine have to be set to the same channel. Another thing the manual mentioned is that the keyboard has two tone maps. Tone map N allows tones from 0 to 99 whereas tone map G allows for tones from 0 to 127. The manual also said to use MIDI channels 1, 2, 3, 4, or 10.
In order to change the channels as well as the tone map, press the transpose/tune/MIDI button three or four times and use the + and - buttons to change the setting. The keyboard is not General MIDI compatible but it can still connect to a computer or other MIDI equipment.
voidsetup(){Serial.begin(31250);//MIDI protocol baud rate is 31250 bits per second}voidloop(){//Plays Mary Had a Little Lamb on a loop at 145 BPM//Bar 1noteOn(0x90,0x40,0x28);//Quarter note: Edelay(414);noteOn(0x90,0x3E,0x28);//Quarter note: Ddelay(414);noteOn(0x90,0x3C,0x28);//Quarter note: Cdelay(414);noteOn(0x90,0x3E,0x28);//Quarter note: Ddelay(414);//Bar 2noteOn(0x90,0x40,0x28);//Quarter note: Edelay(414);noteOn(0x90,0x40,0x28);//Quarter note: Edelay(414);noteOn(0x90,0x40,0x28);//Half note: Edelay(828);//Bar 3noteOn(0x90,0x3E,0x28);//Quarter note: Ddelay(414);noteOn(0x90,0x3E,0x28);//Quarter note: Ddelay(414);noteOn(0x90,0x3E,0x28);//Half note: Ddelay(828);//Bar 4noteOn(0x90,0x40,0x28);//Quarter note: Edelay(414);noteOn(0x90,0x43,0x28);//Quarter note: Gdelay(414);noteOn(0x90,0x43,0x28);//Half note: Gdelay(828);//Bar5noteOn(0x90,0x40,0x28);//Quarter note: Edelay(414);noteOn(0x90,0x3E,0x28);//Quarter note: Ddelay(414);noteOn(0x90,0x3C,0x28);//Quarter note: Cdelay(414);noteOn(0x90,0x3E,0x28);//Quarter note: Ddelay(414);//Bar 6noteOn(0x90,0x40,0x28);//Quarter note: Edelay(414);noteOn(0x90,0x40,0x28);//Quarter note: Edelay(414);noteOn(0x90,0x40,0x28);//Quarter note: Edelay(414);noteOn(0x90,0x40,0x28);//Quarter note: Edelay(414);//Bar 7noteOn(0x90,0x3E,0x28);//Quarter note: Ddelay(414);noteOn(0x90,0x3E,0x28);//Quarter note: Ddelay(414);noteOn(0x90,0x40,0x28);//Quarter note: Edelay(414);noteOn(0x90,0x3E,0x28);//Quarter note: Ddelay(414);//Bar 8noteOn(0x90,0x3C,0x28);//Whole note: Cdelay(1656);noteOn(0x90,0x3C,0x00);//"Silent" note that makes sure the note stops playing.delay(2000);//End song//Wait 2 seconds after the last note is struck to repeat}voidnoteOn(intcmd,intpitch,intvelocity){//Sets what each of the 3 values in the "noteOn" function doesSerial.write(cmd);//All MIDI protocol messages start with 0x90 to signify the start of a MIDI messageSerial.write(pitch);//The note. Middle C (0x3C), for exampleSerial.write(velocity);//Length of time the note is played. Values range from 0 to 127 (0x64), for example}
Chords, Multiple Instruments & Drums
voidsetup(){Serial.begin(31250);//MIDI protocol baud rate is 31250 bits per second}voidloop(){// Channel 0 (hex = 0xC0) is alto sax (65 on the Gen MIDI Patch Map) hex = 0x41Serial.write(0xC0);Serial.write(0x41);// Channel 1 (hex = 0xC1) is piano 0 (0 on patch map) hex = 0x00Serial.write(0xC1);Serial.write(0x00);// Channel 9 (hex = 0xC9) is drums 0 (the drum line is always channel 9) Serial.write(0xC9);Serial.write(0x00);//t=0 ... from www.music-software-development.com/midi-tutorial.htmlnoteOn(0x90,0x48,0x40);// start sax noteOn(0x91,0x3C,0x40);//start pianonoteOn(0x91,0x43,0x40);//start pianonoteOn(0x91,0x4C,0x40);//start pianonoteOn(0x99,0x23,0x7F);//start bass drum//0x90 refers to channel 0 (sax), 0x91 refers to channel 1 (piano), and 0x99 refers to channel 9 (drums) delay(414);// delay song by 414 miliseconds//t=1noteOn(0x90,0x48,0x00);//stop saxnoteOn(0x99,0x23,0x00);//stop bass drumnoteOn(0x90,0x4A,0x40);//start saxdelay(414);//t=2noteOn(0x90,0x4A,0x00);//stop saxnoteOn(0x90,0x4C,0x40);//start saxnoteOn(0x99,0x23,0x7F);//start bass drumdelay(414);//t=3noteOn(0x90,0x4C,0x00);//stop saxnoteOn(0x99,0x23,0x00);//stop bass drumnoteOn(0x90,0x4F,0x40);//start saxdelay(414);//t=4noteOn(0x90,0x4F,0x00);//start saxnoteOn(0x91,0x3C,0x40);//play cord againnoteOn(0x91,0x43,0x40);//play cord againnoteOn(0x91,0x4C,0x40);//play cord againdelay(2000);//End song//Wait 2 seconds after the last note is struck to repeat}voidnoteOn(intcmd,intpitch,intvelocity){//Sets what each of the 3 values in the "noteOn" function doesSerial.write(cmd);//All MIDI protocol messages start with 0x90 to signify the start of a MIDI messageSerial.write(pitch);//The note. Middle C (0x3C), for exampleSerial.write(velocity);//Volume of note}
Sail by AWOLNATION
We wanted to program part of a song that was relatively simple but had a variety of instruments so we chose Sail by AWOLNATION. We decided to use tone "synth strings" which is number 51 on the patch map. The song is in E flat minor which means for the beginning notes we want an E flat and A flat. We also raised it up an octave. E flat was number 75 on the keyboard and its hex number is 4B. A flat was number 80, hex number is 50.
Version 1
>voidsetup(){Serial.begin(31250);//MIDI protocol baud rate is 31250 bits per second}voidloop(){// channel 0 synth strings 1 (51) 0xC0,0x33Serial.write(0xC0);Serial.write(0x33);//t=0 noteOn(0x90,0x4B,0x60);// start strings, E flatnoteOn(0x90,0x50,0x60);//start strings, A flat noteOn(0x90,0x4B,0x00);//stop strings, E flatnoteOn(0x90,0x50,0x00);//stop strings, A flatnoteOn(0x90,0x4B,0x60);// start strings, E flatnoteOn(0x90,0x50,0x60);//start strings, A flat noteOn(0x90,0x4B,0x00);//stop strings, E flatnoteOn(0x90,0x50,0x00);//stop strings, A flatdelay(414);//t=1 noteOn(0x90,0x4B,0x60);// start strings, E flatnoteOn(0x90,0x50,0x60);//start strings, A flatnoteOn(0x90,0x4B,0x00);//stop strings, E flatnoteOn(0x90,0x50,0x00);//stop strings, A flatnoteOn(0x90,0x4B,0x60);// start strings, E flatnoteOn(0x90,0x50,0x60);//start strings, A flat noteOn(0x90,0x4B,0x00);//stop strings, E flatnoteOn(0x90,0x50,0x00);//stop strings, A flatdelay(414);//End song//Wait 2 seconds after the last note is struck to repeat}voidnoteOn(intcmd,intpitch,intvelocity){Serial.write(cmd);Serial.write(pitch);Serial.write(velocity);}
When we uploaded it to the arduino and then plugged in the MIDI cable, the piano started playing, but it was really soft and scratchy. The tempo was also faster than what we wanted. See video here. We split each second into two (each "t =" only had 4 noteOn's instead of 8) and re-uploaded. It still sounded very faint. We tried switching to tone map G (I was previously on tone map N) and it started playing normally. See here.
Version 2
We then raised the note velocity to 60 so it would be louder. We tried going higher than 60 but the notes would just go silent. We also added the bass note (E flat). The E bass flat is number 39 with a hex number of 27. We also added more of the song into the code. This code represents 8 measures of the song.
voidsetup(){Serial.begin(31250);//MIDI protocol baud rate is 31250 bits per second}voidloop(){// channel 0 synth strings 1 (51) 0xC0,0x33Serial.write(0xC0);Serial.write(0x33);// channel 1 Pad 3 poly synth (91) 0xC1,0x5BSerial.write(0xC1);Serial.write(0x5B);// channel 9 drums 0Serial.write(0xC9);Serial.write(0x00);//0x4B = E flat 8va//0x50 = A flat 8va//0x49 = G flat 8va//0x27 = E flat (bass)//t=0 noteOn(0x90,0x4B,0x60);// start strings, E flatnoteOn(0x90,0x50,0x60);//start strings, A flat noteOn(0x90,0x4B,0x00);//stop strings, E flatnoteOn(0x90,0x50,0x00);//stop strings, A flatdelay(550);//t=1 noteOn(0x90,0x4B,0x60);// start strings, E flatnoteOn(0x90,0x50,0x60);//start strings, A flatnoteOn(0x90,0x4B,0x00);//stop strings, E flatnoteOn(0x90,0x50,0x00);//stop strings, A flatdelay(550);//t=2noteOn(0x90,0x4B,0x60);// start strings, E flatnoteOn(0x90,0x4E,0x60);//start strings, G flatnoteOn(0x90,0x27,0x60);//start strings, E flat (bass)noteOn(0x90,0x4B,0x00);//stop strings, E flatnoteOn(0x90,0x4E,0x00);//stop strings, G flatnoteOn(0x90,0x27,0x00);//stop strings, E flat (bass)delay(550);//t=3noteOn(0x90,0x4B,0x60);// start strings, E flatnoteOn(0x90,0x4E,0x60);//start strings, G flatnoteOn(0x90,0x27,0x60);//start strings, E flat (bass)noteOn(0x90,0x4B,0x00);//stop strings, E flatnoteOn(0x90,0x4E,0x00);//stop strings, G flatnoteOn(0x90,0x27,0x00);//stop strings, E flat (bass)delay(550);//t=4noteOn(0x90,0x4B,0x60);// start strings, E flatnoteOn(0x90,0x4E,0x60);//start strings, G flatnoteOn(0x90,0x27,0x60);//start strings, E flat (bass)noteOn(0x90,0x4B,0x00);//stop strings, E flatnoteOn(0x90,0x4E,0x00);//stop strings, G flatnoteOn(0x90,0x27,0x00);//stop strings, E flat (bass)delay(550);//t=5 noteOn(0x90,0x4B,0x60);// start strings, E flatnoteOn(0x90,0x4E,0x60);//start strings, G flatnoteOn(0x90,0x27,0x60);//start strings, E flat (bass)noteOn(0x90,0x4B,0x00);//stop strings, E flatnoteOn(0x90,0x4E,0x00);//stop strings, G flatnoteOn(0x90,0x27,0x00);//stop strings, E flat (bass)delay(550);//t=6noteOn(0x90,0x4B,0x60);// start strings, E flatnoteOn(0x90,0x4E,0x60);//start strings, G flatnoteOn(0x90,0x27,0x60);//start strings, E flat (bass)noteOn(0x90,0x4B,0x00);//stop strings, E flatnoteOn(0x90,0x4E,0x00);//stop strings, G flatnoteOn(0x90,0x27,0x00);//stop strings, E flat (bass)delay(550);//t=7noteOn(0x90,0x4B,0x60);// start strings, E flatnoteOn(0x90,0x4E,0x60);//start strings, G flatnoteOn(0x90,0x27,0x60);//start strings, E flat (bass)noteOn(0x90,0x4B,0x00);//stop strings, E flatnoteOn(0x90,0x4E,0x00);//stop strings, G flatnoteOn(0x90,0x27,0x00);//stop strings, E flat (bass)delay(550);//t=8 noteOn(0x90,0x4B,0x60);// start strings, E flatnoteOn(0x90,0x50,0x60);//start strings, A flatnoteOn(0x90,0x27,0x60);//start strings, E flat (bass) noteOn(0x90,0x4B,0x00);//stop strings, E flatnoteOn(0x90,0x50,0x00);//stop strings, A flatnoteOn(0x90,0x27,0x00);//stop strings, E flat (bass)delay(550);//t=9noteOn(0x90,0x4B,0x60);// start strings, E flatnoteOn(0x90,0x50,0x60);//start strings, A flatnoteOn(0x90,0x27,0x60);//start strings, E flat (bass)noteOn(0x90,0x4B,0x00);//stop strings, E flatnoteOn(0x90,0x50,0x00);//stop strings, A flatnoteOn(0x90,0x27,0x00);//stop strings, E flat (bass)delay(550);//t=10noteOn(0x90,0x4B,0x60);// start strings, E flatnoteOn(0x90,0x4E,0x60);//start strings, G flatnoteOn(0x90,0x27,0x60);//start strings, E flat (bass)noteOn(0x90,0x4B,0x00);//stop strings, E flatnoteOn(0x90,0x4E,0x00);//stop strings, G flatnoteOn(0x90,0x27,0x00);//stop strings, E flat (bass)delay(550);//t= 11noteOn(0x90,0x4B,0x60);// start strings, E flatnoteOn(0x90,0x4E,0x60);//start strings, G flatnoteOn(0x90,0x27,0x60);//start strings, E flat (bass)noteOn(0x90,0x4B,0x00);//stop strings, E flatnoteOn(0x90,0x4E,0x00);//stop strings, G flatnoteOn(0x90,0x27,0x00);//stop strings, E flat (bass)delay(550);//t=12noteOn(0x90,0x4B,0x60);// start strings, E flatnoteOn(0x90,0x4E,0x60);//start strings, G flatnoteOn(0x90,0x27,0x60);//start strings, E flat (bass)noteOn(0x90,0x4B,0x00);//stop strings, E flatnoteOn(0x90,0x4E,0x00);//stop strings, G flatnoteOn(0x90,0x27,0x00);//stop strings, E flat (bass)delay(550);//t=13 noteOn(0x90,0x4B,0x60);// start strings, E flatnoteOn(0x90,0x4E,0x60);//start strings, G flatnoteOn(0x90,0x27,0x60);//start strings, E flat (bass)noteOn(0x90,0x4B,0x00);//stop strings, E flatnoteOn(0x90,0x4E,0x00);//stop strings, G flatnoteOn(0x90,0x27,0x00);//stop strings, E flat (bass)delay(550);//t=14noteOn(0x90,0x4B,0x60);// start strings, E flatnoteOn(0x90,0x4E,0x60);//start strings, G flatnoteOn(0x90,0x27,0x60);//start strings, E flat (bass)noteOn(0x90,0x4B,0x00);//stop strings, E flatnoteOn(0x90,0x4E,0x00);//stop strings, G flatnoteOn(0x90,0x27,0x00);//stop strings, E flat (bass)delay(550);//t= 15noteOn(0x90,0x4B,0x60);// start strings, E flatnoteOn(0x90,0x4E,0x60);//start strings, G flatnoteOn(0x90,0x27,0x60);//start strings, E flat (bass)noteOn(0x90,0x4B,0x00);//stop strings, E flatnoteOn(0x90,0x4E,0x00);//stop strings, G flatnoteOn(0x90,0x27,0x00);//stop strings, E flat (bass)delay(550);//t= 16noteOn(0x90,0x4B,0x60);// start strings, E flatnoteOn(0x90,0x50,0x60);//start strings, A flatnoteOn(0x90,0x27,0x60);//start strings, E flat (bass) noteOn(0x90,0x4B,0x00);//stop strings, E flatnoteOn(0x90,0x50,0x00);//stop strings, A flatnoteOn(0x90,0x27,0x00);//stop strings, E flat (bass)delay(550);//t= 17noteOn(0x90,0x4B,0x60);// start strings, E flatnoteOn(0x90,0x50,0x60);//start strings, A flatnoteOn(0x90,0x27,0x60);//start strings, E flat (bass)noteOn(0x90,0x4B,0x00);//stop strings, E flatnoteOn(0x90,0x50,0x00);//stop strings, A flatnoteOn(0x90,0x27,0x00);//stop strings, E flat (bass)delay(550);//t= 18noteOn(0x90,0x49,0x60);// start strings, D flatnoteOn(0x90,0x4D,0x60);//start strings, FnoteOn(0x90,0x25,0x60);//start strings, D flat (bass)noteOn(0x90,0x49,0x00);//stop strings, D flatnoteOn(0x90,0x4D,0x00);//stop strings, F flatnoteOn(0x90,0x25,0x00);//stop strings, D flat (bass)delay(550);//t= 19noteOn(0x90,0x49,0x60);// start strings, D flatnoteOn(0x90,0x4D,0x60);//start strings, FnoteOn(0x90,0x25,0x60);//start strings, D flat (bass)noteOn(0x90,0x49,0x00);//stop strings, D flatnoteOn(0x90,0x4D,0x00);//stop strings, F flatnoteOn(0x90,0x25,0x00);//stop strings, D flat (bass)delay(550);//t= 20noteOn(0x90,0x49,0x60);// start strings, D flatnoteOn(0x90,0x4D,0x60);//start strings, FnoteOn(0x90,0x25,0x60);//start strings, D flat (bass)noteOn(0x90,0x49,0x00);//stop strings, D flatnoteOn(0x90,0x4D,0x00);//stop strings, F flatnoteOn(0x90,0x25,0x00);//stop strings, D flat (bass)delay(550);//t= 21noteOn(0x90,0x49,0x60);// start strings, D flatnoteOn(0x90,0x4D,0x60);//start strings, FnoteOn(0x90,0x25,0x60);//start strings, D flat (bass)noteOn(0x90,0x49,0x00);//stop strings, D flatnoteOn(0x90,0x4D,0x00);//stop strings, F flatnoteOn(0x90,0x25,0x00);//stop strings, D flat (bass)delay(550);//t= 22noteOn(0x90,0x49,0x60);// start strings, D flatnoteOn(0x90,0x4D,0x60);//start strings, FnoteOn(0x90,0x25,0x60);//start strings, D flat (bass)noteOn(0x90,0x49,0x00);//stop strings, D flatnoteOn(0x90,0x4D,0x00);//stop strings, F flatnoteOn(0x90,0x25,0x00);//stop strings, D flat (bass)delay(550);//t= 23noteOn(0x90,0x49,0x60);// start strings, D flatnoteOn(0x90,0x4D,0x60);//start strings, FnoteOn(0x90,0x25,0x60);//start strings, D flat (bass)noteOn(0x90,0x49,0x00);//stop strings, D flatnoteOn(0x90,0x4D,0x00);//stop strings, F flatnoteOn(0x90,0x25,0x00);//stop strings, D flat (bass)delay(550);//t= 24noteOn(0x90,0x49,0x60);// start strings, D flatnoteOn(0x90,0x4D,0x60);//start strings, FnoteOn(0x90,0x25,0x60);//start strings, D flat (bass)noteOn(0x90,0x49,0x00);//stop strings, D flatnoteOn(0x90,0x4D,0x00);//stop strings, F flatnoteOn(0x90,0x25,0x00);//stop strings, D flat (bass)delay(550);//t= 25noteOn(0x90,0x49,0x60);// start strings, D flatnoteOn(0x90,0x4D,0x60);//start strings, FnoteOn(0x90,0x25,0x60);//start strings, D flat (bass)noteOn(0x90,0x49,0x00);//stop strings, D flatnoteOn(0x90,0x4D,0x00);//stop strings, F flatnoteOn(0x90,0x25,0x00);//stop strings, D flat (bass)delay(550);//t=26noteOn(0x90,0x4E,0x60);//start strings, G flatnoteOn(0x90,0x55,0x60);//start strings, D flat noteOn(0x90,0x2A,0x60);//start strings, G flat (bass)noteOn(0x90,0x4E,0x00);//stop strings, G flatnoteOn(0x90,0x55,0x00);//stop strings, D flat noteOn(0x90,0x2A,0x00);//start stop, G flat (bass)delay(550);//t=27noteOn(0x90,0x4E,0x60);//start strings, G flatnoteOn(0x90,0x55,0x60);//start strings, D flat noteOn(0x90,0x2A,0x60);//start strings, G flat (bass)noteOn(0x90,0x4E,0x00);//start strings, G flatnoteOn(0x90,0x55,0x00);//start strings, D flat noteOn(0x90,0x2A,0x00);//start strings, G flat (bass)delay(550);//t=28noteOn(0x90,0x4E,0x60);//start strings, G flatnoteOn(0x90,0x55,0x60);//start strings, D flat noteOn(0x90,0x2A,0x60);//start strings, G flat (bass)noteOn(0x90,0x4E,0x00);//start strings, G flatnoteOn(0x90,0x55,0x00);//start strings, D flat noteOn(0x90,0x2A,0x00);//start strings, G flat (bass)delay(550);//t=29noteOn(0x90,0x4E,0x60);//start strings, G flatnoteOn(0x90,0x55,0x60);//start strings, D flat noteOn(0x90,0x2A,0x60);//start strings, G flat (bass)noteOn(0x90,0x4E,0x00);//start strings, G flatnoteOn(0x90,0x55,0x00);//start strings, D flat noteOn(0x90,0x2A,0x00);//start strings, G flat (bass)delay(550);//t=30noteOn(0x90,0x49,0x60);// start strings, D flatnoteOn(0x90,0x50,0x60);//start strings, A flatnoteOn(0x90,0x25,0x60);//start strings, D flat (bass)noteOn(0x90,0x49,0x00);// stop strings, D flatnoteOn(0x90,0x50,0x00);//stop strings, A flatnoteOn(0x90,0x25,0x00);//stop strings, D flat (bass)delay(550);//t=31noteOn(0x90,0x49,0x60);// start strings, D flatnoteOn(0x90,0x50,0x60);//start strings, A flatnoteOn(0x90,0x25,0x60);//start strings, D flat (bass)noteOn(0x90,0x49,0x00);// stop strings, D flatnoteOn(0x90,0x50,0x00);//stop strings, A flatnoteOn(0x90,0x25,0x00);//stop strings, D flat (bass)delay(550);//t=32noteOn(0x90,0x49,0x60);// start strings, D flatnoteOn(0x90,0x50,0x60);//start strings, A flatnoteOn(0x90,0x25,0x60);//start strings, D flat (bass)noteOn(0x90,0x49,0x00);// stop strings, D flatnoteOn(0x90,0x50,0x00);//stop strings, A flatnoteOn(0x90,0x25,0x00);//stop strings, D flat (bass)delay(550);//t=33noteOn(0x90,0x49,0x60);// start strings, D flatnoteOn(0x90,0x50,0x60);//start strings, A flatnoteOn(0x90,0x25,0x60);//start strings, D flat (bass)noteOn(0x90,0x49,0x00);// stop strings, D flatnoteOn(0x90,0x50,0x00);//stop strings, A flatnoteOn(0x90,0x25,0x00);//stop strings, D flat (bass)delay(550);//End song//Wait 2 seconds after the last note is struck to repeat}voidnoteOn(intcmd,intpitch,intvelocity){Serial.write(cmd);Serial.write(pitch);Serial.write(velocity);}
voidsetup(){Serial.begin(31250);//MIDI protocol baud rate is 31250 bits per second}voidloop(){// channel 9 drums 0Serial.write(0xC9);Serial.write(0x00);//t=noteOn(0x99,0x23,0x60);// start acoustic bass drumdelay(414);//t=noteOn(0x99,0x23,0x00);// stop acoustic bass drumnoteOn(0x99,0x24,0x60);// start bass drum 1delay(414);//t=noteOn(0x99,0x24,0x00);// stop bass drum 1noteOn(0x99,0x25,0x60);// start side stickdelay(414);//t=noteOn(0x99,0x25,0x00);// stop side sticknoteOn(0x99,0x26,0x60);// start acoustic snaredelay(414);//t=noteOn(0x99,0x26,0x00);// stop acoustic snarenoteOn(0x99,0x27,0x60);// start hand clapdelay(414);//t=noteOn(0x99,0x27,0x00);// stop hand clapnoteOn(0x99,0x28,0x60);// start electric snaredelay(414);//t=noteOn(0x99,0x28,0x00);// stop electric snarenoteOn(0x99,0x29,0x60);// start low floor tomdelay(414);//t=noteOn(0x99,0x29,0x00);// stop low floor tomnoteOn(0x99,0x2A,0x60);// start closed hi-hatdelay(414);//t=noteOn(0x99,0x2A,0x00);// stop closed hi-hatnoteOn(0x99,0x2B,0x60);// start high floor tomdelay(414);//t=noteOn(0x99,0x2B,0x00);// stop high floor tomnoteOn(0x99,0x2C,0x60);// start pedal hi-hatdelay(414);//t=noteOn(0x99,0x2C,0x00);// stop pedal hi-hatnoteOn(0x99,0x2D,0x60);// start low tomdelay(414);//t=noteOn(0x99,0x2D,0x00);// stop low tomnoteOn(0x99,0x2E,0x60);// start open hi-hatdelay(414);//t=noteOn(0x99,0x2E,0x00);// stop open hi-hatnoteOn(0x99,0x2F,0x60);// start low-mid tomdelay(414);//t=noteOn(0x99,0x2F,0x00);// stop low-mid tomnoteOn(0x99,0x30,0x60);// start high mid-tomdelay(414);//t=noteOn(0x99,0x30,0x00);// stop high mid-tomnoteOn(0x99,0x31,0x60);// start crash cymbals 1delay(414);//t=noteOn(0x99,0x31,0x00);// stop crash cymbals 1noteOn(0x99,0x32,0x60);// start high tomdelay(414);//t=noteOn(0x99,0x32,0x00);// stop high tomnoteOn(0x99,0x33,0x60);// start ride cymbal 1delay(414);//t=noteOn(0x99,0x33,0x00);// stop ride cymbal 1noteOn(0x99,0x34,0x60);// start Chinese cymbaldelay(414);//t=noteOn(0x99,0x34,0x00);// stop Chinese cymbalnoteOn(0x99,0x35,0x60);// start ride belldelay(414);//t=noteOn(0x99,0x35,0x00);// stop ride bellnoteOn(0x99,0x36,0x60);// start tambourinedelay(414);//t=noteOn(0x99,0x36,0x00);// stop tambourinenoteOn(0x99,0x37,0x60);// start splash cymbaldelay(414);//t=noteOn(0x99,0x37,0x00);// stop splash cymbalnoteOn(0x99,0x38,0x60);// start cowbelldelay(414);//t=noteOn(0x99,0x38,0x00);// stop cowbellnoteOn(0x99,0x39,0x60);// start crash cymbal 2delay(414);//t=noteOn(0x99,0x39,0x00);// stop crash cymbal 2noteOn(0x99,0x3A,0x60);// start vibraslapdelay(414);//t=noteOn(0x99,0x3A,0x00);// stop vibraslapnoteOn(0x99,0x3B,0x60);// start ride cymbal 2delay(414);//t=noteOn(0x99,0x3B,0x00);// stop ride cymbal 2noteOn(0x99,0x3C,0x60);// start hi-bongodelay(414);//t=noteOn(0x99,0x3C,0x00);// stop hi-bongonoteOn(0x99,0x3D,0x60);// start low bongodelay(414);//t=noteOn(0x99,0x3D,0x00);// stop low bongonoteOn(0x99,0x3E,0x60);// start mute hi-congadelay(414);//t=noteOn(0x99,0x3E,0x00);// stop mute hi-conganoteOn(0x99,0x3F,0x60);// start open hi-congadelay(414);//t=noteOn(0x99,0x3F,0x00);// stop open hi-conganoteOn(0x99,0x40,0x60);// start low congadelay(414);//t=noteOn(0x99,0x40,0x00);// stop high conganoteOn(0x99,0x41,0x60);// start high timbaledelay(414);//t=noteOn(0x99,0x41,0x00);// stop high timbalenoteOn(0x99,0x42,0x60);// start low timbaledelay(414);//t=noteOn(0x99,0x42,0x00);// stop low timbalenoteOn(0x99,0x43,0x60);// start high agogodelay(414);//t=noteOn(0x99,0x43,0x00);// stop high agogonoteOn(0x99,0x44,0x60);// start low agogodelay(414);//t=noteOn(0x99,0x44,0x00);// stop low agogonoteOn(0x99,0x45,0x60);// start cabasadelay(414);//t=noteOn(0x99,0x45,0x00);// stop cabasanoteOn(0x99,0x46,0x60);// start maracasdelay(414);//t=noteOn(0x99,0x46,0x00);// stop maracasnoteOn(0x99,0x47,0x60);// start short whistledelay(414);//t=noteOn(0x99,0x47,0x00);// stop short whistlenoteOn(0x99,0x48,0x60);// start long whistledelay(414);//t=noteOn(0x99,0x48,0x00);// stop whistlenoteOn(0x99,0x49,0x60);// start short guirodelay(414);//t=noteOn(0x99,0x49,0x00);// stop short guironoteOn(0x99,0x4A,0x60);// start long guirodelay(414);//t=noteOn(0x99,0x4A,0x00);// stop long guironoteOn(0x99,0x4B,0x60);// start clavesdelay(414);//t=noteOn(0x99,0x4B,0x00);// stop clavesnoteOn(0x99,0x4C,0x60);// start hi-wood blockdelay(414);//t=noteOn(0x99,0x4C,0x00);// stop hi-wood blocknoteOn(0x99,0x4D,0x60);// start low wood blockdelay(414);//t=noteOn(0x99,0x4D,0x00);// stop low wood blocknoteOn(0x99,0x4E,0x60);// start mute cuicadelay(414);//t=noteOn(0x99,0x4E,0x00);// stop mute cuicanoteOn(0x99,0x4F,0x60);// start open cuicadelay(414);//t=noteOn(0x99,0x4F,0x00);// stop open cuicanoteOn(0x99,0x50,0x60);// start mute triangledelay(414);//t=noteOn(0x99,0x50,0x00);// stop mute trianglenoteOn(0x99,0x51,0x60);// start open triangledelay(414);//t=noteOn(0x99,0x51,0x00);// stop triangledelay(414);//End song//Wait 2 seconds after the last note is struck to repeat}voidnoteOn(intcmd,intpitch,intvelocity){Serial.write(cmd);Serial.write(pitch);Serial.write(velocity);}
Exploring MIDI Level 2 Drum Sounds
All of the current drum sounds are from General MIDI Level 1. There is General MIDI Level 2 which is based off of General MIDI. According to midi.org, General MIDI 2 is a group of extensions made to General MIDI 1 which allows more sounds to be played.
There are other possible drum kits besides the one previously used. The Void, for example, lists other possible kits such as a room kit, power kit, orchestra kit, and more. These kits all have different patch numbers. According to Wikipedia, "the drum bank is accessed by setting cc#0 (Bank Select MSB) to 120 and cc#32 (Bank Select LSB) to 0 and PC (Program Change) to select drum kit". PG Music also has a list of possible drum kits.
Speed and Volume
Used the midisheild potentiometer connected on Analog0 (A0) to control the speed of a beat. Started with analogIn arduino example.
Controlling speed of song
/* MIDI note player */intpotPin=0;// select the input pin for the potentiometerintSpeed=13;// select the pin for the Speedintval=0;// variable to store the value coming from the sensorvoidsetup(){// Set MIDI baud rate:Serial.begin(31250);//pinMode(Speed,OUTPUT);// declare the Speed as an OUTPUT}voidloop(){//Note on channel 1 (0x90), some note value (note), middle velocity (0x45):noteOn(0x90,0x43,0x45);delay(100);//Note on channel 1 (0x90), some note value (note), silent velocity (0x00):noteOn(0x90,0x23,0x00);delay(100);val=analogRead(potPin);// read the value from the sensordigitalWrite(Speed,HIGH);// Makes song fastdelay(val);// stop the program for some timedigitalWrite(Speed,LOW);// Makes song slowdelay(val);// stop the program for some time}// plays a MIDI note. Doesn't check to see that// cmd is greater than 127, or that data values are less than 127:voidnoteOn(intcmd,intpitch,intvelocity){Serial.write(cmd);Serial.write(pitch);Serial.write(velocity);}
The second analog port was tested controling the volume by editing the velocity part of midi codes.
Controlling volume
/* MIDI note player */intpotPin=0;// select the input pin for the potentiometerintSpeed=13;// select the pin for the Speedintval=0;// variable to store the value coming from the sensorconstintsensorMin=23;// sensor minimum, discovered through experimentconstintsensorMax=1000;// sensor maximum, discovered through experimentintvolume=50;intval2;// second potentiometervoidsetup(){// Set MIDI baud rate:Serial.begin(31250);//pinMode(Speed,OUTPUT);// declare the Speed as an OUTPUT}voidloop(){//Note on channel 1 (0x90), some note value (note), middle velocity (0x45):noteOn(0x90,0x43,volume);delay(100);val2=analogRead(1);volume=map(val2,0,1000,0,100);// takes range on val2 and converts to pot range.val=analogRead(potPin);// read the value from the sensordigitalWrite(Speed,HIGH);// makes song fasterdelay(val);// stop the program for some timedigitalWrite(Speed,LOW);// Slows down Speeddelay(val);// stop the program for some time}// plays a MIDI note. // cmd is greater than 127, or that data values are less than 127:voidnoteOn(intcmd,intpitch,intvelocity){Serial.write(cmd);Serial.write(pitch);Serial.write(velocity);}
The goal is to place a steel ball on top of two washers. This should electrically connect them.
Attachment of washer halves to the plexiglass board
The first design was based off of the instructions for building a beat bearing board found on the Jameco BeatBearing webpage, which called for screwing the washer halves to the board. However, instead of soldering the wires to soldering tabs, our modified design based on these instructiuons was to use wiring crimps to connect the wires to the washer system.
Washer was held down with a vice to drill holes big enough for number 6 screws. This method of drilling was most successful.
Holes to fit number 6 screws were also drilled into the plexiglass board.
The washers were then cut down the middle with the drilled holes on either side of the vertical cut.
The wiring crimps were added in between the nut and plexiglass board when the washer halves were screwed down.
The ends of the screws would eventually have to be cut off to make the system flush with the plexiglass runners forming the chgannels.
Ball bearing sitting atop screwed down system
The next design we created was based off of ideas gathered from our classmates, modified to our own specifications. It called for the washer halves to be glued down to the plexiglass, where the wires could come through the bottom of the board and attach to the washers. This was the design we used moving forward with the project.
Zap-a-Gap glue was the glue we found to be the most transparent, increasing the look of the board, and offered the best attachment of the washer halves to the board.
Zap-a-Gap glue was applied to the entire surface area between the washer and the board.
The attachment the glue gave us was clean and sturdy.
The only issue with the glued down design, was that the ball bearing came into contact with the plexiglass when sitting on washer halves, which affected the conductivity.
The glued down design was chosen by our group to be used as the design for connecting the washer halves to the plexiglass. The problem with the ball bearing touching the plexiglass was tackled in the wire connection part of our design.
Designing Wire Connection to washers
The first wire connection designs had the wires coming up through separate holes drilled into the plexiglass board from the bottom, then attached to the washer halves by either being coiled around the washer or sandwiched between the washer when glued down.
Wire coming through hole drilled in plexiglass.
Design of wire being sandwiched between washer and plexiglass when glued down. The contact of the wire to the washer would provide the connection needed.
Design of wire being coiled around washer then glued down to provide the proper wire connection
The coiled design was chosen to be used as the design, because it offered a better connection. New ideas for advancements to the coil design were given to our group by the class, and are shown below. These ideas were offered to solve the problem of the ball bearing touching the plexiglass when placed on the washer system. We chose the design we thought to have the most potential, and tested it.
First idea: Glue smaller washers on each washer half to elevate ball bearing.
Second idea: Cut the washer unevenly and place an object on the smaller washer piece to also give the ball bearing elevation.
Third idea: Drill a hole in between the center of the washer halves, into the plexiglass, for the ball bearing to set in the washer halves cleanly, without touching the plexiglass.
Fourth idea: Advancement of third idea where wires come up through same hole ball bearing will clear, limiting the number of holes needed to be drilled in the plexiglass from 3 to 1.
The fourth idea was then built, and tested. The design process for building the prototype are shown below.
Here is the hole that was drilled into the plexiglass, which will be between the two washer halves, for the wires to come up through, and ball bearing to set through.
This is our prototype for the fourth idea. The wires came up through the center hole, coiled around the washer halves, then were glued down with the washers to the plexiglass board.
Zoomed out view of prototype.
Underneath view of prototype.
Prototype with ball bearing resting atop the system. The ball bearing does not touch any part of the plexiglass thanks to the hole in the center of washer halves.
Zoomed in view of ball bearing sitting on prototype.
This prototype was then tested using a multimeter. The multimeter measured resistance of the system, and produces a noise if the sensors are connected to a system which is conductive.
This was the multimeter used to test the prototype. When the black and red sensors were attached to each end of the wire, no sound was produced by the multimeter, telling us the system was not conductive.
Adjustments to this prototype were then made, and in the next section the final working manufacturing design can be seen.
Testing Washer Attachment System
The final working design was discovered after the prototype seen above was tested. It included aspects from the prototype built, as well as aspects from other design ideas not yet tested. But when built, tested, duplicated, then tested again, this design was consistently working. Also, the plexiglass board configuration is including along with the working washer system design.
The important part of our working design was the measurements of the washer halves. The spacing between each half is crucial for the ball bearing to sit in the system without touching the plexiglass. Here are the drawings with labels and measurements of the working design:
Drawing of washer halves with spacing measurements.
Underview of the plexiglass board with measurements of drilled holes for wires to go up through.
Drawing of wire connection system: wire comes up through hole in plexiglass and is coiled around washer half, then glued down.
Side view of entire design with labels.
When this design was built and the ball bearing was placed atop, then tested with the multimeter, the multimeter produced a sound, signifying that the system was conductive. Thus we had a working design.
This is the working design. Wires coming through plexiglass in two separate holes, coiled around washer halves, then glued to plexiglasss with Zap-a-Gap glue.
This is an underneath view of the working design with shows the plexiglass configuration of the runners on either side of the washer system to allow for the wires to flow smoothly under the board.
Ball bearing resting on working design.
When tested with the multimeter, the sound signifying a connection was set off, telling us the system was conductive.
The design was then duplicated, using small wooden spacers (one of which was wrapped in electrical tape), to guarantee the exact measurements of the spacing of washer halves was maintained. The duplicate washer system was tested and proved to be successful, giving more credibility to the working final design.
Spacers placed in original working system to confirm correct measurements.
The spacers were then held in between washer halves of duplicate to maintain correct spacing, which is crucial for working system.
Here is the duplicate system with the spacers set in between washer system as it sets in the glue.
Duplicate of the working washer system.
When tested with the multimeter, the duplicate washer system also was conductive, as a sound was produced form the multimeter.
So we have developed a final working design of the washer system, that will be used along with the designed plexiglass board, to create the beat bearing board for the Music project.
Planning Beat Bearing Board Construction
The design of the board was broken up into calculating the accurate measurements so that it sat well on top of the flat screen monitor and was spaced correctly. The calculations and design of the board then came together and we achieved a blueprint of the board which is seen below.
These were are the dimensions of the screen we will be using for our project.
This is a drawing of the final the dimensions of the plexiglass board. The plexiglass runners will be 1 1/32" and the space for the washer systems will be 1 3/8".
This is the drawing of the length vertically that the washer systems will be, influencing the space in between the plexiglass runners they will be able to occupy. The total space is 11/8" (9/8 + 1/8 + 1/8).
This is the final drawing of the washer system spacing and its dimensions. The space between each washer system should be 17/24".
Creating Construction Spacing Template
Learning SketchUp
Google SketchUp was used to draw a 3D model of the washer template that would be printed using the MakerBot and used to glue down the 32 washer systems to the board correctly and efficiently. We successfully drew and printed the washer template, however the dimensions of the spaces for the washers have to be amended. Below is a SketchUp file that can be accessed and amended.
These videos were helpful when learning about converting SketchUp files to STL files that could then be transported to Makerware software and then printed. Also just for learning how to use SketchUp and the functions of all the tools.
Important tools to utilize while drawing in SketchUp:
This tool will allow you to create depth in the shapes drawn. The same tool can then be used to push through a 3D figure and create holes in the object.
It is important to click on the lines of an object when trying to erase, otherwise SketchUp does not recognize the function.
The orbit tool is essential when using SketchUp, for it is the key to viewing any side of your drawing. For example, if you wanted to push a hole into the opposite side of the cube drawn, you have to use the orbit tool to rotate the drawing and have my view on the side I want to work with.
This tool is convenient when your drawing is large, or if you plan to have multiple drawings.
Dimensions
This table has all of the conversions from inches to millimeters to obtain a more accurate drawing in SketchUp. The calculations were all done in inches, so it was important to get values in millimeters that we could input into SketchUp during the drawing process of the template. Using millimeters while working in SketchUp will yield the most accurate desired dimensions.
IMPORTANT ---
You will need to install Google SketchUp in order to open the file. Click the file link, and then hit "Download." Then, if SketchUp is installed on your computer, it should automatically be opened with SketchUp. When the SketchUp window comes up, hit "Choose Template." Next, select "Architectural Design - Millimeters" and then hit "Start Using SketchUp." You should have then successfully opened the file in SketchUp, with the ability to make changes to the drawing.
3D printing Template
3D Printing
The first step to print a SketchUp drawing on the MakerBot is to convert the SketchUp file to an STL file. The SketchUp STL extension can be found on the SketchUp Extension Warehouse, and then by following the steps your SketchUp file can be converted to an STL file quite easily. You will need to Sign In with a Google account to download the extension.
Next the file will need to be uploaded into MakerWare software, and adjusted properly to obtain optimal 3D printing. A tutorial on how how to operate and use MakerWare can be found by clicking the link below.
Finally, once the file is exported from MakerWare onto an SD card, it is ready to be printed using the MakerBot. A tutorial on how to save the file properly on the SD card, and use the MakerBot appropriately and Safely can be found by clicking the link below.
Below are some screen shots of our work using MakerWare software to print the washer template after converting the SketchUp file to an STL file and then uploaded into MakerWare software.
This is my drawing of the washer template uploaded into Makerware software as an STL file. I had to rotate the initially placed object longways on the building plate because otherwise the ends of the model would stick off the side of the building plate.
Once clicking "Make" in Makerware this menu came up, check the "Print preview" box. Also the speed and extruding settings can be adjusted on this menu.
This is the print preview for my washer template in Makerware. The print time it gave was about 85 minutes, and by looking at the print preview it was concluded that it would be a clean print, so the file was transferred to an SD card and then sent the print to the MakerBot.
Washer Template'
The washer template drawn in SketchUp was created to make the construction of the board easier and more efficient. Specifically, the template will be used to glue the washer halves with the coiled wire down to the board, with eh correct spacing, for all 32 washer systems in each row.
Because the MakerBot only has an 11 inch building plate, and the total length of our board is 13 3/8 inches, we cut the original design of the template in half, and then printed two of the same template. The images below show the successfully printed template which was drawn in SketchUp.
This is the result of the first attempted re-print of the washer template on the MakerBot. The print was a mess on the right end, and so we had to stop it after about 3 layers. The most likely problem was the build plate in the MakerBot was not leveled properly.
These are the two washer templates that were successfully printed with the MakerBot. Unfortunately the dimensions of the holes to hold the washer halves in place are too large, and do not fit the requirement of being snug with the washer in it.
This is one of the washer templates printed. It is a steady structure, and even in the thin outer parts it is held together strongly.
Here is a better view of the washer template.
Thickness of the template is shown better at this angle.
After examining the printed washer templates, and placing cut washer-halves into the cut holes, it appears that the measurements for the spaces designed to fit the washer halves into place are too big. This means the next step is to redesign the washer template in SketchUp, using the dimensions that will be found by re-measuring the washer halves, and the printed template. This is why we left the SketchUp file, which can be found above in the "SketchUp" section of this page. Instead of starting form scratch, our drawing can just be amended to fit the modifications of the washer size and new measurements taken. Then a new template will be printed again using the same process.
Rebuilding template with room for washer halves
The original washer template was the correct length and width but the holes for the washers were too big.
1) Change the cut out to be 8mm wide in a sample template
When we tested to see if it would still work with the ball bearing we found that the spacing was too far apart.
2) Change the distance between the two halves to 2.3mm
When we tested this we found it to work perfectly with the ball bearing.
3) Create a full size washer template
When we did this everything worked fine but have of the first section would not extrude through in Google Sketch Up. To solve this we still printed the template and used the sample template.
Here is a view to see that the diameter of the circle is a perfect fit. The gap between the outside of the washer and the template is not a proper fit.
This is a comparison from the old template with the new sample template in dark gray. The new template still needed to be re-worked.
This is the second sample template that was a perfect fit for the washers.
This was the final design for the template that we used to wire the board. There were problems with sketchup when we tried to extrude the first hole for the washers. We used the second sample template for the first holes for the washers.
First Construction Attempt
Setting Up Plexiglass Board
Next the calculations were done to figure what numbers to use when drawing in SketchUp to use throughout the template design. This included knowing the dimensions for the plexiglass runners, rectangular prism of template, and the washer system spacing.
The board will be constructed using plexiglass. The plexiglass pieces needed to be attached will be glued together using acrylic glue. Information about using acrylic glue, and safety concerns can be found below.
The channels underneath the board were made from 1/4" plexiglass runners which were glued using PVC pipe to the base 1/8" plexiglass board. The channels are 1" wide, and as long as the base board, which will depend on the size of the monitor screen we decide to use. The channels should be spread out enough so there 1/4" of space above and below the top of washer. This will allow for the wiring to run fluidly through the channel on the underside of the board, without having excess space.
Cutting Plexiglass
We used scoring and a table saw to cut the plexiglass. Scoring worked well for the 1/8" pieces, and the table saw was used for the 1/4" pieces because they were too thick to score and break apart, especially because we needed them to be only about an inch wide.
Slab of 1/4" thick plexiglass with lines draw on marking where to cut to make 1 1/32" wide plexiglass runners, all which are 13 3/8". The slab is sitting on top of the table saw which will be used to cut the runners. Adel did all the markings.
Closer view of the lines Adel marked on plexiglass slab for me to cut. There are five total runners marked that will be cut.
This is one of the plexiglass runners that was cut from the marked slab. The width = 1 1/32", the length = 13 3/8" and the thickness once again is 1/4".
Here is another view of a cut runner piece that was done using the table saw it is sitting on in the picture.
All five runners that we cut form the slab of plexiglass stacked while resting on the table saw.
Close up view of runners resting on top of 1/8" plexiglass board in an example of what the board will look like with the runners glued down.
Retreated view of what the board will look like when the runners are glued down. The space in between the plexiglass runners is 1 3/8" wide, which is wear the washer template to be printed will be placed when gluing down the washer halves.
Next clamps were used to position the pieces
Close up of the board and the template to show tight fit.
Board with template before using epoxy.
Gluing Runners Onto Board
Steps
Use syringe to apply epoxy to glue the two pieces of plexiglass together.
apply pressure to the plexiglass runners. Applying too much pressure or no pressure will not make a good seal. Make sure to practice to find the right amount of pressure needed.
Use camps so that the plexiglass runners will not move.
Put syringe next to plexiglass seem and the epoxy will seep under the space. Watch video below for example.
**WARNING**
Use gloves, because it is extremely sticky and can damage skin.
Applying epoxy.
The board is clamped and drying.
The board has been glued and no clamps are needed because it is dry.
Below is a video of the epoxy being applied to the runners.
While the epoxy will work to glue the runners to the board we decided to try hot glue to see if it would work. Hot glue did work and was safer and easier to work with.
To glue the runner to the board using hot glue simple apply glue to the runner till its completely covered
Put on top of board and apply pressure till the glue has dried
Scrape off any excess glue that seeped out onto the board
The two runners glued down using hot glue.
Gluing washers on board
Use hot glue guns
Apply small amount of glue on washer
Turn washer over into appropriate placement
**Warning** When the washer touches the board after it has hot glue on it, you have about 2 seconds before it is stuck there forever.
We used the template to set up the outside washers.
The arduino is going to have to communicate with the papilio or the computer running processing in order to coordinate the LCD display under the beat bearing board and perhaps save/load songs, communicate timber, pitch, volume, speed, drum rudiment, etc. The arduino serial library allows the arduino to send and receive information.
The arduino can send information back to the computer through the serial monitor. However, when we selected the serial monitor, the information came back in symbols. What we want is for it to come back the the name of the drum sound that is being play at that moment.
The serial monitor (upper right hand corner)
What the serial monitor showed when the drum code was being played
Arrays are going to be important in the development of this code. An array is a list in which each item in the list has a number. The video's example of an array was a stack of papers and each paper has a number. If you want to select one paper, you would select the number it is assigned in the array. More information on arrays can be found here Below is a sample code taken from an tutorial which explains how an array works.
Example Array Code
/* Arrays Demonstrates the use of an array to hold pin numbers in order to iterate over the pins in a sequence. Lights multiple LEDs in sequence, then in reverse. Unlike the For Loop tutorial, where the pins have to be contiguous, here the pins can be in any random order. The circuit: * LEDs from pins 2 through 7 to ground created 2006 by David A. Mellis modified 30 Aug 2011 by Tom Igoe This example code is in the public domain. http://www.arduino.cc/en/Tutorial/Array */inttimer=100;// The higher the number, the slower the timing.intledPins[]={2,7,4,6,5,3};// an array of pin numbers to which LEDs are attachedintpinCount=6;// the number of pins (i.e. the length of the array)voidsetup(){// the array elements are numbered from 0 to (pinCount - 1).// use a for loop to initialize each pin as an output:for(intthisPin=0;thisPin<pinCount;thisPin++){pinMode(ledPins[thisPin],OUTPUT);}}voidloop(){// loop from the lowest pin to the highest:for(intthisPin=0;thisPin<pinCount;thisPin++){// turn the pin on:digitalWrite(ledPins[thisPin],HIGH);delay(timer);// turn the pin off:digitalWrite(ledPins[thisPin],LOW);}// loop from the highest pin to the lowest:for(intthisPin=pinCount-1;thisPin>=0;thisPin--){// turn the pin on:digitalWrite(ledPins[thisPin],HIGH);delay(timer);// turn the pin off:digitalWrite(ledPins[thisPin],LOW);}}
At first, eight successive versions of the monitor code were made video.
8th version
voidsetup(){setupSD();setupCG();}voiddraw(){drawSD();drawCG();}floaty=100;voidsetupSD(){size(360,640);// invertedstroke(255);// moving line colorframeRate(200);}voiddrawSD(){// background(); blank reveals fading circlesy=y-1;if(y<0){y=height;}line(0,y,width,y);}PGraphicspg;intbarWidth=90;//adjust bar width to fit 4intlastBar=-1;voidsetupCG(){size(360,640);//invertedpg=createGraphics(1,1);//minimized grey box, now virtually invisible}voiddrawCG(){fill(0,10);//duration of circle faderect(0,0,width,height);colorMode(HSB,height,height,height);//attempts to give circle hue behaviorstroke(HSB,height,height,height);//attempts to give stroke hue behaviorellipse(mouseX,mouseY,90,90);//dimensions of circle 60 -> 90pg.beginDraw();//pg.background(); hope to make background transparentintellipse=mouseX/barWidth;//insert drawH() here, replacing the fill() function of drawCG(). if(ellipse!=lastBar){//replaced whichBar with ellipse, no change.intbarX=ellipse*barWidth;fill(mouseY,height,height);rect(barX,0,barWidth,height);lastBar=ellipse;}pg.stroke(HSB,height,height,height);//attempts to give stroke hue behaviorpg.ellipse(mouseX-120,mouseY-60,60,60);pg.endDraw();// Draw the offscreen buffer to the screen with image() }
voidsetup(){setupSD();setupCG();setupH();}voiddraw(){drawSD();drawCG();drawH();}floaty=100;voidsetupSD(){size(640,360);// back to original dimensionsstroke(255);// moving line colorframeRate(200);}voiddrawSD(){//tried changing y to x (no change)// background(); blank reveals fading circlesy=y+1;//swap sign; goes left to right but now it doesn't repeatif(y<0){//if + and >, the line doesn't appeary=height;//height and width are no difference}line(y,height,y,0);//put 0 at end}PGraphicspg;voidsetupCG(){size(640,360);//back to original//minimized grey box, now virtually invisible//trying to delete this function caused a string of NullPointerException errors under pg.beginDraw();//deleted pg = createGraphics(1, 1); no longer needed}voiddrawCG(){fill(0,12);rect(0,0,width,height);fill(255);//whitestroke(255);//whiteellipse(mouseX,mouseY,90,90);//dimensions of circle 60 -> 90/* *pg.beginDraw(); * //pg.background(); hope to make background transparent *pg.noFill(); *pg.stroke(255); *pg.ellipse(mouseX-120, mouseY-60, 60, 60); *pg.endDraw(); * * // Draw the offscreen buffer to the screen with image() *image(pg, 120, 60); *Erasing this chunk of code got rid of the grey box */}intbarWidth=90;//adjust bar width to fit 4intlastBar=-1;voidsetupH(){size(640,360);//invertedcolorMode(HSB,height,height,height);noStroke();//altered from noStroke();//background();}voiddrawH()//need to change bar to horizontal{intwhichBar=mouseX/barWidth;if(whichBar!=lastBar){intbarX=whichBar*barWidth;fill(mouseY,height,height);rect(barX,0,barWidth,height);lastBar=whichBar;}}
go through different drum patterns that drummers practice and bundle them into arduino code
go through free software file formats/mechanisms for recording and mixing sounds that can capture (store in a file on hard drive) what this beat bearing synthesizer creates ... figure out what data captured by the program running in the arduino that controls the interface can be stored ... see if it can be translated into an open source format (intro class)
Write sample code to use the midi buttons to stop and start a song (intro class)
Processing use of the LCD monitor (intro class)
Papilio FPGA use LCD monitor (enes-245)
Papilio interface to beat bearing board (enes-245)
Papilio serial interface to arduino (enes-245)
Write arduino code to cycle through all drum possibilities using the midi shield buttons to stop and start moving through the possibilities
Write arduino code to using the midi shield pots to change tempo
Write arduino code to send signals to processing through usb cable