utilities

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2020 License: GPL-3.0 Imports: 3 Imported by: 1

Documentation

Overview

Package util provides a collection of utilities for dealing with Sounds, generating them, displaying them, calculating their samples etc...

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GuitarChord

func GuitarChord(chord string) s.Sound

GuitarChord converts a standard guitar representation (e.g. "2x0232") into the sound of those notes being played, assuming standard tuning.

func MidiToHz

func MidiToHz(midiNote int) float64

midiToHz returns the Hz of a given midi note.

func MidiToSound

func MidiToSound(midiNote int) s.Sound

MidiToSound converts a midi note into a sound that plays its pitch.

func ParseChord

func ParseChord(chord string, base uint) s.Sound

ParseChord converts a chord string (e.g. "G#sus4") and base octave into a Sound that contains the notes in the chord.

func ParseNotesToChord

func ParseNotesToChord(notes string, base uint) s.Sound

ParseNotesToChord takes a collection of notes (e.g. "CEG") plus the base octave and returns a sound of them all being played together.

Types

This section is empty.

Jump to

Keyboard shortcuts

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