This is the bdef Reference Manual, version 0.8, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Sep 15 03:24:03 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
bdef
Buffer definition; audio buffer abstraction for sound synthesis systems
modula t.
(GIT git@github.com:defaultxr/bdef.git)
MIT
0.8
alexandria
(system).
mutility
(system).
parse-float
(system).
jsown
(system).
eager-future2
(system).
package.lisp
(file).
bdef.lisp
(file).
splits.lisp
(file).
sequence-extensions.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
bdef/bdef.lisp
package.lisp
(file).
bdef
(system).
*bdef-backends*
(special variable).
*bdef-default-num-channels*
(special variable).
*bdef-temporary-directory*
(special variable).
all-bdef-names
(function).
all-bdefs
(function).
bdef
(function).
bdef
(class).
bdef-buffer
(generic function).
bdef-channels
(generic function).
bdef-dur
(generic function).
bdef-duration
(generic function).
bdef-elt
(compiler macro).
bdef-elt
(function).
bdef-file
(generic function).
bdef-frame
(generic function).
bdef-frames
(generic function).
bdef-free
(function).
bdef-id
(generic function).
bdef-key
(compiler macro).
(setf bdef-key)
(compiler macro).
bdef-key
(function).
(setf bdef-key)
(function).
bdef-length
(generic function).
bdef-metadata
(generic function).
(setf bdef-metadata)
(method).
(setf bdef-metadata)
(method).
(setf bdef-metadata)
(method).
(setf bdef-metadata)
(method).
bdef-metadata-keys
(compiler macro).
bdef-metadata-keys
(function).
bdef-name
(generic function).
bdef-names
(function).
bdef-p
(function).
bdef-sample-rate
(generic function).
bdef-splits
(function).
(setf bdef-splits)
(function).
bdef-splits-events
(function).
bdef-subseq
(compiler macro).
bdef-subseq
(function).
bdef-tempo
(generic function).
define-bdef-auto-metadata
(macro).
define-bdef-dynamic-metadata
(macro).
describe-object
(method).
find-bdef
(function).
(setf find-bdef)
(function).
print-object
(method).
remove-bdef-auto-metadata
(function).
remove-bdef-dynamic-metadata
(function).
set-bdef-auto-metadata
(function).
*bdef-auto-metadata*
(special variable).
*bdef-dictionary*
(special variable).
*bdef-dynamic-metadata*
(special variable).
*deprecated-function-error-(setf⎵bdef-key)-notified-p*
(special variable).
*deprecated-function-error-(setf⎵bdef-ref)-notified-p*
(special variable).
*deprecated-function-error-bdef-elt-notified-p*
(special variable).
*deprecated-function-error-bdef-get-notified-p*
(special variable).
*deprecated-function-error-bdef-key-notified-p*
(special variable).
*deprecated-function-error-bdef-metadata-keys-notified-p*
(special variable).
*deprecated-function-error-bdef-ref-notified-p*
(special variable).
*deprecated-function-error-bdef-set-notified-p*
(special variable).
*deprecated-function-error-bdef-subseq-notified-p*
(special variable).
*ffmpeg-path*
(special variable).
*ffprobe-path*
(special variable).
bdef-backend-free
(generic function).
bdef-backend-load
(generic function).
bdef-backend-supported-file-types
(generic function).
bdef-get
(compiler macro).
bdef-get
(function).
bdef-load
(generic function).
bdef-ref
(compiler macro).
(setf bdef-ref)
(compiler macro).
bdef-ref
(function).
(setf bdef-ref)
(function).
bdef-set
(compiler macro).
bdef-set
(function).
ensure-namestring
(function).
ensure-readable-audio-file
(function).
file-does-not-exist
(condition).
file-exists-p
(function).
file-metadata
(function).
bdef/splits.lisp
bdef.lisp
(file).
bdef
(system).
audacity-labels-from-splits
(compiler macro).
audacity-labels-from-splits
(function).
bdef-buffer
(method).
bdef-channels
(method).
bdef-file
(method).
bdef-frames
(method).
bdef-id
(method).
bdef-length
(method).
bdef-sample-rate
(method).
describe-object
(method).
make-splits
(function).
print-object
(method).
splits
(class).
splits-export
(generic function).
splits-from-aubio
(function).
splits-from-aubio-onsets
(compiler macro).
splits-from-aubio-onsets
(function).
splits-from-audacity-labels
(compiler macro).
splits-from-audacity-labels
(function).
splits-from-op-1-drumset
(function).
splits-import
(function).
splits-import-format
(generic function).
splits-length
(function).
splits-p
(function).
splits-point
(function).
splits-points
(function).
%splits-conversion-function
(function).
%splits-conversion-function-name
(function).
%splits-ensure-point-type
(function).
%splits-ensure-unit
(function).
*aubio-python-directory*
(special variable).
*deprecated-function-style-warning-splits-from-audacity-labels-notified-p*
(special variable).
*deprecated-function-warning-audacity-labels-from-splits-notified-p*
(special variable).
*deprecated-function-warning-splits-from-aubio-onsets-notified-p*
(special variable).
*splits-format-auto-detect-functions*
(special variable).
+op-1-bytes-in-12-sec+
(constant).
+op-1-drumkit-end+
(constant).
+size-of-uint16-t+
(constant).
aubio-demo-bpm
(function).
aubio-demo-tempo
(function).
aubio-onsets
(function).
bpm-tools-bpm
(function).
detect-audacity-labels
(function).
end-point
(function).
frame-to-op-1-format
(function).
op-1-format-to-frame
(function).
percents-samples
(function).
percents-seconds
(function).
samples-percents
(function).
samples-seconds
(function).
seconds-percents
(function).
seconds-samples
(function).
splits-bdef
(reader method).
(setf splits-bdef)
(writer method).
splits-comments
(function).
splits-ends
(function).
splits-import-detect-format
(function).
splits-loops
(function).
splits-metadata
(generic function).
(setf splits-metadata)
(method).
splits-starts
(function).
splits-unit
(reader method).
(setf splits-unit)
(writer method).
string-extract-bpm
(function).
Packages are listed by definition order.
bdef
alexandria
.
common-lisp
.
mutility
.
*bdef-backends*
(special variable).
*bdef-default-num-channels*
(special variable).
*bdef-temporary-directory*
(special variable).
all-bdef-names
(function).
all-bdefs
(function).
audacity-labels-from-splits
(compiler macro).
audacity-labels-from-splits
(function).
bdef
(function).
bdef
(class).
bdef-buffer
(generic function).
bdef-channels
(generic function).
bdef-dur
(generic function).
bdef-duration
(generic function).
bdef-elt
(compiler macro).
bdef-elt
(function).
bdef-file
(generic function).
bdef-frame
(generic function).
bdef-frames
(generic function).
bdef-free
(function).
bdef-id
(generic function).
bdef-key
(compiler macro).
(setf bdef-key)
(compiler macro).
bdef-key
(function).
(setf bdef-key)
(function).
bdef-length
(generic function).
bdef-metadata
(generic function).
(setf bdef-metadata)
(generic function).
bdef-metadata-keys
(compiler macro).
bdef-metadata-keys
(function).
bdef-name
(generic function).
bdef-names
(function).
bdef-p
(function).
bdef-sample-rate
(generic function).
bdef-splits
(function).
(setf bdef-splits)
(function).
bdef-splits-events
(function).
bdef-subseq
(compiler macro).
bdef-subseq
(function).
bdef-tempo
(generic function).
define-bdef-auto-metadata
(macro).
define-bdef-dynamic-metadata
(macro).
find-bdef
(function).
(setf find-bdef)
(function).
make-splits
(function).
remove-bdef-auto-metadata
(function).
remove-bdef-dynamic-metadata
(function).
set-bdef-auto-metadata
(function).
splits
(class).
splits-export
(generic function).
splits-from-aubio
(function).
splits-from-aubio-onsets
(compiler macro).
splits-from-aubio-onsets
(function).
splits-from-audacity-labels
(compiler macro).
splits-from-audacity-labels
(function).
splits-from-op-1-drumset
(function).
splits-import
(function).
splits-import-format
(generic function).
splits-length
(function).
splits-p
(function).
splits-point
(function).
splits-points
(function).
%splits-conversion-function
(function).
%splits-conversion-function-name
(function).
%splits-ensure-point-type
(function).
%splits-ensure-unit
(function).
*aubio-python-directory*
(special variable).
*bdef-auto-metadata*
(special variable).
*bdef-dictionary*
(special variable).
*bdef-dynamic-metadata*
(special variable).
*deprecated-function-error-(setf⎵bdef-key)-notified-p*
(special variable).
*deprecated-function-error-(setf⎵bdef-ref)-notified-p*
(special variable).
*deprecated-function-error-bdef-elt-notified-p*
(special variable).
*deprecated-function-error-bdef-get-notified-p*
(special variable).
*deprecated-function-error-bdef-key-notified-p*
(special variable).
*deprecated-function-error-bdef-metadata-keys-notified-p*
(special variable).
*deprecated-function-error-bdef-ref-notified-p*
(special variable).
*deprecated-function-error-bdef-set-notified-p*
(special variable).
*deprecated-function-error-bdef-subseq-notified-p*
(special variable).
*deprecated-function-style-warning-splits-from-audacity-labels-notified-p*
(special variable).
*deprecated-function-warning-audacity-labels-from-splits-notified-p*
(special variable).
*deprecated-function-warning-splits-from-aubio-onsets-notified-p*
(special variable).
*ffmpeg-path*
(special variable).
*ffprobe-path*
(special variable).
*splits-format-auto-detect-functions*
(special variable).
+op-1-bytes-in-12-sec+
(constant).
+op-1-drumkit-end+
(constant).
+size-of-uint16-t+
(constant).
aubio-demo-bpm
(function).
aubio-demo-tempo
(function).
aubio-onsets
(function).
bdef-backend-free
(generic function).
bdef-backend-load
(generic function).
bdef-backend-supported-file-types
(generic function).
bdef-get
(compiler macro).
bdef-get
(function).
bdef-load
(generic function).
bdef-ref
(compiler macro).
(setf bdef-ref)
(compiler macro).
bdef-ref
(function).
(setf bdef-ref)
(function).
bdef-set
(compiler macro).
bdef-set
(function).
bpm-tools-bpm
(function).
detect-audacity-labels
(function).
end-point
(function).
ensure-namestring
(function).
ensure-readable-audio-file
(function).
file-does-not-exist
(condition).
file-exists-p
(function).
file-metadata
(function).
frame-to-op-1-format
(function).
op-1-format-to-frame
(function).
percents-samples
(function).
percents-seconds
(function).
samples-percents
(function).
samples-seconds
(function).
seconds-percents
(function).
seconds-samples
(function).
splits-bdef
(generic reader).
(setf splits-bdef)
(generic writer).
splits-comments
(function).
splits-ends
(function).
splits-import-detect-format
(function).
splits-loops
(function).
splits-metadata
(generic function).
(setf splits-metadata)
(generic function).
splits-starts
(function).
splits-unit
(generic reader).
(setf splits-unit)
(generic writer).
string-extract-bpm
(function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
The list of enabled backends. When the user attempts to create a bdef, each backend in this list is used to try to create the bdef from the file or object. If a backend returns nil, the next backend in the list will be tried. This is repeated until the first backend successfully returns a bdef object.
Note that backends are made available by loading the relevant bdef subsystem with Quicklisp or ASDF. For example, if you want to use SuperCollider/cl-collider, load ‘bdef/cl-collider’. Once you’ve loaded it, you should see that the :cl-collider keyword is in this list.
The default value of ‘bdef-load”s NUM-CHANNELS argument. If 2, all buffers will default to being loaded as stereo even if they are mono. If nil, load all the channels the source has.
The directory bdef should store its temporary files in (i.e. the .wav files generated from format auto-conversion).
Define an auto-metadata key for bdefs. The variable BDEF will be bound in BODY to the bdef in question.
Define a metadata key that is calculated dynamically. For example, bpm is just tempo multiplied by 60.
KEY is the name of the key, GET-BODY is the function to run to get the key, and SET-BODY is the function to run to set metadata when (setf (bdef-metadata bdef KEY) ...) is called.
See also: ‘define-bdef-auto-metadata’, ‘bdef-metadata’
Get a list of the names of all defined bdef objects.
See also: ‘all-bdefs’, ‘bdef-names’
Get a list of all defined bdef objects in DICTIONARY. With PACKAGE, get only bdefs whose name is a symbol in that package.
See also: ‘all-bdef-names’, ‘bdef-names’, ‘find-bdef’
Deprecated alias for (splits-export SPLITS FILE :audacity).
bdef
.
Automatically load a buffer or reference one that’s already loaded. NAME is the name to give the buffer in the bdef dictionary. VALUE is the path to the file to load, or the data to construct the buffer from (i.e. an envelope, a list of frames, etc).
Without VALUE, bdef will look up and return the bdef that already exists with the given name. If NAME is a pathname or string, it’s assumed to be the name of a file, which is automatically loaded if necessary.
Deprecated alias for ‘bdef-frame’.
Free BDEF’s buffer and remove all names in DICTIONARY that point to it.
Deprecated alias for ‘(setf bdef-name)’.
Deprecated alias for (keys (bdef-metadata bdef)).
Get a list of all the names in DICTIONARY that point to NAME.
See also: ‘all-bdef-names’, ‘all-bdefs’
Test whether OBJECT is a bdef.
See also: ‘find-bdef’
Get any ‘splits’ from BDEF’s metadata, searching in preferred order (i.e. :splits key first, etc).
See also: ‘bdef-splits-events’, ‘splits-events’
Get the ‘splits’ from BDEF’s metadata (as per ‘bdef-splits’) as a list of events (as per ‘splits-events’).
See also: ‘bdef-splits’, ‘splits-events’
Deprecated alias for ‘bdef-frames’.
Get the object named NAME in the bdef dictionary. If ERRORP is true, signals an error when NAME isn’t found in the dictionary. Returns t or nil as a second value showing whether the symbol was found.
See also: ‘bdef-p’, ‘all-bdefs’, ‘all-bdef-names’
Make a ‘splits’ object. Ends, loops, and comments for each split can be specified with the keyword arguments or as sublists in STARTS.
Examples:
;; (make-splits (list (list 0 1 "first split") (list 1 2 "second split")) :unit seconds)
;; ;; ...is equivalent to:
;; (make-splits (list 0 1) :ends (list 1 2) :comments (list "first split" "second split") :unit :seconds)
See also: ‘splits’, ‘splits-points’, ‘splits-starts’, ‘splits-ends’, ‘splits-loops’, ‘splits-comments’
bdef
.
Remove a previously-defined auto-metadata key.
Remove a key from the bdef dynamic metadata list.
Add KEY as an auto-metadata key for bdefs. FUNCTION will be run with the bdef as its argument, and the result will be set to the bdef’s metadata for KEY.
Make a ‘splits’ from onsets data generated by Aubio by using the ‘aubio-onsets’ function.
See also: ‘splits’, ‘aubio-onsets’
bdef
.
Deprecated alias for (splits-from-aubio FILE :utility :onset ...).
bdef
.
Deprecated alias for (splits-import-format FILE :audacity).
See also: ‘splits-import’, ‘splits-import-format’.
bdef
.
Make a ‘splits’ object by reading the metadata from an OP-1 format drumset file. IF-INVALID specifies what to do if DRUMSET can’t be parsed as an op-1 drumset file; it can be either :ERROR to signal an error, or NIL to simply return nil.
bdef
.
Derive a ‘splits’ object from another format. If FORMAT is not provided, attempt to autodetect.
See also: ‘splits-export’
bdef
.
True if OBJECT is a splits.
See also: ‘splits’, ‘make-splits’
bdef
.
Get the split point SPLIT from SPLITS, converting to the correct UNIT (percent, samples, seconds).
bdef
.
Get the split points for POINTS (i.e. start, end, loops, comments) from SPLITS converted to UNIT (i.e. percent, samples, seconds).
bdef
.
The actual buffer object that the bdef refers to.
The number of BDEF’s channels.
Get the dur of the bdef in beats.
Get the duration of the bdef in seconds.
The file that BDEF was loaded from, or nil if it was not loaded from a file.
Get the value of the bdef frame at INDEX. Without CHANNEL, return an array of the specified index in all channels. With CHANNEL, return just the value as a number.
See also: ‘bdef-frames’
Get an array of the frames of BDEF’s buffer, from START below END. CHANNELS specifies which channel(s) to get; if an integer, returns a single-dimensional array of the specified channel; if a list, returns a multi-dimensional array of the specified channels. Defaults to all frames of all channels.
See also: ‘bdef-frame’
The ID number of this bdef, or nil if the bdef’s backend does not support IDs.
BDEF’s length in frames.
Get the value of BDEF’s metadata for KEY, or the full metadata hashtable if KEY is not provided. Returns true as a second value if the metadata had an entry for KEY, or false if it did not.
Note that this function will block if the specified metadata is one of the ‘*bdef-auto-metadata*’ that hasn’t finished being generated yet.
The name (key) of the bdef.
BDEF’s sample rate in Hz.
Get the tempo of the bdef in beats per second. Defaults to 1 if no tempo metadatum exists.
Write a ‘splits’ object as another format.
See also: ‘splits-import’
Make a ‘splits’ object by importing from INPUT in FORMAT.
See also: ‘splits-import’, ‘splits-export’
bdef
.
The name (key) of the bdef.
alexandria:string-designator
:name
This slot is read-only.
The actual buffer object that the bdef refers to.
:buffer
This slot is read-only.
Hash table of additional data associated with the bdef, accessible with the ‘bdef-metadata’ function.
hash-table
(make-hash-table)
:metadata
List of split data for dividing buffers into pieces.
bdef
.
sequence
.
The vector of split start points. If the "end" slot is non-nil, each start point will be matched with an end point in the "end" slot with the same index.
(vector number)
:starts
The vector of split end points, or NIL if no end points are defined.
(or null (vector number))
:ends
The vector of split loop points, or NIL if no loop points are defined.
(or null (vector number))
:loops
The vector of comments for each split point.
(or null (vector (or null string)))
:comments
The unit type of each split point, i.e. percents, samples, or seconds.
symbol
:percents
:unit
The bdef object that this splits references (i.e. for information like duration, sample rate, etc, for converting point data).
bdef:bdef
:bdef
Hash table of additional data associated with the splits, accessible with the ‘splits-metadata’ function.
hash-table
(make-hash-table)
:metadata
The path to Aubio’s "demos" directory.
bdef
.
Plist of keys that will automatically be populated in a bdef’s metadata for all newly-created or loaded buffers. The value for each key is the function that generates the value of the key for the bdef metadata. Use the ‘define-bdef-auto-metadata’ macro or ‘set-bdef-auto-metadata’ function to define bdef-auto-metadata keys, or ‘remove-bdef-auto-metadata’ to remove them.
The bdef dictionary hash table.
See also: ‘find-bdef’
Alist of dynamic metadata keys and their get and set functions.
bdef
.
bdef
.
bdef
.
The path to ffmpeg, or nil if ffmpeg could not be found.
The path to ffprobe, or nil if ffprobe could not be found.
List of functions to check objects against when imported via ‘splits-import’ without its format specified.
bdef
.
Get a function that can be used to convert SPLITS’ unit into the unit type specified.
bdef
.
Get the name of the conversion function to convert SPLITS’ unit type into the unit specified.
bdef
.
Ensure POINT is one of the splits point types.
bdef
.
Ensure UNIT is one of the splits position unit types.
bdef
.
Use aubio’s demo_bpm_extract.py to get the bpm of FILE.
bdef
.
Use aubio’s demo_tempo.py to get a list of beats in FILE. The returned list gives onsets in seconds from the start of the file.
bdef
.
Use the "aubioonset" or "aubiotrack" utility to get a list of onset points in FILE in seconds. FILE can be a filename, a bdef, or a supported buffer object. UTILITY specifies whether to use Aubio’s "onset" or "track" utility. The rest of the arguments are sent as parameters to the Aubio utility in use; see Aubio’s documentation for more information on them.
bdef
.
Deprecated alias for ‘find-bdef’.
Deprecated alias for ‘find-bdef’.
Deprecated alias for ‘(setf find-bdef)’.
Deprecated alias for ‘(setf find-bdef)’.
Use bpm-tools’ "bpm" utility to get the BPM of FILE.
bdef
.
Returns :audacity if FILE is a valid Audacity labels file.
bdef
.
Get the full path to FILENAME.
Use ffmpeg to convert FILE to the first format in EXTENSIONS if it is not already in one of those formats. Returns the path to the converted file (or FILE if no conversion is needed), and the file’s metadata. The converted file is stored under ‘*bdef-temporary-directory*’.
See also: ‘file-metadata’, ‘*ffmpeg-path*’, ‘*bdef-temporary-directory*’
True if FILENAME names a file that exists. This function is needed to ensure characters like ? are not interpreted as Common Lisp pathname wildcards.
Get the metadata of FILE as a plist.
Convert a frame number to the OP-1 split point format.
See also: ‘op-1-format-to-frame’
bdef
.
Convert a frame number to the OP-1 split point format.
See also: ‘op-1-format-to-frame’
bdef
.
Auto-detect the format of SOURCE by testing it through ‘*splits-format-auto-detect-functions*’. Returns a list of the possible formats detected.
bdef
.
Extract the BPM from a string (typically a filename), or nil if no BPM-like string is found. If "bpm" is not in the string, then this function will look for a number in the range MIN-BPM to MAX-BPM, starting from the end of the string.
bdef
.
Free a buffer via its backend.
See also: ‘bdef-backend-load’
Load a file or other object into a bdef via the specified backend. This method should return the backend’s buffer object. OBJECT will either be a string (the path to the file to load) or a list of strings (if the files should be loaded as consecutive buffers, i.e. for SuperCollider’s VOsc UGen). Requested files will always be in a format that the backend reports supporting via the ‘bdef-backend-supported-file-types’ method.
See also: ‘bdef-backend-free’, ‘bdef-backend-supported-file-types’
Get a list of file extensions as keywords naming the file types that the backend natively supports (i.e. that don’t need conversion).
See also: ‘bdef-backend-load’, ‘ensure-readable-audio-file’
Load a file or other object into a bdef. Different backends will support different object types, and different key arguments. Here are the key arguments supported by one or more backends:
- ID - Requested buffer number.
- NUM-CHANNELS - Number of channels to load (defaults to ‘*bdef-default-num-channels*’, which itself defaults to nil, meaning load the same number of channels as the source).
- WAVETABLE - Whether to load the object in wavetable format. If T, the buffer length will be the next power of two. If a number is provided, load the object as a wavetable of that size.
- METADATA - Plist of metadata to include in the bdef.
Get the value of SPLITS’s metadata for KEY, or the full metadata hashtable if KEY is not provided. Returns true as a second value if the metadata had an entry for KEY, or false if it did not.
bdef
.
Jump to: | %
(
A B C D E F G L M O P R S |
---|
Jump to: | %
(
A B C D E F G L M O P R S |
---|
Jump to: | *
+
B C E L M N S U |
---|
Jump to: | *
+
B C E L M N S U |
---|
Jump to: | B C F P S |
---|
Jump to: | B C F P S |
---|