feat(sointu, tracker,...): restructure domain & tracker models

send targets are now by ID and Song has "Score" part, which is the notes for it. also, moved the model part separate of the actual gioui dependend stuff.

sorry to my future self about the code bomb; ended up too far and did not find an easy way to rewrite the history to make the steps smaller, so in the end, just squashed everything.
This commit is contained in:
vsariola
2021-02-23 23:55:42 +02:00
parent fd1d018e82
commit adcf3ebce8
155 changed files with 5520 additions and 4914 deletions

View File

@ -19,8 +19,7 @@ var notes = []string{
"B-",
}
// valueAsNote returns the textual representation of a note value
func valueAsNote(val byte) string {
func NoteStr(val byte) string {
if val == 1 {
return "..." // hold
}
@ -38,7 +37,6 @@ 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 int) byte {
func NoteAsValue(octave, note int) byte {
return byte(baseNote + (octave * 12) + note)
}