User:Jimahmud/Project 3

Copy this form to your user page.

Delete the italics (delete the two quote marks) when filling out this form.

Project Preference
Beat Bearing, Wireless Electricity, Lego

Problem Statement
''In one or two sentences, describe the project that your group will be working on. Identify what CDIO phase (Conceive, Design, Implement, or Operate) your group will complete in this project cycle.''

Project Plan
Briefly describe your group's plan for the next 4 weeks, including major tasks that will be completed each week.

Week 1 Narrative
My task for the week was to figure out a way to get users to be able to save their music on Audacity software. This is a very big step forward as compared to other beat bearing projects that have been done in the past. The past projects don't give avenue to be able to save music that has been created by users.Saving an Audacity project allows you to save unfinished work and re-open it later in Audacity exactly the way it was. All the edits and recorded/imported tracks will be preserved. This is a different process from using one of the Export commands in the File Menu. The Export feature creates an audio file like WAV or MP3. The Export feature on Audacity should be used whenever the user wants to hear his/her work in media players or to burn CDs, because no other programs can open Audacity project files. There is no need to save a project. If you don't, the necessary audio data is stored in the temporary folder specified in the Directories tab of Preferences until exiting the program, but it is always safe to save your projects because you can never trust software all the time. At that point, Audacity offers the choice of saving a project or not. Some benefits of saving a project:


 * No need to re-import or re-record files


 * Fast loading, even of multiple long tracks

Audio data is always preserved in loss-less quality. This is useful if you have already exported to a lossy audio format like MP3 but decide to edit the file further. Editing and re-exporting the project saves the additional quality loss of re-editing the exported MP3. When you save an Audacity project, it creates two items inside the folder you specified for the project: a data folder bearing the name of the project, containing its audio data (in the form of 1 MB-sized uncompressed .au files). an .aup project file bearing the same project name, which is merely a text file that references the data folder.

To re-open an audacity project, you go to File>Open.

'''Moving and renaming project files and folders '''

As the .aup file references the data folder, both must be kept together inside the same folder in which you created the project. If you want to move either the .aup file or the data folder, you must move both to the same new location. For the same reasons, you should not rename the data folder, even if you leave it in the same folder it was created in. If you want to rename an existing project, the safest way is to do it in Audacity. This creates a new .aup file and matching data folder with your chosen name:

Click File > Save Project As...

In the "Save Project As:" dialogue, enter the new name for the project in the "File name" box. Audacity will offer you the current name of the .aup file, so overwrite it with your new chosen name. Click the "Save" button.

To make a backup copy of a saved project, Click File > Save Project As....

In the "Save Project As" dialogue, enter the name for the backup copy of the project in the "File name" box. Audacity will offer you the current name of the .aup file, so overwrite it with the new name. It is recommended to include the date and time of the backup in the file name, without slashes, then click the save button.

Week 2 Narrative
MIDI Code: the message format

•  2 types of MIDI message bytes: the status byte and the data byte

•  Status bytes always begin with 1, and data bytes with 0. That leaves only

7 bits per byte to represent the message (128 possible values). •  MIDI messages begin with the status byte, where 3 bits (sss) are used to denote the type of message, and 4 bits (nnnn) to denote the channel number to which the message apply (max. 16 channels).

1 s s s n n n n 0 x x x x x x x 0 y y y y y y y Status Data 1 Data 2 1 byte MIDI Messages •  There are two main types of MIDI messages: channel and system

•  As their names indicate they are addressed to individual channels or the whole system (exception: “omni on” channel messages) Channel messages Message Status Data 1 Data 2

Note off 8n Note number Velocity

Note on 9n Note number Velocity

Polyphonic aftertouch An Note number Pressure Control change Bn Controller number Data Program change Cn Program number - Channel aftertouch Dn Pressure - Pitch wheel En LSbyte MSbyte •  MIDI channel numbers (n) are referred as 1 to 16, while in reality

they are represented by binary values 0 to 15 (0-F). •  Example: the status byte of a note off message for channel 7 is

“86” Note on / Note off (1) •  They make the bulk of the information commonly sent through a MIDI channel

•  “Note on” triggers a musical note, “note off” turns it off

•  All notes MUST be turned off (otherwise they’ll sound indefinitely) Message Status Data 1 Data 2 Note off 8n Note number Velocity Note on 9n Note number Velocity Note on / Note off (2)

•  There are 128 (0-127) possible note values (~10 octaves) mapped to the chromatic western music scale.

•  Commonly, middle C is mapped to MIDI’s C-3 (note number 60, 6th octave). Note on / Note off (3)

•  Note on messages are also associated to a “velocity” value, characterizing how hard the key was hit.

•  Note on velocity can be used to control volume and timbre of a sound (e.g. by controlling the scaling of an envelope generator)

•  The mapping between velocity and the parameter it controls is often logarithmic.

•  Note off velocity relates to the speed at which a note was released

•  It could be used to affect a sound, but it is not normally used. Note on / Note off (4)

•  Note on, velocity zero is equivalent to note off.

•  It is convenient when large amounts of data are sent to the MIDI bus (e.g. a high-polyphony chord)

•  Normally we will need 6 bytes for each note of a chord: [9n] [pitch][velocity] and [8n][pitch][velocity]

•  Instead we can clutter note on and off messages together: [9n] [pitch][vel][pitch][vel]…[pitch][vel]

•  This is known as running status

•  For a 4-note chord it means 17 bytes are transmitted rather than 24 bytes (assuming running status remains unchanged).

References:

Week 3 Narrative
My task for the week was to download all the software programs we need and see how they will function on the beat bearing. The first software is Processing and was downloaded from www.processing.org. The BeatBearing software was created in version 135; it should work fine with the latest version, but if you have problems, version 135 is recommended by the website. Next is the ProMIDI library for Processing from www.texone.org/promidi and the trial version of Ableton Live or Live LE from www.ableton.com. The ProMIDI library is important because the beat bearing will function as a MIDI synthesizer and as such needs processing in MIDI format to be able to function. Next was to analyze and figure out the sensing of the ball positioning and the visuals underneath (different colors when balls are placed on washers). This can be gotten from Processing which is included in the project bundle. This application reads the position of the bells, then creates the MIDI messages and visuals. The next step after this was to download and Launch Ableton Live (or another MIDI program or soft-synth which I haven't found yet) to generate the sound output. The free trial version of Ableton Live won't let you save settings, but you don't need this to run BeatBearing. On a Mac, configure the program to receive MIDI from Processing via the built-in IAC bus (inter-application communication). With Windows you should be able to route the MIDI using Virtual Audio Cable (www.ntonyx.com/vac), i will scrutinize this further this week. Initially Audacity was the software program of choice but Audacity didn't allow for import or export of MIDI formatted files, you could only convert the MIDI file to mp3 and see whether Audacity could read it or not. Next is to run the Processing program after the screen has been installed along with the board. No error messages should appear (according to processing.org), and the monitor should turn black with an array of gray dots and a sweeping red line. If the monitor turns gray, then Processing might not be connecting to the board. In this case, the recommendation is to check that all other Processing applications (shown as applets in the dock) are closed and then the board should be re-plugged in and tried again. The Beatbearing Processing code may need some tweaking to get things right. For example, I saw how the virtual grid would function with the real grid after everything had been put together and sometimes some lining up of the virtual grid with the real grid needs to be adjusted. The code has been commented to make modifications as easy as possible.

Week 4 Narrative
My task for the week was to have all the software programs downloaded and running and to do a quick design of what the final product will look like. The first software is Processing and was downloaded from www.processing.org. The BeatBearing software was created in version 135; it should work fine with the latest version, but if you have problems, version 135 is recommended by the website. Next is the ProMIDI library for Processing from www.texone.org/promidi and the trial version of Ableton Live or Live LE from www.ableton.com. The ProMIDI library is important because the beat bearing will function as a MIDI synthesizer and as such needs processing in MIDI format to be able to function. Next was to analyze and figure out the sensing of the ball positioning and the visuals underneath (different colors when balls are placed on washers). This can be gotten from Processing which is included in the project bundle. This application reads the position of the bells, then creates the MIDI messages and visuals. The next step after this was to download and Launch Ableton Live (or another MIDI program or soft-synth which I haven't found yet) to generate the sound output. The free trial version of Ableton Live won't let you save settings, but you don't need this to run BeatBearing. On a Mac, configure the program to receive MIDI from Processing via the built-in IAC bus (inter-application communication). With Windows you should be able to route the MIDI using Virtual Audio Cable (www.ntonyx.com/vac). Unfortunately i couldnt get Virtual Audio Cable because its costs 50 dollars and was out of our project budget. However, it functions similar to a cable and helps as a "middle man" that is like an interface between software and hardware. So in effect, when a ball is placed on the beat bearing washer, the VAC helps to transfer electricity and interprets it as sound. Ableton is the primary source of sound. It has musical instruments and helps the user to save their work for later use. Below is a rough sketch of the beat bearing and basically how it will look like.