haskell-synthesizer-0.1.0.0
Safe HaskellSafe-Inferred
LanguageHaskell2010

Notes

Synopsis

Documentation

playableTonesPitches :: [(Tone, Pitch)] Source #

C, C, E, F, F, A, A#, B

amountOfNotes :: Int Source #

length octaves * length playableTonesPitches

generateNotes Source #

Arguments

:: Frequency

Base frequency for note A4 (Most used value: 440 Hz)

-> Map Note Frequency

Returns list of notes with their frequency

Generates a Map of notes and their frequency given a base frequency for note A4

generateNote Source #

Arguments

:: Frequency

The frequency of note C0

-> Int

The offset from the note C0

-> (Note, Frequency)

A tuple with the note and their frequency

Generates a note and their frequency given the frequency for the note C0 and the offset from C0

frequencySteps Source #

Arguments

:: Double

The number of half steps away from the fixed note

-> Int

The frequency of one fixed note

-> Double

The frequency of the note n half steps away

The basic formula for the frequencies of the notes of the equal tempered scale.

Source: https://pages.mtu.edu/~suits/NoteFreqCalcs.html

numberOfSemitones Source #

Arguments

:: Double

The base frequency

-> Double

The frequency half steps away from the base frequency

-> Int

The number of half steps away from the base frequency

Calculates the number n of semitones away from the base frequency

frequencyToWaveLength Source #

Arguments

:: Double

The frequency in Hz

-> Double

The wavelength in meters

Converts the frequency to the wavelength in meters.

wavelengthToFrequency Source #

Arguments

:: Double

The wavelength in meters

-> Double

The frequency in Hz

Converts the wavelength to the frequency in Hz.