mplot3_adsr: 'mplot3': ADSR Plot

View source: R/mplot3_adsr.R

mplot3_adsrR Documentation

mplot3: ADSR Plot

Description

Plot Attack Decay Sustain Release Envelope Generator using mplot3_xy

Usage

mplot3_adsr(
  Attack = 300,
  Decay = 160,
  Sustain = 40,
  Release = 500,
  Value = 80,
  I = 200,
  O = 1800,
  lty = 1,
  lwd = 4,
  main = "ADSR Envelope",
  main.line = 1.6,
  main.col = "white",
  Attack.col = "#44A6AC",
  Decay.col = "#F4A362",
  Sustain.col = "#3574A7",
  Release.col = "#C23A70",
  draw.poly = FALSE,
  poly.alpha = 0.15,
  draw.verticals = TRUE,
  v.lty = 1,
  v.lwd = 0.8,
  arrow.code = 2,
  arrow.length = 0.09,
  grid = FALSE,
  grid.lty = 1,
  grid.lwd = 0.4,
  grid.col = NULL,
  zerolines.col = "gray50",
  theme = "darkgray",
  labs.col = "gray70",
  tick.col = "gray70",
  on.col = "gray70",
  off.col = "gray70",
  pty = "m",
  mar = c(3, 3, 3.2, 0.5),
  xaxs = "i",
  yaxs = "i",
  par.reset = TRUE,
  ...
)

Arguments

Attack

Numeric: Attack time (in milliseconds)

Decay

Numeric: Decay time (in milliseconds)

Sustain

Numeric: Sustain Level (percent)

Release

Numeric: Release time (in milliseconds)

Value

Numeric: Value (percent)

I

Numeric: Note on time (in milliseconds)

O

Numeric: Note off time (in milliseconds)

lty

Integer: Line type

lwd

Numeric: Line width

main

Character: Main title

main.line

Numeric: Main title line height

main.col

Main title color

Attack.col

Attack color

Decay.col

Decay color

Sustain.col

Sustain color

Release.col

Release color

draw.poly

Logical: If TRUE, draw polygons for each segment

poly.alpha

Numeric: Polygon alpha

draw.verticals

Logical: If TRUE, draw vertical lines

v.lty

Integer: Vertical line type

v.lwd

Numeric: Vertical line width

arrow.code

Integer: Arrow code

arrow.length

Numeric: Arrow length

grid

Logical: If TRUE, draw grid

grid.lty

Integer: Grid line type

grid.lwd

Numeric: Grid line width

grid.col

Grid line color

zerolines.col

Color for zero lines

theme

Character: "light" or "dark" (Default)

labs.col

Color for axis labels

tick.col

Color for axis ticks

on.col

Color for "on" line

off.col

Color for "off" line

pty

Character: "s" gives a square plot; "m" gives a plot that fills graphics device size. Default = "m" (See par("pty"))

mar

Float, vector, length 4: Margins; see par("mar")

xaxs

Character: "r": Extend plot x-axis limits by 4% on either end; "i": Use exact x-axis limits.

yaxs

Character: as xaxs for the y-axis.

par.reset

Logical: If TRUE, reset par setting before exiting.

...

Additional arguments to pass to mplot3_xy

Details

Learn more: (https://en.wikipedia.org/wiki/Synthesizer#Attack_Decay_Sustain_Release_.28ADSR.29_envelope "ADSR Wikipedia")

Author(s)

E.D. Gennatas

Examples

## Not run: 
mplot3_adsr()

## End(Not run)

egenn/rtemis documentation built on May 4, 2024, 7:40 p.m.