File: winfunc.Rd

package info (click to toggle)
r-cran-av 0.5.1+dfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 324 kB
  • sloc: ansic: 1,353; sh: 83; makefile: 6
file content (75 lines) | stat: -rw-r--r-- 1,203 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/winfunc.R
\name{window functions}
\alias{window functions}
\alias{hanning}
\alias{hamming}
\alias{blackman}
\alias{bartlett}
\alias{welch}
\alias{flattop}
\alias{bharris}
\alias{bnuttall}
\alias{sine}
\alias{nuttall}
\alias{bhann}
\alias{lanczos}
\alias{gauss}
\alias{tukey}
\alias{dolph}
\alias{cauchy}
\alias{parzen}
\alias{bohman}
\title{Window functions}
\usage{
hanning(n)

hamming(n)

blackman(n)

bartlett(n)

welch(n)

flattop(n)

bharris(n)

bnuttall(n)

sine(n)

nuttall(n)

bhann(n)

lanczos(n)

gauss(n)

tukey(n)

dolph(n)

cauchy(n)

parzen(n)

bohman(n)
}
\arguments{
\item{n}{size of the window (number of weights to generate)}
}
\description{
Several common \href{https://en.wikipedia.org/wiki/Window_function}{windows function}
generators. The functions return a vector of weights to use in \link{read_audio_fft}.
}
\examples{
# Window functions
plot(hanning(1024), type = 'l', xlab = 'window', ylab = 'weight')
lines(hamming(1024), type = 'l', col = 'red')
lines(bartlett(1024), type = 'l', col = 'blue')
lines(welch(1024), type = 'l', col = 'purple')
lines(flattop(1024), type = 'l', col = 'darkgreen')
}