play_wav: Play wav

View source: R/wave.R

play_wavR Documentation

Play wav

Description

Plays a chord as a wave file.

Usage

play_wav(x, player = "play", ...)

Arguments

x

Chord to save.

player

(Path to) a program capable of playing a wave file by invocation from the command line. If under Windows and no player is given, “mplay32.exe” or “wmplayer.exe” (if the former does not exists as under Windows 7) will be chosen as the default.

...

Arguments passed on to save_wav, expand_harmonics

file

(Character scalar) Output file.

amplitude

(Numeric scalar) The wave is multiplied by this number before exporting. The resulting wave should fall completely within the range [-1, 1].

bit_depth

(Integer scalar) The bit depth of the exported audio.

end_pad

(Numeric scalar) Duration of silence (seconds) appended to the end of the audio file, used to avoid clicks and other artifacts.

length_sec

(Numeric scalar) Length of the output wave, in seconds.

rise_length

(Numeric scalar) Chord fade-in time (seconds).

fade_length

(Numeric scalar) Chord fade-out time (seconds).

num_harmonics

(Integerish scalar) Number of harmonics (including the fundamental) to which each tone should be expanded.

roll_off

(Numeric scalar) Parametrises the amount of amplitude roll-off in the harmonics, with greater values corresponding to higher roll-off.

digits

Number of digits to which each partial's MIDI pitch should be rounded.

label_harmonics

If TRUE, then the harmonics in the resulting spectrum are labelled with their harmonic numbers.

coherent

Whether the amplitudes from different spectral components should be combined assuming coherent summation, where the amplitudes simply add together (default is FALSE). Otherwise incoherent summation is used, where the amplitudes are squared, added, then square rooted.

See Also

play_sox


pmcharrison/hrep documentation built on Feb. 18, 2024, 2:33 a.m.