Skip to main content
留学咨询

辅导案例-INFO1113 -Assignment 3

By May 15, 2020No Comments

INFO1113 1 of 7 INFO1113 Assignment 3 Due: Friday 29 May, 11:59PM AEST This assignment is worth 12% of your final assessment Task Description You are working for a company called NewMusic which creates music production and playback software. The company is currently developing a new music production software called Forte. Forte is a simple DAW (music notation software) where the user enters notes onto a piano roll and can listen to the midi playback of their creation. You have been given the task of developing a prototype of the software. You will need to implement the piano roll, cursor, play button and stop button. Additional requirements will be released after your milestone submission. An artist has created a simple demonstration of the game and has posted it on your online forum (Ed). They have also provided design documents as to the layout of the user interface. Use these to help layout your entities and develop the software. Working on your assignment You have been given a scaffold which will help you get started with this assignment. You can download the scaffold onto your own computer and invoke gradle build to compile and resolve dependencies. You will be using the Processing library within your project to allow you to create a window and draw graphics. You can access the documentation from the following link. For the sound playback, you will be using the javax sound midi library. You can access the documentation for the library here. INFO1113 2 of 7 Mechanics The project contains a number of UI elements that will need to be implemented within your application. Piano Roll For a sample piano roll, see here. This is a standard octave within a keyboard. The leftmost key (white rectangle) is C, and the rightmost key is the C above it. Going through every key (both white and black), this keyboard has notes C, C#, D, D#, E, F, F#, G, G#, A, A#, B, C. To try out a virtual piano see here. The keyboard used in this piano roll has bottom note C4 and top note C5 (the numbers denote which octave the key is in). C4 approximately equates to a frequency of 261.63Hz and C5 to 523.25Hz. To see the corresponding MIDI values, see here. The piano roll is made up of 4 bars (identified by the bright vertical lines with large numbers above). Each bar is subdivided into 4 beats (the slightly darker lines with x.y above them, denoting bar.beat). Each beat is also then subdivided into two quavers (the thinnest line). Each block has the length of a single quaver. A block can either be active (as seen in image below), or inactive (as seen in image above). As a block represents an individual quaver, each note has 32 blocks in its line (4 bars x 4 beats x 2 quavers = 32). INFO1113 3 of 7 All blocks are inactive when the program starts. A block is activated/deactivated when the user clicks on it. When deactivated, the block is invisible. When active, the block has the block sprite rendered (found in the resources folder). There is no restriction on how many (or how few) blocks are activated at any one time, allowing for the possibility of chords as seen in the image below. Cursor The cursor keeps track of the current beat. The cursor is made up of the pointer sprite in resources as well as a red vertical line extending from the tip of the cursor to the bottom of the window. The cursor begins stationary on the left side of the piano roll. When active, the cursor moves at a constant speed to right. When it reaches an activated block in the piano roll (while in playback mode), the block’s pitch is played on the midi synthesizer. When the cursor leaves the block, the pitch is stopped. Once the cursor reaches the end of the piano roll (after playing the second quaver in the fourth beat of the fourth bar), the cursor resets to the beginning of the piano roll and continues moving until either the pause or the stop button is pressed. The default tempo for playback is 120BPM (beats per minute), which is the same as 2 beats per second. When playback is paused, the cursor stops in its place (as seen in image below): INFO1113 4 of 7 Play Button The play button is part of the menu bar at the top of the program. The play button controls playback of the piano roll. When initially clicked, it sets the cursor to active (putting the program into playback mode). While in playback mode, the button has the pause sprite rendered. When the button is clicked while in playback mode, the program changes to edit. The cursor stops in its place, all sound stops, and the button’s sprite changes to play. Stop Button The stop button is used to end playback mode and reset the cursor to the beginning of the track. If the program is in edit mode, the stop button simply resets the cursor to the beginning of the track. The stop button resides to the right of the play button in the menu bar and has the stop sprite. INFO1113 5 of 7 Application Your application will need to adhere to the following specification • The window must have 540 width, 335 height. • Must maintain a frame rate of 60 frames per second. • Your application must be able to compile and run on any the university lab machines (or Ubuntu VM) using gradle build & gradle run. Failure to do so, will result in 0% for Final Code Submission. • Your program must not exhibit any memory leak. • You must use the processing library, you cannot use any other framework such as javafx, awt or jogl. • The default Midi instrument is Grand Piano Assets Artists within the company have produced sprites for your game. You have been provided a /resources folder which your code access directly. These assets are loadable using the loadImage method attached the PApplet type. Please refer to the processing documentation when loading and drawing an image. Marking Criteria (12%) Your final submission is due on Friday 29 May at 11:59PM. To submit, you must submit your build.gradle file and src folder to Ed (by pressing MARK) and your report to Canvas. Final Code Submission (4%) You will need to have implemented and satisfied requirements listed in this assignment. Make sure you have addressed the following and any other requirements outlined previously. • Window launches and shows background • Start and stop buttons are rendered • Cursor is rendered • Piano roll aligns with background • Blocks within the piano roll can be activated and deactivated • The Play Button displays a pause icon when activated • When the play button is activated, the cursor moves from its current position at a speed equivalent to 120 beats per minute • When the cursor is on an active block and the play button is active, the correct pitch is played • When the cursor leaves an active block or the play button is no longer active, the pitch stops • Clicking the Stop Button de-activates the Play Button and resets the cursor to the beginning • When the cursor reaches the end of the piano roll it loops back to the beginning and continues going. • Ensure that your application does not repeat large sections of logic • Ensure that your application code exhibits good Object Oriented principles • Additional requirements will be announced after the milestone deadline which will need to be implemented INFO1113 6 of 7 Milestone (1%) To ensure progress has been made within on your project, you will need to submit a working submission of your project by Monday 11 May by 11:59pm AEST. You should achieve the following as a minimum: • Play Button and Stop Button are rendered • At least one note implemented (with at least 4 blocks) • Blocks can be activated and deactivated • Cursor is rendered and movable • Pitch plays when cursor enters block Note that marks for this component will be returned after the final due date. However, if you attend your scheduled lab in week 11, your tutor will be able to provide you feedback. Test Cases (4%) During development of your code, add test cases to your project and test as much functionality as possible.
You will need to construct unit test cases within the src/test folder. To test the state of your entities without drawing, implement a simple loop that will update the state of each object but not draw the entity. Ensure your test cases cover over 90% of execution paths (Use jacoco in your gradle build) Ensure your test cases cover common cases. Ensure your test cases cover edge cases. Each test case must contain a brief comment explaining what it is testing. Report and Javadoc (2%) You will need to submit a report that elaborates on how object oriented design principles have been used. This will include a UML diagram, an explanation of any object oriented design decisions made (such as reasons for interfaces, class hierarchy, etc) and an explanation of how the extension has been implemented. This should be no longer than 500 words. This report will be submitted through Canvas. Your code should be clear, well commented and concise, try not to repeat yourself and utilise OOP constructs within your application. The code should follow the conventions set out by the Google Java Style Guide. As part of your comments, you will need to create a Javadoc for your program. This will be properly covered in week 12 but the relevant Oracle documentation can be found here. Extension (1%) You have the choice of either adding one of the listed features to the program or creating your own feature (must first be approved by tutor or TA). • Button that adds additional piano rolls below for more instruments (modification of window size is permitted) • Buttons to change instruments and change tempo (must implement both for full extension marks) • Ability to export to a playable Midi file • An additional drum line on the bottom • Ability to join consecutive blocks together to produce a longer sound • Undo/Redo buttons Warning Any attempts to deceive or disrupt the marking system will result in an immediate zero for the entire assignment. Negative marks can be assigned if you do not properly follow the assignment specification, or your code is unnecessarily or deliberately obfuscated. INFO1113 7 of 7 Academic declaration By submitting this assignment you declare the following: I declare that I have read and understood the University of Sydney Student Plagiarism: Coursework Policy and Procedure, and except where specifically acknowledged, the work contained in this assignment/project is my own work, and has not been copied from other sources or been previously submitted for award or assessment. I understand that failure to comply with the Student Plagiarism: Coursework Policy and Procedure can lead to severe penalties as outlined under Chapter 8 of the University of Sydney By-Law 1999 (as amended). These penalties may be imposed in cases where any significant portion of my submitted work has been copied without proper acknowledgment from other sources, including published works, the Internet, existing programs, the work of other students, or work previously submitted for other awards or assessments. I realise that I may be asked to identify those portions of the work contributed by me and required to demonstrate my knowledge of the relevant material by answering oral questions or by undertaking supplementary work, either written or in the laboratory, in order to arrive at the final assessment mark. I acknowledge that the School of Computer Science, in assessing this assignment, may reproduce it entirely, may provide a copy to another member of faculty, and/or communicate a copy of this assignment to a plagiarism checking service or in-house computer program, and that a copy of the assignment may be maintained by the service or the School of Computer Science for the purpose of future plagiarism checking.

admin

Author admin

More posts by admin