config

package
v0.0.0-...-67e2934 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 2, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const BlackNoteWidth = 0.3
View Source
const BreathInterval = 0.05 // Pause between notes
View Source
const ConfigFileName = "config.yaml"
View Source
const MenuButtonHeight = 50.0
View Source
const MenuButtonMaxChars = 30
View Source
const MenuButtonWidth = 500.0
View Source
const MenuMaxItems = 10
View Source
const MenuVerticalSpacing = 25.0
View Source
const MicrophoneBufferLength = 11025 / 2
View Source
const MicrophoneSampleRate = 188200

Input tuning

View Source
const NoteRadius = 40
View Source
const NoteSPS = 0.15 // Note speed in screens per second
View Source
const ShowFingering = false
View Source
const TimeBeforeFirstNote = 2.0
View Source
const TimeLinePosition = 0.3 // Position of time line in screens from the left

We draw it more to the right, because you should blow earlier, audio input buffer takes time to fill and screen is not updated instanly (just 60 or 50 times per second)

View Source
const WhiteNoteWidth = 0.5

Variables

View Source
var BackgroundColor = colornames.Antiquewhite
View Source
var ButtonColor = colornames.White
View Source
var ButtonShadowColor = colornames.Darkgray
View Source
var ButtonTextColor = colornames.Black
View Source
var SelectionColor = colornames.Lightblue
View Source
var Songs []Song

Functions

This section is empty.

Types

type Song

type Song struct {
	Name  string `yaml:"name"`
	Notes string `yaml:"notes"`
}

func (Song) ParseNotes

func (s Song) ParseNotes(fullDuration float64) (song []notes.SongNote, err error)

bpm - beats per minute beat is a note in denominator of the time signature. Ex: in 4/4, 3/4 - beat is quarter note So duration of full note for /4 tempo is 60 / bpm * 4 = 240 / bpm. Ex, for 60 bpm - 4 seconds. 120 bpm - 2 seconds.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL