new
new
new
8.18
top
← prev up next →

WAVE File Format (WAV)πŸ”— i

This module provides utilities for reading and writing WAVE files.

Some of the more advanced features of the format are not implemented; let me know if you need them!

1Reading and WritingπŸ”— i

procedure

( read-wave [in])wave?

Reads WAVE data from in and returns it.

procedure

( write-wave wav[out])void?

wav:wave?
Writes the WAVE object wav to out.

2UtilitiesπŸ”— i

procedure

( wave? v)boolean?

v:any/c
Predicate for WAVE data. Equivalent to (and (is-a? vriff:list% )(bytes=? #"WAVE"(get-field typev))).

wav:wave?
Returns the number of bits per sample of wav.

Returns the number of channels in wav.

Returns the sample rate of wav.

procedure

( wave-format wav)(is-a?/c wave:format% )

wav:wave?
Returns the format chunk of wav. An exception will be raised if none is found.

Returns a sequence consisting of the samples of channel number ch in wav.

procedure

( in-wave wav)sequence?

wav:wave?
Returns a sequence consisting of the samples of wav. Each element of the sequence has as many values as there are channels.

3Binary ClassesπŸ”— i

superclass:riff%

A type representing the WAVE format chunk.

constructor

[format-tagformat-tag]
[channelschannels]
[samples-per-secsamples-per-sec]
[avg-bytes-per-secavg-bytes-per-sec]
[block-alignblock-align]
[bits-per-samplebits-per-sample])
samples-per-sec:exact-positive-integer?
avg-bytes-per-sec:exact-positive-integer?
bits-per-sample:exact-positive-integer?

Represents extensible format data.

constructor

[extension-sizeextension-size]
...superclass-args...)

Represents extended format data.

constructor

[valid-bits-per-samplevalid-bits-per-sample]
[channel-maskchannel-mask]
[sub-formatsub-format]
...superclass-args...)
valid-bits-per-sample:exact-nonnegative-integer?
sub-format:bytes?

top
← prev up next →

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /