Minggu, 15 Januari 2012

Our Prototype


import for make java desktop aplication.
import org.jdesktop.application.Action;
import org.jdesktop.application.Application;
import org.jdesktop.application.SingleFrameApplication;


 application main class .

public class FP_MatdisApp extends SingleFrameApplication {

   
code for draw frame in startup.
    
    @Override protected void startup() {
        show(new FP_MatdisView(this));
    }

    @Override protected void configureWindow (java.awt.Window root) {
    }
    public static FP_MatdisApp getApplication() {
        return Application.getInstance(FP_MatdisApp.class);
    }

Main class.
    public static void main(String[] args) {
        launch(FP_MatdisApp.class, args);
    }

Method for show  tips1.
    @Action
    public void showtips() {
        Tips1 a = new Tips1();
        a.Tips_1();
    }

Method for show menu “tips”
    @Action
    public void showmenu_tips() {
        Menu_Tips a = new Menu_Tips();
        a.MenuTips();
    }

Method to show the ilustration of “nyanyi” menu and “belajar” menu .
    @Action
    public void ilustrasi_nyanyi() {
        ilustrasi a = new ilustrasi ();
        a.ilustrasi();
    }
   
Method to show Option menu.
    @Action
    public void showoption() {
        Option a = new Option();
        a.Option();
    }
   
}

Class FP_MatdisView.java

main class for main menu frame
public class FP_MatdisView extends FrameView {
               
default frame code from netbeans.
    public FP_MatdisView(SingleFrameApplication app){...}

initialization of class ilustrasi.java
ilustrasi a = new ilustrasi ();

Command when “nyanyi” button is clicked.
private void nyanyiActionPerformed (java.awt.event.ActionEvent evt) {                                      
        a.ilustrasi();
}                                     

Command when “keluar” button is clicked.
private void keluarActionPerformed (java.awt.event.ActionEvent evt) {                                      
        System.exit(0);
}                                     



Class Gambar.java

import java.awt.Color;
import java.awt.Graphics;

public class Gambar {
   
method for draw two line.
    void garis (Graphics gbr){
        gbr.drawLine(20, 35, 495, 35);
        gbr.drawLine(20, 165, 495, 165);
    }
 
This method used to paint an ilustration not . this method is intergrated with “Gambar Not” button
    void paintNot(Graphics gbr){
       
drawrect used to draw a rectangle without fill.           
        for (int i=0; i<=2;i++)
        gbr.drawRect(50+(i*15), 135, 10, 10);
   
        for (int i=0; i<=1;i++)
        gbr.drawRect(110+(i*15), 85, 10, 10);
   
        for (int i=0; i<=3;i++)
        gbr.drawRect(155+(i*15), 105, 10, 10);
   
        for (int i=0; i<=2;i++)
        gbr.drawRect(230+(i*15), 85, 10, 10);
   
        for (int i=0; i<=3;i++)
        gbr.drawRect(290+(i*15), 65, 10, 10);
       
        for (int i=0; i<=4;i++)
        gbr.drawRect(365+(i*15), 105, 10, 10);
       
        for (int i=0; i<=1;i++)
        gbr.drawRect(455+(i*15), 135, 10, 10);
   
    }
   
Method for the ilustration while “mulai” button clicked
    void mainkan(Graphics gbr) throws InterruptedException{
   
setColor used to set rectangle color.
Fillrect used to draw filled rectangle.
Thread.sleep used to pause the thread for a while, according to specified time.
        for (int i=0; i<=2;i++){
            gbr.setColor(Color.green);
            gbr.fillRect(50+(i*15), 135, 10, 10);
            Thread.sleep(500);
        }
   
        for (int i=0; i<=1;i++){
            gbr.setColor(Color.red);
            gbr.fillRect(110+(i*15), 100, 10, 10);
            Thread.sleep(500);
        }
   
        for (int i=0; i<=1;i++){
            gbr.setColor(Color.yellow);
            gbr.fillRect(155+(i*15), 115, 10, 10);
            Thread.sleep(500);
        }
        for (int i=2; i<=3;i++){
            gbr.setColor(Color.green);
            gbr.fillRect(155+(i*15), 105, 10, 10);
            Thread.sleep(500);
        }
       
        for (int i=0; i<=2;i++){
            gbr.setColor(Color.red);
            gbr.fillRect(230+(i*15), 70, 10, 10);
            Thread.sleep(500);
        }
       
        for (int i=0; i<=3;i++){
            gbr.setColor(Color.green);
            gbr.fillRect(290+(i*15), 65, 10, 10);
            Thread.sleep(500);
        }
       
        for (int i=0; i<=1;i++){
            gbr.setColor(Color.red);
            gbr.fillRect(365+(i*15), 120, 10, 10);
            Thread.sleep(500);
        }
       
        for (int i=2; i<=2;i++){
            gbr.setColor(Color.yellow);
            gbr.fillRect(365+(i*15), 115, 10, 10);
            Thread.sleep(500);
        }
       
        for (int i=3; i<=4;i++){
            gbr.setColor(Color.green);
            gbr.fillRect(365+(i*15), 105, 10, 10);
            Thread.sleep(500);
        }
       
        for (int i=0; i<=1;i++){
            gbr.setColor(Color.green);
            gbr.fillRect(455+(i*15), 135, 10, 10);
            Thread.sleep(500);
        }
     }
}

Class Menu_Tips.java

This is method when pernafasan button is clicked,
Dispose() is used to close the menu_tips frame and run.Tips1() is code to open the Tips1 frame that contain information about “pernafasan”
private void pernafasanActionPerformed (java.awt.event.ActionEvent evt) {                                           
        dispose();
        Tips1 run = new Tips1();
        run.Tips_1();
    }                 
                       
This is method when artikulasi button is clicked,
Dispose() is used to close the menu_tips frame and run.Tips2() is code to open the Tips2 frame that contain information about “artikulasi”
 private void artikulasiActionPerformed(java.awt.event.ActionEvent evt) {                                          
            dispose();
            Tips2 run = new Tips2();
            run.Tips_2();
    }                                         
This is method to open MenuTips frame
    public void MenuTips(){
       Menu_Tips run = new Menu_Tips();
       run.setAlwaysOnTop(true);
       run.setVisible(true);
    }

Abstract


Singing is a hobby for most people. However, singing hobby does not guarantee that the person will be able to sing well and correctly in accordance with the basic techniques of singing.

“Learn to Sing” is an application that developed to meet the needs of some people who can not attend to vocal class because they don’t have much spare time, or money to cover the class cost. It also can be an alternative solutions of entertainment for the family, so they don’t have to spend a lot of money to go to karaoke.

This application can be run on PCs, notebooks, and tablet PCs so it can help users to learn singing independently through exercise and also tips and tricks which is featured in the application. The output of this application is a graphical bar which have different colors, namely green, yellow, and red. The graph’s colors indicate the accuracy of the user’s tones compare to the standard tones of the song.

By using this application, the users will know in which part of the song they made mistake, and than learn to work that out. the application is fun and easy to use, so it can motivate the users to learn more, and encourage people’s interest toward the “music world”.