Documentation
¶
Overview ¶
internal/models/tab.go
Index ¶
Constants ¶
View Source
const MeasureLength = 16 // Characters per measure
Helper methods for Tab
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PlaybackState ¶
type SessionState ¶
type SessionState struct {
CurrentTab *Tab
CursorPos Position
ViewMode ViewMode
PlaybackState PlaybackState
EditMode EditMode
}
type Tab ¶
type Tab struct {
ID int `json:"id" db:"id"`
Name string `json:"name" db:"name"`
Artist string `json:"artist" db:"artist"`
Content [6]string `json:"content" db:"content"` // 6 strings - now supports variable length
Tuning [6]string `json:"tuning" db:"tuning"` // E A D G B e
Tempo int `json:"tempo" db:"tempo"`
TimeSignature string `json:"time_signature" db:"time_signature"`
Measures int `json:"measures" db:"measures"` // Number of measures
CreatedAt time.Time `json:"created_at" db:"created_at"`
UpdatedAt time.Time `json:"updated_at" db:"updated_at"`
}
func NewEmptyTab ¶
func NewTestTab ¶
NewTestTab creates a tab with some sample notes for testing
func (*Tab) GetMeasureCount ¶
GetMeasureCount returns the number of measures based on content length
func (*Tab) GetTotalLength ¶
GetTotalLength returns the total number of positions in the tab
func (*Tab) RemoveMeasure ¶
func (t *Tab) RemoveMeasure()
RemoveMeasure removes the last measure from the tab
Click to show internal directories.
Click to hide internal directories.