Skip to content

Reads Resource Interchange File Format (RIFF) files from Common Lisp.

License

Notifications You must be signed in to change notification settings

Devon7/cl-riff

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cl-riff

The Resource Interchange File Format (RIFF) is a generic file container format for storing data in tagged chunks. It is primarily used to store multimedia such as sound and video, though it may also be used to store any arbitrary data.

I wrote this code as a cross-platform way of processing WAV audio files. (See cl-wav).

Use read-riff-file to load a whole file, returning it's content as a list of chunks, where each chunk is a plist.

Alternatively, open the stream yourself and call read-chunk successively until NIL.

Chunks are represented as plists, with accessor methods defined for chunk-id, chunk-data-size, chunk-data and file-type.

Example

> (ql:quickload :cl-riff)
> (riff:read-riff-file "c:/windows/media/ding.wav")
...
> (riff:riff-file-type (first *))
"WAVE"

> (riff:write-riff-file (riff:read-riff-file "c:/windows/media/ding.wav")
                        "c:/windows/media/ding-copy.wav")

References

Resource Interchange File Format, Wikipedia

Resource Interchange File Format Services, MSDN

Resource Interchange File Format (RIFF), MSDN

Resource Interchange File Format (RIFF)

Inside the RIFF Specification

RIFF File Structure

Contributors

Write functionality by Patrick Stein. RIFX and XFIR detection and reading by Devon Sean McCullough.

About

Reads Resource Interchange File Format (RIFF) files from Common Lisp.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Common Lisp 100.0%