pres

34
CombinoChord: Project Defense CombinoChord Graduate Research Project Defense Nicholas Smith CPSC 597 | California State University Fullerton 1/34

Transcript of pres

Page 1: pres

CombinoChord: Project Defense

CombinoChordGraduate Research Project Defense

Nicholas Smith

CPSC 597 | California State University Fullerton 1/34

Page 2: pres

CombinoChord: Project Defense

Outline

IntroductionThe ProblemObjectivesSignificanceRelated ResearchAssumptions

MethodologyHeuristicFretboard ModelHand ModelSound QualityPre-Processing

FilteringMulti-ThreadingAndroidResultsAnalysis

Summary

CPSC 597 | California State University Fullerton 2/34

Page 3: pres

CombinoChord: Project Defense

Introduction

• Project Overview

• Key Terms:

– Guitar: A Stringed Instrument

– Guitar Strings & Fretboard

– Fret position

CPSC 597 | California State University Fullerton 3/34

Page 4: pres

CombinoChord: Project Defense

Figure 1: An Electric Guitar

CPSC 597 | California State University Fullerton 4/34

Page 5: pres

CombinoChord: Project Defense

The Problem

Generate guitar chords based on the following parameters:

• The number of strings

• The number of frets

• The tuning of the strings

• The guitar setup

• The player’s hand

• The chord to play

CPSC 597 | California State University Fullerton 5/34

Page 6: pres

CombinoChord: Project Defense

Objectives

Goals for the system:

• Search for chords within 5 seconds for normal guitar configurations

• Use guitar tablature notation

• Conventional fingerings should be assigned a high score

CPSC 597 | California State University Fullerton 6/34

Page 7: pres

CombinoChord: Project Defense

Significance

Non-triviality:

• Guitar layout

• Definition of “goodness”

Brute force is unsatisfactory for two primary reasons:

1. There are a large number of possibilities

2. Most possibilities are undesirable

CPSC 597 | California State University Fullerton 7/34

Page 8: pres

CombinoChord: Project Defense

Significance

Brute force approach:

4∑i=0

[2i ×i−1∏j=0

(n− j)] = 16n4 − 88n3 + 156n2 − 82n + 1

Where n = s × f is the number of fret positions on the guitar, s is thenumber of strings on the guitar, and f is the number of frets.

CPSC 597 | California State University Fullerton 8/34

Page 9: pres

CombinoChord: Project Defense

Significance

Example for acoustic guitar:

4∑i=0

[2i ×i−1∏j=0

(120− j)] ≈ 3.17× 109.

CPSC 597 | California State University Fullerton 9/34

Page 10: pres

CombinoChord: Project Defense

Related Research

• Two similar papers:

– Graph theory based approach: Norman and Grozman fromKTH Royal Institute of Technology [2]

– Evolutionary based approach: Tuohy and Potter from UGA [3]

• Similar Android apps

CPSC 597 | California State University Fullerton 10/34

Page 11: pres

CombinoChord: Project Defense

Existing Solutions• Existing apps use static databases

• Drawbacks:

1. Cannot adapt to guitar tuning

2. Cannot adapt to guitar configuration

3. Cannot adapt to the user’s hand

4. Chord ordering is fixed

5. Substantial upfront work

CPSC 597 | California State University Fullerton 11/34

Page 12: pres

CombinoChord: Project Defense

Existing Solutions

• CombinoChord :

1. Can adapt to guitar tuning

2. Can adapt to guitar configuration

3. Can adapt to the user’s hand

4. Chord ordering is not fixed

5. No upfront work (besides mine)

CPSC 597 | California State University Fullerton 12/34

Page 13: pres

CombinoChord: Project Defense

Assumptions

• Thumb is not considered

• Only runs on Android

• Core can run on JVM

CPSC 597 | California State University Fullerton 13/34

Page 14: pres

CombinoChord: Project Defense

MethodologyOverview:

• Notation

• Heuristic Function

• Fretboard Model

• Hand Model

• Sound Quality

• Preprocessing

• Filtering

• Multi-threading

• Android Programming

• Results

• Analysis

CPSC 597 | California State University Fullerton 14/34

Page 15: pres

CombinoChord: Project Defense

Heuristic

Define a heuristic function that considers:

1. Anatomical distance-based score

2. Sound quality score

CPSC 597 | California State University Fullerton 15/34

Page 16: pres

CombinoChord: Project Defense

Fretboard Model

• Define fretboard in R2

• Given first fret size, compute size of other frets

• Distance between strings

• Use euclidean distance ‖p‖

CPSC 597 | California State University Fullerton 16/34

Page 17: pres

CombinoChord: Project Defense

Hand Model

Input table of max and min comfortable range values:

Finger 1 Finger 2 Min Range (mm) Max Range (mm)1 2 5.0 80.01 3 15.0 95.01 4 25.0 110.02 3 6.0 52.02 4 12.0 69.03 4 8.5 47.0

CPSC 597 | California State University Fullerton 17/34

Page 18: pres

CombinoChord: Project Defense

Hand Model

Use a score function:

SF (x, a, b) =

1 + (x− 0.99a)3 x < a

1− ((x− 0.99a)/(1.01b− 0.99a))2 x ≥ a.

Where a and b are the min and max range values for the pair of fingersrespectively, and x is the distance between the pair of fingers.

CPSC 597 | California State University Fullerton 18/34

Page 19: pres

CombinoChord: Project Defense

20 40 60 80

0.5

1

x

y

Figure 2: Plot of SF

CPSC 597 | California State University Fullerton 19/34

Page 20: pres

CombinoChord: Project Defense

Hand Model

• Average SF over all pairs used

• Use best choice of fingers

• Only need to consider case where fingers don’t cross

• For 3: {1, 2, 3}, {1, 2, 4}, {1, 3, 4}, {2, 3, 4}

CPSC 597 | California State University Fullerton 20/34

Page 21: pres

CombinoChord: Project Defense

Sound Quality

• Unison notes

• Number of mutes

• Number of strings played

CPSC 597 | California State University Fullerton 21/34

Page 22: pres

CombinoChord: Project Defense

Pre-Processing

• Only consider fret-positions that produce notes in chord

• Drastically reduces size of state space

• CM7 on an acoustic:

4∑i=0

[2i ×i−1∏j=0

(46− j)] ≈ 6.34× 107.

CPSC 597 | California State University Fullerton 22/34

Page 23: pres

CombinoChord: Project Defense

Filtering

Idea: At each step we can filter possible fret positions

• Fret positions on same string

• Fret positions out of reach

• ‖pi − pj‖ > MAX

• Fret positions beneath tonic note

CPSC 597 | California State University Fullerton 23/34

Page 24: pres

CombinoChord: Project Defense

Multi-Threading

Multi-thread the search:

• Sub-tasks based on tonics

• Split ordered list into t parts

• Card dealing method

• Thread pool approach

CPSC 597 | California State University Fullerton 24/34

Page 25: pres

CombinoChord: Project Defense

150 200 2500

20

40

60

80

n

Avg.

Search

Time(m

s)

2 Threads

Thread PoolShuffledOrdered

150 200 2500

20

40

60

n

Avg.

Search

Time(m

s)

4 Threads

Thread PoolShuffledOrdered

CPSC 597 | California State University Fullerton 25/34

Page 26: pres

CombinoChord: Project Defense

Android• Two packages:

– UI

– domain (to be made open source)

• UI:

– 7 Fragments

– Controlled by main activity

– Searching runs in background

CPSC 597 | California State University Fullerton 26/34

Page 27: pres

CombinoChord: Project Defense

(a) Home Fragment (b) Guitar Fragment

CPSC 597 | California State University Fullerton 27/34

Page 28: pres

CombinoChord: Project Defense

(a) Tuning Fragment (b) Hand Fragment

CPSC 597 | California State University Fullerton 28/34

Page 29: pres

CombinoChord: Project Defense

(a) Chord Fragment (b) Advanced Fragment

CPSC 597 | California State University Fullerton 29/34

Page 30: pres

CombinoChord: Project Defense

(a) About Fragment (b) Navigation Drawer

CPSC 597 | California State University Fullerton 30/34

Page 31: pres

CombinoChord: Project Defense

Results

#Strings # Frets Avg. Search Time Std. Search Time6 12 28.46 ms 19.52 ms6 20 74.80 ms 41.86 ms7 12 61.08 ms 51.22 ms7 20 127.63 ms 53.55 ms8 12 83.08 ms 51.32 ms8 20 261.46 ms 161.73 ms

CPSC 597 | California State University Fullerton 31/34

Page 32: pres

CombinoChord: Project Defense

Analysis

• Times well within goal

• Less than Doherty threshold (400ms) for normal guitars [1]

CPSC 597 | California State University Fullerton 32/34

Page 33: pres

CombinoChord: Project Defense

Summary

CombinoChord :

• Finds chords well within timing constraints

• Presents guitar tablature notation

• Allows modification of specified parameters

CPSC 597 | California State University Fullerton 33/34

Page 34: pres

CombinoChord: Project Defense

References

[1] Doherty, Walter J. and Arvind J. Thadhani. "The economic value ofrapid response time." IBM Report (1982)

[2] Vladimir Grozman, and Christopher Norman An Algorithm for OptimalGuitar Fingering. KTH Royal Institue of Technology, 2013

[3] D.R. Tuohy and W.D. Potter A Genetic Algorithm for the AutomaticGeneration of Playable Guitar Tablature. Proceedings of the Inter-national Computer Music Conference. Artificial Intelligence Center,University of Georgia Athens, 2005

CPSC 597 | California State University Fullerton 34/34