morse

package
v0.0.0-...-9db22e1 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Alphabet = map[string]string{
	"A": ".-",
	"B": "-...",
	"C": "-.-.",
	"D": "-..",
	"E": ".",
	"F": "..-.",
	"G": "--.",
	"H": "....",
	"I": "..",
	"J": ".---",
	"K": "-.-",
	"L": ".-..",
	"M": "--",
	"N": "-.",
	"O": "---",
	"P": ".--.",
	"Q": "--.-",
	"R": ".-.",
	"S": "...",
	"T": "-",
	"U": "..-",
	"V": "...-",
	"W": ".--",
	"X": "-..-",
	"Y": "-.--",
	"Z": "--..",
	"1": ".----",
	"2": "..---",
	"3": "...--",
	"4": "....-",
	"5": ".....",
	"6": "-....",
	"7": "--...",
	"8": "---..",
	"9": "----.",
	"0": "-----",
	" ": "/",
}
View Source
var ReverseAlphabet = map[string]string{}

Functions

func GetBufferFromEntry

func GetBufferFromEntry(entry *gtk.Entry) *gtk.EntryBuffer

func GetBufferFromTview

func GetBufferFromTview(tv *gtk.TextView) *gtk.TextBuffer

func GetTextFromEntry

func GetTextFromEntry(entry *gtk.Entry) string

func GetTextFromTview

func GetTextFromTview(tv *gtk.TextView) string

func MorseToSound

func MorseToSound(morseSequence string, c *oto.Context, p *oto.Player)

func Play

func Play(p *oto.Player, freq float64, duration time.Duration) error

func RunLong

func RunLong(c *oto.Player) error

func RunShort

func RunShort(c *oto.Player) error

func SetGridOptions

func SetGridOptions(g *gtk.Grid)

func SetWindowOptions

func SetWindowOptions(w *gtk.Window)

func SetupBox

func SetupBox(orient gtk.Orientation) *gtk.Box

func SetupButton

func SetupButton(label string, onClick func()) *gtk.Button

func SetupTview

func SetupTview() *gtk.TextView

func SleepLong

func SleepLong()

func SleepShort

func SleepShort()

func TranslateFromMorse

func TranslateFromMorse(morseSequence string) string

func TranslateToMorse

func TranslateToMorse(text string) string

Types

type SineWave

type SineWave struct {
	// contains filtered or unexported fields
}

func NewSineWave

func NewSineWave(freq float64, duration time.Duration) *SineWave

func (*SineWave) Read

func (s *SineWave) Read(buf []byte) (int, error)

Jump to

Keyboard shortcuts

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