Beyond Spectrum Music game project Team member: Class - - PowerPoint PPT Presentation

beyond spectrum
SMART_READER_LITE
LIVE PREVIEW

Beyond Spectrum Music game project Team member: Class - - PowerPoint PPT Presentation

Project Presentation Beyond Spectrum Music game project Team member: Class F1603020 Date 2017.06.01 01 Introduction 02 View CONTENTS Controller 03 Model


slide-1
SLIDE 1

Project Presentation

Beyond Spectrum

Music game project Team member:韩宇杰、郭含熙、蔡凯帆、金超 Date:2017.06.01 Class:F1603020

slide-2
SLIDE 2

CONTENTS

01 Introduction 韩宇杰 02 View

郭含熙

03 04

Controller 蔡凯帆 Model 金超

slide-3
SLIDE 3

INTRODUCTION

02

Beyond Spectrum is a music game that enables you to play with your own songs.  Maps are generated according to the music file.  Every single play is different from each other though they uses the same song.  Variable colors form a spectrum-like interface.  Can be used as a music player.

slide-4
SLIDE 4

CONTENTS

01 Introduction 韩宇杰 02 View

郭含熙

03 04

Controller 蔡凯帆 Model 金超

slide-5
SLIDE 5

PART 02

View

03

slide-6
SLIDE 6

View textView ListView

04

Button

slide-7
SLIDE 7

View Create the view Change the color of buttons

05

slide-8
SLIDE 8

View

01 02 06

Create the view(in .xml file)

Six for user’s touch, Six for animation

Create 12 buttons Create a progress Bar

To show the left time

03

Two for the score, one for the preparing stage

Create 3 textviews

slide-9
SLIDE 9

View

07

Change the color of buttons

  • 1. Determine the range of the color.
  • 2. Use Math.random() to create integer number
  • 3. Transform this int number to hexadecimal String
  • 4. Create hex code.

btn.setBackgroundColor(Color.parseColor(“#”+Integer.toHexSt ring(-random-plus[0])))

  • 5. Create another 5 random color.
  • 6. Use setBackGroundColor() to set the color of buttons.

Use setButtonColor() function

slide-10
SLIDE 10

CONTENTS

01 Introduction 韩宇杰 02 View

郭含熙

03 04

Controller 蔡凯帆 Model 金超

slide-11
SLIDE 11

PART 03

Controller

10

slide-12
SLIDE 12

Controller Create Animation Set OnClickListener

11

Set Property of ProgressBar

slide-13
SLIDE 13

Controller

01 02 12

Create Animation of the View

btn1=(Button)findViewById(R.id.button);

Save the view as a variable Use ObjectAnimator to create Animation

ObjectAnimator heightAnimator=ObjectAnimator.ofFloat(btn,"y",100f,900f) .setDuration(3000);

slide-14
SLIDE 14

Controller

01 02 13

Set OnClickListener of Button

(set command when button is clicked) Use animation to create cartoons of the button.

Command one: Command two:

Count the score. Get the height of bar. Then calculate the score to show on the TextView.

slide-15
SLIDE 15

Controller

01 02 14

Set property of the ProgressBar

Get the data of time. Then change it into the progress to show on the ProgressBar. if(pb.getVisibility()==View.GONE) pb.setVisibility(View.VISIBLE); pb.setProgress(newProgress);

Show the progress of the song Give the end sign

When progress is 100, the game is over, then it will show the mark “game over” Return content

slide-16
SLIDE 16

CONTENTS

01 Introduction 韩宇杰 02 View

郭含熙

03 04

Controller 蔡凯帆 Model 金超

slide-17
SLIDE 17

PART 04

Model

15

slide-18
SLIDE 18

Model

Decode the file Fetch the data Find the beats 16

Structure

slide-19
SLIDE 19

Model

17

Decode the file

Use Audio Decoder jmp123 to decode the mp3 file.

slide-20
SLIDE 20

Model

01 02 18

Fetch the data

float v[][] = new float[b.length/4/1000+1][1000];

Create a two-dimensional array Change byte data to float data and save them in the array

v[i][j] = Float.intBitsToFloat(getInt(b, index));

slide-21
SLIDE 21

Model

01 02 19

Find the beats

public class Beat { public float time; public float average; }

Create a class which can save the time and average volume of a beat Create a Beat array to save the beats

Beat beats[] = new Beat[v.length];

slide-22
SLIDE 22

Model

03 20

Find the beats

for (i = 0; i < v.length; ++i) { beat.detect(v[i]); if (beat.isOnset()) { beats[k].time = i*1000/44100; sum = 0.0; for (j = 0; j < v[i].length; ++j) sum += v[i][j]; beats[k].average = sum/v[i].length; ++k; } }

Use the library Minim to judge when beats occur in the music and save them.

slide-23
SLIDE 23

THANK YOU FOR YOUR LISTENING