plectrum

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit e780e6948a79b548c3b73188f8fe22de53ee709c
parent f0be3654374b4a75a2ffe67d0172a1eaddc48394
Author: siiky <siiky@users.noreply.github.com>
Date:   Sun,  7 Jun 2020 16:41:42 +0100

Add Bass CGCF Tuning

Diffstat:
Aapp/src/main/java/com/github/cythara/tuning/BassCGCFTuning.java | 58++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 58 insertions(+), 0 deletions(-)

diff --git a/app/src/main/java/com/github/cythara/tuning/BassCGCFTuning.java b/app/src/main/java/com/github/cythara/tuning/BassCGCFTuning.java @@ -0,0 +1,58 @@ +package com.github.cythara.tuning; + +import com.github.cythara.Note; +import com.github.cythara.NoteName; +import com.github.cythara.Tuning; + +import static com.github.cythara.NoteName.*; + +public class BassCGCFTuning implements Tuning { + + @Override + public Note[] getNotes() { + return Pitch.values(); + } + + @Override + public Note findNote(String name) { + return Pitch.valueOf(name); + } + + private enum Pitch implements Note { + + C1(C, 1, 32.7), + G1(G, 1, 49), + C2(C, 2, 65.41), + F2(F, 2, 87.31); + + private final String sign; + private final int octave; + private final float frequency; + private NoteName name; + + Pitch(NoteName name, int octave, float frequency) { + this.name = name; + this.octave = octave; + this.sign = ""; + this.frequency = frequency; + } + + public NoteName getName() { + return name; + } + + public float getFrequency() { + return frequency; + } + + @Override + public int getOctave() { + return octave; + } + + @Override + public String getSign() { + return sign; + } + } +}