Java & JMusic

 

Created 2011:

During my 1st year studying Media Programming, learning the basics of the Java language was foundational. We would practice different coding each week so we would become familiar with inputting data, why we were inputting it, what to expect and also how to troubleshoot errors we come across. Below I have taken screenshots of the three projects that made up part of our end term. The projects were a mixture of sound, using JMusic library, and user input. Click on the images below to see my work and explanation of specific segments of code.

Project 1: Within this project, I wrote a programme which used arrays, phrases, parts and scores to give a midi output. As seen in the image I first declare my variables. Phrase then sets the time I want the melody to begin. Part sets the instruments and channels I wish to use. Ultimately these all go to aScore. During this process I add modifications to each part to display what Jmusic is capable of.

Project 1 Source Code

Project 1 Source Code section


Project 2: In this second project, we once again used JMusic but this time we were to integrate a menu using JOptionPane.showInputDialog. When the user ran the programme, a menu would appear display options to select from. Depending on which number was selected, it would run this process. This programme was written to upload files and preform the task selected at the menu.

Project 2 Source Code Section

Project 2 Source Code Section

Project 2 Source Code Section

Project 2 Source Code Section

 

 

 

 

 


Project 3: Within this programme, a menu will appear to the user which will display a few options for them. The difference with this programme is that I imported a scanner. This means that Java will read the text files I have saved along with the programme and will calculate the outputs based on these text files.

Project 3 Source Code Section a

Project 3 Source Code Section a

Project 3 Source Code Section b

Project 3 Source Code Section b

 

 

 

 

 

Project 3 Source Code Section c

Project 3 Source Code Section c

Leave a comment