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
View Source
const TimeLinePositionLatency = TimeLinePosition + NoteSPS*(MicrophoneBufferLength/MicrophoneSampleRate+0.02)
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 ¶
func (Song) ParseNotes ¶
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.
Click to show internal directories.
Click to hide internal directories.