mirror of
https://github.com/vsariola/sointu.git
synced 2025-07-23 15:34:52 -04:00
feat(tracker): implement basic tracker keys
This commit is contained in:
@ -19,6 +19,7 @@ var notes = []string{
|
||||
"B-",
|
||||
}
|
||||
|
||||
// valueAsNote returns the textual representation of a note value
|
||||
func valueAsNote(val byte) string {
|
||||
octave := (val - baseNote) / 12
|
||||
oNote := (val - baseNote) % 12
|
||||
@ -27,3 +28,8 @@ func valueAsNote(val byte) string {
|
||||
}
|
||||
return fmt.Sprintf("%s%d", notes[oNote], octave)
|
||||
}
|
||||
|
||||
// noteValue return the note value for a particular note and octave combination
|
||||
func getNoteValue(octave, note byte) byte {
|
||||
return baseNote + (octave * 12) + note
|
||||
}
|
||||
|
Reference in New Issue
Block a user