The bdef Reference Manual

This is the bdef Reference Manual, version 0.8, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Feb 26 14:40:40 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 bdef

Buffer definition; audio buffer abstraction for sound synthesis systems

Author

modula t.

Contact

Home Page

https://github.com/defaultxr/bdef

Source Control

(GIT git@github.com:defaultxr/bdef.git)

Bug Tracker

https://github.com/defaultxr/bdef/issues

License

MIT

Version

0.8

Dependencies
  • alexandria (system).
  • mutility (system).
  • parse-float (system).
  • jsown (system).
  • eager-future2 (system).
Source

bdef.asd.

Child Components

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


3.1 Lisp


3.1.1 bdef/bdef.asd

Source

bdef.asd.

Parent Component

bdef (system).

ASDF Systems

bdef.


3.1.2 bdef/package.lisp

Source

bdef.asd.

Parent Component

bdef (system).

Packages

bdef.


3.1.3 bdef/bdef.lisp

Dependency

package.lisp (file).

Source

bdef.asd.

Parent Component

bdef (system).

Public Interface
Internals

3.1.4 bdef/splits.lisp

Dependency

bdef.lisp (file).

Source

bdef.asd.

Parent Component

bdef (system).

Public Interface
Internals

3.1.5 bdef/sequence-extensions.lisp

Dependency

splits.lisp (file).

Source

bdef.asd.

Parent Component

bdef (system).

Public Interface

4 Packages

Packages are listed by definition order.


4.1 bdef

Source

package.lisp.

Use List
  • alexandria.
  • common-lisp.
  • mutility.
Public Interface
Internals

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


5.1 Public Interface


5.1.1 Special variables

Special Variable: *bdef-backends*

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.

Package

bdef.

Source

bdef.lisp.

Special Variable: *bdef-default-num-channels*

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.

Package

bdef.

Source

bdef.lisp.

Special Variable: *bdef-temporary-directory*

The directory bdef should store its temporary files in (i.e. the .wav files generated from format auto-conversion).

Package

bdef.

Source

bdef.lisp.


5.1.2 Macros

Macro: define-bdef-auto-metadata (key &body body)

Define an auto-metadata key for bdefs. The variable BDEF will be bound in BODY to the bdef in question.

Package

bdef.

Source

bdef.lisp.

Macro: define-bdef-dynamic-metadata (key get-body set-body)

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’

Package

bdef.

Source

bdef.lisp.


5.1.3 Compiler macros

Compiler Macro: audacity-labels-from-splits (&rest args)
Package

bdef.

Source

splits.lisp.

Compiler Macro: bdef-elt (&rest args)
Package

bdef.

Source

bdef.lisp.

Compiler Macro: bdef-key (&rest args)
Package

bdef.

Source

bdef.lisp.

Compiler Macro: (setf bdef-key) (args)
Package

bdef.

Source

bdef.lisp.

Compiler Macro: bdef-metadata-keys (&rest args)
Package

bdef.

Source

bdef.lisp.

Compiler Macro: bdef-subseq (&rest args)
Package

bdef.

Source

bdef.lisp.

Compiler Macro: splits-from-aubio-onsets (&rest args)
Package

bdef.

Source

splits.lisp.

Compiler Macro: splits-from-audacity-labels (&rest args)
Package

bdef.

Source

splits.lisp.


5.1.4 Ordinary functions

Function: all-bdef-names (&key include-aliases package dictionary)

Get a list of the names of all defined bdef objects.

See also: ‘all-bdefs’, ‘bdef-names’

Package

bdef.

Source

bdef.lisp.

Function: all-bdefs (&key package dictionary)

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’

Package

bdef.

Source

bdef.lisp.

Function: audacity-labels-from-splits (splits &optional file)

Deprecated alias for (splits-export SPLITS FILE :audacity).

Package

bdef.

Source

splits.lisp.

Function: bdef (name &optional value &key num-channels wavetable metadata backend dictionary)

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.

Package

bdef.

Source

bdef.lisp.

Function: bdef-elt (bdef index &optional channel)

Deprecated alias for ‘bdef-frame’.

Package

bdef.

Source

bdef.lisp.

Function: bdef-free (bdef &optional dictionary)

Free BDEF’s buffer and remove all names in DICTIONARY that point to it.

Package

bdef.

Source

bdef.lisp.

Function: bdef-key (object)

Deprecated alias for ‘bdef-name’.

Package

bdef.

Source

bdef.lisp.

Function: (setf bdef-key) (object)

Deprecated alias for ‘(setf bdef-name)’.

Package

bdef.

Source

bdef.lisp.

Function: bdef-metadata-keys (bdef)

Deprecated alias for (keys (bdef-metadata bdef)).

Package

bdef.

Source

bdef.lisp.

Function: bdef-names (name &key include-aliases dictionary)

Get a list of all the names in DICTIONARY that point to NAME.

See also: ‘all-bdef-names’, ‘all-bdefs’

Package

bdef.

Source

bdef.lisp.

Function: bdef-p (object)

Test whether OBJECT is a bdef.

See also: ‘find-bdef’

Package

bdef.

Source

bdef.lisp.

Function: bdef-splits (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’

Package

bdef.

Source

bdef.lisp.

Function: (setf bdef-splits) (bdef)
Package

bdef.

Source

bdef.lisp.

Function: bdef-splits-events (bdef &key unit keys remove-keys)

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’

Package

bdef.

Source

bdef.lisp.

Function: bdef-subseq (bdef &optional start end channel)

Deprecated alias for ‘bdef-frames’.

Package

bdef.

Source

bdef.lisp.

Function: find-bdef (name &key errorp dictionary)

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’

Package

bdef.

Source

bdef.lisp.

Function: (setf find-bdef) (name &key errorp dictionary)
Package

bdef.

Source

bdef.lisp.

Function: make-splits (starts &key ends loops comments unit bdef metadata)

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’

Package

bdef.

Source

splits.lisp.

Function: remove-bdef-auto-metadata (key)

Remove a previously-defined auto-metadata key.

Package

bdef.

Source

bdef.lisp.

Function: remove-bdef-dynamic-metadata (key)

Remove a key from the bdef dynamic metadata list.

Package

bdef.

Source

bdef.lisp.

Function: set-bdef-auto-metadata (key function)

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.

Package

bdef.

Source

bdef.lisp.

Function: splits-from-aubio (file &rest args &key &allow-other-keys)

Make a ‘splits’ from onsets data generated by Aubio by using the ‘aubio-onsets’ function.

See also: ‘splits’, ‘aubio-onsets’

Package

bdef.

Source

splits.lisp.

Function: splits-from-aubio-onsets (file &rest args &key &allow-other-keys)

Deprecated alias for (splits-from-aubio FILE :utility :onset ...).

Package

bdef.

Source

splits.lisp.

Function: splits-from-audacity-labels (file)

Deprecated alias for (splits-import-format FILE :audacity).

See also: ‘splits-import’, ‘splits-import-format’.

Package

bdef.

Source

splits.lisp.

Function: splits-from-op-1-drumset (drumset &key if-invalid)

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.

Package

bdef.

Source

splits.lisp.

Function: splits-import (source &optional format)

Derive a ‘splits’ object from another format. If FORMAT is not provided, attempt to autodetect.

See also: ‘splits-export’

Package

bdef.

Source

splits.lisp.

Function: splits-length (object)

Get the number of splits defined in OBJECT.

Package

bdef.

Source

splits.lisp.

Function: splits-p (object)

True if OBJECT is a splits.

See also: ‘splits’, ‘make-splits’

Package

bdef.

Source

splits.lisp.

Function: splits-point (splits split &optional point unit)

Get the split point SPLIT from SPLITS, converting to the correct UNIT (percent, samples, seconds).

Package

bdef.

Source

splits.lisp.

Function: splits-points (splits &optional point unit)

Get the split points for POINTS (i.e. start, end, loops, comments) from SPLITS converted to UNIT (i.e. percent, samples, seconds).

Package

bdef.

Source

splits.lisp.


5.1.5 Generic functions

Generic Function: bdef-buffer (object)

The actual buffer object that the bdef refers to.

Package

bdef.

Source

bdef.lisp.

Methods
Method: bdef-buffer ((this splits))
Source

splits.lisp.

Method: bdef-buffer ((null null))
Method: bdef-buffer ((symbol symbol))
Reader Method: bdef-buffer ((bdef bdef))

The actual buffer object that the bdef refers to.

Target Slot

buffer.

Generic Function: bdef-channels (bdef)

The number of BDEF’s channels.

Package

bdef.

Source

bdef.lisp.

Methods
Method: bdef-channels ((this splits))
Source

splits.lisp.

Method: bdef-channels (bdef)
Generic Function: bdef-dur (bdef)

Get the dur of the bdef in beats.

Package

bdef.

Source

bdef.lisp.

Methods
Method: bdef-dur (bdef)
Generic Function: bdef-duration (bdef)

Get the duration of the bdef in seconds.

Package

bdef.

Source

bdef.lisp.

Methods
Method: bdef-duration (bdef)
Generic Function: bdef-file (bdef)

The file that BDEF was loaded from, or nil if it was not loaded from a file.

Package

bdef.

Source

bdef.lisp.

Methods
Method: bdef-file ((this splits))
Source

splits.lisp.

Method: bdef-file (bdef)
Generic Function: bdef-frame (bdef index &optional channel)

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’

Package

bdef.

Source

bdef.lisp.

Methods
Method: bdef-frame (bdef index &optional channels)
Generic Function: bdef-frames (bdef &key start end channels)

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’

Package

bdef.

Source

bdef.lisp.

Methods
Method: bdef-frames ((this splits) &key start end channels)
Source

splits.lisp.

Method: bdef-frames ((bdef bdef) &key start end channels)
Generic Function: bdef-id (bdef)

The ID number of this bdef, or nil if the bdef’s backend does not support IDs.

Package

bdef.

Source

bdef.lisp.

Methods
Method: bdef-id ((this splits))
Source

splits.lisp.

Method: bdef-id ((bdef bdef))
Method: bdef-id ((null null))
Method: bdef-id ((name string))
Method: bdef-id ((name symbol))
Generic Function: bdef-length (bdef)

BDEF’s length in frames.

Package

bdef.

Source

bdef.lisp.

Methods
Method: bdef-length ((this splits))
Source

splits.lisp.

Method: bdef-length (bdef)
Generic Function: bdef-metadata (bdef &optional key)

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.

Package

bdef.

Source

bdef.lisp.

Methods
Method: bdef-metadata ((bdef bdef) &optional key)
Method: bdef-metadata ((null null) &optional key)
Method: bdef-metadata ((name string) &optional key)
Method: bdef-metadata ((name symbol) &optional key)
Generic Function: (setf bdef-metadata) (symbol &optional key)
Package

bdef.

Methods
Method: (setf bdef-metadata) ((bdef bdef) &optional key)
Source

bdef.lisp.

Method: (setf bdef-metadata) ((null null) &optional key)
Source

bdef.lisp.

Method: (setf bdef-metadata) ((string string) &optional key)
Source

bdef.lisp.

Method: (setf bdef-metadata) ((symbol symbol) &optional key)
Source

bdef.lisp.

Generic Function: bdef-name (bdef)

The name (key) of the bdef.

Package

bdef.

Source

bdef.lisp.

Methods
Method: bdef-name ((null null))
Method: bdef-name ((symbol symbol))
Reader Method: bdef-name ((bdef bdef))

The name (key) of the bdef.

Target Slot

name.

Generic Function: bdef-sample-rate (bdef)

BDEF’s sample rate in Hz.

Package

bdef.

Source

bdef.lisp.

Methods
Method: bdef-sample-rate ((this splits))
Source

splits.lisp.

Method: bdef-sample-rate (bdef)
Generic Function: bdef-tempo (bdef)

Get the tempo of the bdef in beats per second. Defaults to 1 if no tempo metadatum exists.

Package

bdef.

Source

bdef.lisp.

Methods
Method: bdef-tempo (bdef)
Generic Function: splits-export (splits destination format)

Write a ‘splits’ object as another format.

See also: ‘splits-import’

Package

bdef.

Source

splits.lisp.

Methods
Method: splits-export ((splits splits) (stream stream) (format (eql :audacity)))
Method: splits-export (object (file pathname) format)
Method: splits-export (object (file string) format)
Method: splits-export ((bdef bdef) file format)
Generic Function: splits-import-format (input format)

Make a ‘splits’ object by importing from INPUT in FORMAT.

See also: ‘splits-import’, ‘splits-export’

Package

bdef.

Source

splits.lisp.

Methods
Method: splits-import-format ((stream stream) (format (eql :audacity)))
Method: splits-import-format ((path string) (format (eql :audacity)))

5.1.6 Standalone methods

Method: describe-object ((splits splits) stream)
Source

splits.lisp.

Method: describe-object ((bdef bdef) stream)
Source

bdef.lisp.

Method: elt ((this splits) index)
Package

sb-sequence.

Source

sequence-extensions.lisp.

Method: elt ((this bdef) index)
Package

sb-sequence.

Source

sequence-extensions.lisp.

Method: emptyp ((this splits))
Package

sb-sequence.

Source

sequence-extensions.lisp.

Method: emptyp ((this bdef))
Package

sb-sequence.

Source

sequence-extensions.lisp.

Method: length ((this splits))
Package

sb-sequence.

Source

sequence-extensions.lisp.

Method: length ((this bdef))
Package

sb-sequence.

Source

sequence-extensions.lisp.

Method: print-object ((splits splits) stream)
Source

splits.lisp.

Method: print-object ((bdef bdef) stream)
Source

bdef.lisp.

Method: subseq ((this bdef) start &optional end)
Package

sb-sequence.

Source

sequence-extensions.lisp.


5.1.7 Classes

Class: bdef
Package

bdef.

Source

bdef.lisp.

Direct methods
Direct slots
Slot: name

The name (key) of the bdef.

Type

alexandria:string-designator

Initargs

:name

Readers

bdef-name.

Writers

This slot is read-only.

Slot: buffer

The actual buffer object that the bdef refers to.

Initargs

:buffer

Readers

bdef-buffer.

Writers

This slot is read-only.

Slot: metadata

Hash table of additional data associated with the bdef, accessible with the ‘bdef-metadata’ function.

Type

hash-table

Initform

(make-hash-table)

Initargs

:metadata

Class: splits

List of split data for dividing buffers into pieces.

Package

bdef.

Source

splits.lisp.

Direct superclasses

sequence.

Direct methods
Direct slots
Slot: starts

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.

Type

(vector number)

Initargs

:starts

Slot: ends

The vector of split end points, or NIL if no end points are defined.

Type

(or null (vector number))

Initargs

:ends

Slot: loops

The vector of split loop points, or NIL if no loop points are defined.

Type

(or null (vector number))

Initargs

:loops

Slot: comments

The vector of comments for each split point.

Type

(or null (vector (or null string)))

Initargs

:comments

Slot: unit

The unit type of each split point, i.e. percents, samples, or seconds.

Type

symbol

Initform

:percents

Initargs

:unit

Readers

splits-unit.

Writers

(setf splits-unit).

Slot: bdef

The bdef object that this splits references (i.e. for information like duration, sample rate, etc, for converting point data).

Type

bdef:bdef

Initargs

:bdef

Readers

splits-bdef.

Writers

(setf splits-bdef).

Slot: metadata

Hash table of additional data associated with the splits, accessible with the ‘splits-metadata’ function.

Type

hash-table

Initform

(make-hash-table)

Initargs

:metadata


5.2 Internals


5.2.1 Constants

Constant: +op-1-bytes-in-12-sec+
Package

bdef.

Source

splits.lisp.

Constant: +op-1-drumkit-end+
Package

bdef.

Source

splits.lisp.

Constant: +size-of-uint16-t+
Package

bdef.

Source

splits.lisp.


5.2.2 Special variables

Special Variable: *aubio-python-directory*

The path to Aubio’s "demos" directory.

Package

bdef.

Source

splits.lisp.

Special Variable: *bdef-auto-metadata*

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.

Package

bdef.

Source

bdef.lisp.

Special Variable: *bdef-dictionary*

The bdef dictionary hash table.

See also: ‘find-bdef’

Package

bdef.

Source

bdef.lisp.

Special Variable: *bdef-dynamic-metadata*

Alist of dynamic metadata keys and their get and set functions.

Package

bdef.

Source

bdef.lisp.

Special Variable: *deprecated-function-error-(setf⎵bdef-key)-notified-p*
Package

bdef.

Source

bdef.lisp.

Special Variable: *deprecated-function-error-(setf⎵bdef-ref)-notified-p*
Package

bdef.

Source

bdef.lisp.

Special Variable: *deprecated-function-error-bdef-elt-notified-p*
Package

bdef.

Source

bdef.lisp.

Special Variable: *deprecated-function-error-bdef-get-notified-p*
Package

bdef.

Source

bdef.lisp.

Special Variable: *deprecated-function-error-bdef-key-notified-p*
Package

bdef.

Source

bdef.lisp.

Special Variable: *deprecated-function-error-bdef-metadata-keys-notified-p*
Package

bdef.

Source

bdef.lisp.

Special Variable: *deprecated-function-error-bdef-ref-notified-p*
Package

bdef.

Source

bdef.lisp.

Special Variable: *deprecated-function-error-bdef-set-notified-p*
Package

bdef.

Source

bdef.lisp.

Special Variable: *deprecated-function-error-bdef-subseq-notified-p*
Package

bdef.

Source

bdef.lisp.

Special Variable: *deprecated-function-style-warning-splits-from-audacity-labels-notified-p*
Package

bdef.

Source

splits.lisp.

Special Variable: *deprecated-function-warning-audacity-labels-from-splits-notified-p*
Package

bdef.

Source

splits.lisp.

Special Variable: *deprecated-function-warning-splits-from-aubio-onsets-notified-p*
Package

bdef.

Source

splits.lisp.

Special Variable: *ffmpeg-path*

The path to ffmpeg, or nil if ffmpeg could not be found.

Package

bdef.

Source

bdef.lisp.

Special Variable: *ffprobe-path*

The path to ffprobe, or nil if ffprobe could not be found.

Package

bdef.

Source

bdef.lisp.

Special Variable: *splits-format-auto-detect-functions*

List of functions to check objects against when imported via ‘splits-import’ without its format specified.

Package

bdef.

Source

splits.lisp.


5.2.3 Compiler macros

Compiler Macro: bdef-get (&rest args)
Package

bdef.

Source

bdef.lisp.

Compiler Macro: bdef-ref (&rest args)
Package

bdef.

Source

bdef.lisp.

Compiler Macro: (setf bdef-ref) (args)
Package

bdef.

Source

bdef.lisp.

Compiler Macro: bdef-set (&rest args)
Package

bdef.

Source

bdef.lisp.


5.2.4 Ordinary functions

Function: %splits-conversion-function (splits unit)

Get a function that can be used to convert SPLITS’ unit into the unit type specified.

Package

bdef.

Source

splits.lisp.

Function: %splits-conversion-function-name (splits unit)

Get the name of the conversion function to convert SPLITS’ unit type into the unit specified.

Package

bdef.

Source

splits.lisp.

Function: %splits-ensure-point-type (point)

Ensure POINT is one of the splits point types.

Package

bdef.

Source

splits.lisp.

Function: %splits-ensure-unit (unit)

Ensure UNIT is one of the splits position unit types.

Package

bdef.

Source

splits.lisp.

Function: aubio-demo-bpm (file &key mode)

Use aubio’s demo_bpm_extract.py to get the bpm of FILE.

Package

bdef.

Source

splits.lisp.

Function: aubio-demo-tempo (file &key sample-rate)

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.

Package

bdef.

Source

splits.lisp.

Function: aubio-onsets (file &rest args &key utility algorithm threshold silence minimum-interval buf-size hop-size &allow-other-keys)

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.

Package

bdef.

Source

splits.lisp.

Function: bdef-get (key &optional dictionary)

Deprecated alias for ‘find-bdef’.

Package

bdef.

Source

bdef.lisp.

Function: bdef-ref (name &optional dictionary)

Deprecated alias for ‘find-bdef’.

Package

bdef.

Source

bdef.lisp.

Function: (setf bdef-ref) (name &optional dictionary)

Deprecated alias for ‘(setf find-bdef)’.

Package

bdef.

Source

bdef.lisp.

Function: bdef-set (key value &optional dictionary)

Deprecated alias for ‘(setf find-bdef)’.

Package

bdef.

Source

bdef.lisp.

Function: bpm-tools-bpm (file)

Use bpm-tools’ "bpm" utility to get the BPM of FILE.

Package

bdef.

Source

splits.lisp.

Function: detect-audacity-labels (file)

Returns :audacity if FILE is a valid Audacity labels file.

Package

bdef.

Source

splits.lisp.

Function: end-point (object &optional unit)

Get the end point of OBJECT.

Package

bdef.

Source

splits.lisp.

Function: ensure-namestring (filename)

Get the full path to FILENAME.

Package

bdef.

Source

bdef.lisp.

Function: ensure-readable-audio-file (file &key num-channels backend extensions)

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*’

Package

bdef.

Source

bdef.lisp.

Function: file-exists-p (filename)

True if FILENAME names a file that exists. This function is needed to ensure characters like ? are not interpreted as Common Lisp pathname wildcards.

Package

bdef.

Source

bdef.lisp.

Function: file-metadata (file)

Get the metadata of FILE as a plist.

Package

bdef.

Source

bdef.lisp.

Function: frame-to-op-1-format (frame)

Convert a frame number to the OP-1 split point format.

See also: ‘op-1-format-to-frame’

Package

bdef.

Source

splits.lisp.

Function: op-1-format-to-frame (op-1)

Convert a frame number to the OP-1 split point format.

See also: ‘op-1-format-to-frame’

Package

bdef.

Source

splits.lisp.

Function: percents-samples (percent total-samples)
Package

bdef.

Source

splits.lisp.

Function: percents-seconds (percent total-seconds)
Package

bdef.

Source

splits.lisp.

Function: samples-percents (samples total-samples)
Package

bdef.

Source

splits.lisp.

Function: samples-seconds (samples sample-rate)
Package

bdef.

Source

splits.lisp.

Function: seconds-percents (seconds total-seconds)
Package

bdef.

Source

splits.lisp.

Function: seconds-samples (seconds sample-rate)
Package

bdef.

Source

splits.lisp.

Function: splits-comments (splits &optional unit)
Package

bdef.

Source

splits.lisp.

Function: splits-ends (splits &optional unit)
Package

bdef.

Source

splits.lisp.

Function: splits-import-detect-format (source)

Auto-detect the format of SOURCE by testing it through ‘*splits-format-auto-detect-functions*’. Returns a list of the possible formats detected.

Package

bdef.

Source

splits.lisp.

Function: splits-loops (splits &optional unit)
Package

bdef.

Source

splits.lisp.

Function: splits-starts (splits &optional unit)
Package

bdef.

Source

splits.lisp.

Function: string-extract-bpm (string &key min-bpm max-bpm)

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.

Package

bdef.

Source

splits.lisp.


5.2.5 Generic functions

Generic Function: bdef-backend-free (buffer)

Free a buffer via its backend.

See also: ‘bdef-backend-load’

Package

bdef.

Source

bdef.lisp.

Generic Function: bdef-backend-load (backend object &key &allow-other-keys)

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’

Package

bdef.

Source

bdef.lisp.

Methods
Method: bdef-backend-load (backend (object pathname) &rest args &key &allow-other-keys)
Generic Function: bdef-backend-supported-file-types (backend)

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’

Package

bdef.

Source

bdef.lisp.

Generic Function: bdef-load (object &key backend num-channels wavetable metadata &allow-other-keys)

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.

Package

bdef.

Source

bdef.lisp.

Methods
Method: bdef-load ((file string) &rest args &key backend num-channels wavetable metadata &allow-other-keys)
Generic Reader: splits-bdef (object)
Generic Writer: (setf splits-bdef) (object)
Package

bdef.

Methods
Reader Method: splits-bdef ((splits splits))
Writer Method: (setf splits-bdef) ((splits splits))

The bdef object that this splits references (i.e. for information like duration, sample rate, etc, for converting point data).

Source

splits.lisp.

Target Slot

bdef.

Generic Function: splits-metadata (splits &optional key)

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.

Package

bdef.

Source

splits.lisp.

Methods
Method: splits-metadata ((splits splits) &optional key)
Generic Function: (setf splits-metadata) (splits &optional key)
Package

bdef.

Methods
Method: (setf splits-metadata) ((splits splits) &optional key)
Source

splits.lisp.

Generic Reader: splits-unit (object)
Generic Writer: (setf splits-unit) (object)
Package

bdef.

Methods
Reader Method: splits-unit ((splits splits))
Writer Method: (setf splits-unit) ((splits splits))

The unit type of each split point, i.e. percents, samples, or seconds.

Source

splits.lisp.

Target Slot

unit.


5.2.6 Conditions

Condition: file-does-not-exist
Package

bdef.

Source

bdef.lisp.

Direct superclasses
  • file-error.
  • simple-condition.

Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   %   (  
A   B   C   D   E   F   G   L   M   O   P   R   S  
Index Entry  Section

%
%splits-conversion-function: Private ordinary functions
%splits-conversion-function-name: Private ordinary functions
%splits-ensure-point-type: Private ordinary functions
%splits-ensure-unit: Private ordinary functions

(
(setf bdef-key): Public compiler macros
(setf bdef-key): Public ordinary functions
(setf bdef-metadata): Public generic functions
(setf bdef-metadata): Public generic functions
(setf bdef-metadata): Public generic functions
(setf bdef-metadata): Public generic functions
(setf bdef-metadata): Public generic functions
(setf bdef-ref): Private compiler macros
(setf bdef-ref): Private ordinary functions
(setf bdef-splits): Public ordinary functions
(setf find-bdef): Public ordinary functions
(setf splits-bdef): Private generic functions
(setf splits-bdef): Private generic functions
(setf splits-metadata): Private generic functions
(setf splits-metadata): Private generic functions
(setf splits-unit): Private generic functions
(setf splits-unit): Private generic functions

A
all-bdef-names: Public ordinary functions
all-bdefs: Public ordinary functions
aubio-demo-bpm: Private ordinary functions
aubio-demo-tempo: Private ordinary functions
aubio-onsets: Private ordinary functions
audacity-labels-from-splits: Public compiler macros
audacity-labels-from-splits: Public ordinary functions

B
bdef: Public ordinary functions
bdef-backend-free: Private generic functions
bdef-backend-load: Private generic functions
bdef-backend-load: Private generic functions
bdef-backend-supported-file-types: Private generic functions
bdef-buffer: Public generic functions
bdef-buffer: Public generic functions
bdef-buffer: Public generic functions
bdef-buffer: Public generic functions
bdef-buffer: Public generic functions
bdef-channels: Public generic functions
bdef-channels: Public generic functions
bdef-channels: Public generic functions
bdef-dur: Public generic functions
bdef-dur: Public generic functions
bdef-duration: Public generic functions
bdef-duration: Public generic functions
bdef-elt: Public compiler macros
bdef-elt: Public ordinary functions
bdef-file: Public generic functions
bdef-file: Public generic functions
bdef-file: Public generic functions
bdef-frame: Public generic functions
bdef-frame: Public generic functions
bdef-frames: Public generic functions
bdef-frames: Public generic functions
bdef-frames: Public generic functions
bdef-free: Public ordinary functions
bdef-get: Private compiler macros
bdef-get: Private ordinary functions
bdef-id: Public generic functions
bdef-id: Public generic functions
bdef-id: Public generic functions
bdef-id: Public generic functions
bdef-id: Public generic functions
bdef-id: Public generic functions
bdef-key: Public compiler macros
bdef-key: Public ordinary functions
bdef-length: Public generic functions
bdef-length: Public generic functions
bdef-length: Public generic functions
bdef-load: Private generic functions
bdef-load: Private generic functions
bdef-metadata: Public generic functions
bdef-metadata: Public generic functions
bdef-metadata: Public generic functions
bdef-metadata: Public generic functions
bdef-metadata: Public generic functions
bdef-metadata-keys: Public compiler macros
bdef-metadata-keys: Public ordinary functions
bdef-name: Public generic functions
bdef-name: Public generic functions
bdef-name: Public generic functions
bdef-name: Public generic functions
bdef-names: Public ordinary functions
bdef-p: Public ordinary functions
bdef-ref: Private compiler macros
bdef-ref: Private ordinary functions
bdef-sample-rate: Public generic functions
bdef-sample-rate: Public generic functions
bdef-sample-rate: Public generic functions
bdef-set: Private compiler macros
bdef-set: Private ordinary functions
bdef-splits: Public ordinary functions
bdef-splits-events: Public ordinary functions
bdef-subseq: Public compiler macros
bdef-subseq: Public ordinary functions
bdef-tempo: Public generic functions
bdef-tempo: Public generic functions
bpm-tools-bpm: Private ordinary functions

C
Compiler Macro, (setf bdef-key): Public compiler macros
Compiler Macro, (setf bdef-ref): Private compiler macros
Compiler Macro, audacity-labels-from-splits: Public compiler macros
Compiler Macro, bdef-elt: Public compiler macros
Compiler Macro, bdef-get: Private compiler macros
Compiler Macro, bdef-key: Public compiler macros
Compiler Macro, bdef-metadata-keys: Public compiler macros
Compiler Macro, bdef-ref: Private compiler macros
Compiler Macro, bdef-set: Private compiler macros
Compiler Macro, bdef-subseq: Public compiler macros
Compiler Macro, splits-from-aubio-onsets: Public compiler macros
Compiler Macro, splits-from-audacity-labels: Public compiler macros

D
define-bdef-auto-metadata: Public macros
define-bdef-dynamic-metadata: Public macros
describe-object: Public standalone methods
describe-object: Public standalone methods
detect-audacity-labels: Private ordinary functions

E
elt: Public standalone methods
elt: Public standalone methods
emptyp: Public standalone methods
emptyp: Public standalone methods
end-point: Private ordinary functions
ensure-namestring: Private ordinary functions
ensure-readable-audio-file: Private ordinary functions

F
file-exists-p: Private ordinary functions
file-metadata: Private ordinary functions
find-bdef: Public ordinary functions
frame-to-op-1-format: Private ordinary functions
Function, %splits-conversion-function: Private ordinary functions
Function, %splits-conversion-function-name: Private ordinary functions
Function, %splits-ensure-point-type: Private ordinary functions
Function, %splits-ensure-unit: Private ordinary functions
Function, (setf bdef-key): Public ordinary functions
Function, (setf bdef-ref): Private ordinary functions
Function, (setf bdef-splits): Public ordinary functions
Function, (setf find-bdef): Public ordinary functions
Function, all-bdef-names: Public ordinary functions
Function, all-bdefs: Public ordinary functions
Function, aubio-demo-bpm: Private ordinary functions
Function, aubio-demo-tempo: Private ordinary functions
Function, aubio-onsets: Private ordinary functions
Function, audacity-labels-from-splits: Public ordinary functions
Function, bdef: Public ordinary functions
Function, bdef-elt: Public ordinary functions
Function, bdef-free: Public ordinary functions
Function, bdef-get: Private ordinary functions
Function, bdef-key: Public ordinary functions
Function, bdef-metadata-keys: Public ordinary functions
Function, bdef-names: Public ordinary functions
Function, bdef-p: Public ordinary functions
Function, bdef-ref: Private ordinary functions
Function, bdef-set: Private ordinary functions
Function, bdef-splits: Public ordinary functions
Function, bdef-splits-events: Public ordinary functions
Function, bdef-subseq: Public ordinary functions
Function, bpm-tools-bpm: Private ordinary functions
Function, detect-audacity-labels: Private ordinary functions
Function, end-point: Private ordinary functions
Function, ensure-namestring: Private ordinary functions
Function, ensure-readable-audio-file: Private ordinary functions
Function, file-exists-p: Private ordinary functions
Function, file-metadata: Private ordinary functions
Function, find-bdef: Public ordinary functions
Function, frame-to-op-1-format: Private ordinary functions
Function, make-splits: Public ordinary functions
Function, op-1-format-to-frame: Private ordinary functions
Function, percents-samples: Private ordinary functions
Function, percents-seconds: Private ordinary functions
Function, remove-bdef-auto-metadata: Public ordinary functions
Function, remove-bdef-dynamic-metadata: Public ordinary functions
Function, samples-percents: Private ordinary functions
Function, samples-seconds: Private ordinary functions
Function, seconds-percents: Private ordinary functions
Function, seconds-samples: Private ordinary functions
Function, set-bdef-auto-metadata: Public ordinary functions
Function, splits-comments: Private ordinary functions
Function, splits-ends: Private ordinary functions
Function, splits-from-aubio: Public ordinary functions
Function, splits-from-aubio-onsets: Public ordinary functions
Function, splits-from-audacity-labels: Public ordinary functions
Function, splits-from-op-1-drumset: Public ordinary functions
Function, splits-import: Public ordinary functions
Function, splits-import-detect-format: Private ordinary functions
Function, splits-length: Public ordinary functions
Function, splits-loops: Private ordinary functions
Function, splits-p: Public ordinary functions
Function, splits-point: Public ordinary functions
Function, splits-points: Public ordinary functions
Function, splits-starts: Private ordinary functions
Function, string-extract-bpm: Private ordinary functions

G
Generic Function, (setf bdef-metadata): Public generic functions
Generic Function, (setf splits-bdef): Private generic functions
Generic Function, (setf splits-metadata): Private generic functions
Generic Function, (setf splits-unit): Private generic functions
Generic Function, bdef-backend-free: Private generic functions
Generic Function, bdef-backend-load: Private generic functions
Generic Function, bdef-backend-supported-file-types: Private generic functions
Generic Function, bdef-buffer: Public generic functions
Generic Function, bdef-channels: Public generic functions
Generic Function, bdef-dur: Public generic functions
Generic Function, bdef-duration: Public generic functions
Generic Function, bdef-file: Public generic functions
Generic Function, bdef-frame: Public generic functions
Generic Function, bdef-frames: Public generic functions
Generic Function, bdef-id: Public generic functions
Generic Function, bdef-length: Public generic functions
Generic Function, bdef-load: Private generic functions
Generic Function, bdef-metadata: Public generic functions
Generic Function, bdef-name: Public generic functions
Generic Function, bdef-sample-rate: Public generic functions
Generic Function, bdef-tempo: Public generic functions
Generic Function, splits-bdef: Private generic functions
Generic Function, splits-export: Public generic functions
Generic Function, splits-import-format: Public generic functions
Generic Function, splits-metadata: Private generic functions
Generic Function, splits-unit: Private generic functions

L
length: Public standalone methods
length: Public standalone methods

M
Macro, define-bdef-auto-metadata: Public macros
Macro, define-bdef-dynamic-metadata: Public macros
make-splits: Public ordinary functions
Method, (setf bdef-metadata): Public generic functions
Method, (setf bdef-metadata): Public generic functions
Method, (setf bdef-metadata): Public generic functions
Method, (setf bdef-metadata): Public generic functions
Method, (setf splits-bdef): Private generic functions
Method, (setf splits-metadata): Private generic functions
Method, (setf splits-unit): Private generic functions
Method, bdef-backend-load: Private generic functions
Method, bdef-buffer: Public generic functions
Method, bdef-buffer: Public generic functions
Method, bdef-buffer: Public generic functions
Method, bdef-buffer: Public generic functions
Method, bdef-channels: Public generic functions
Method, bdef-channels: Public generic functions
Method, bdef-dur: Public generic functions
Method, bdef-duration: Public generic functions
Method, bdef-file: Public generic functions
Method, bdef-file: Public generic functions
Method, bdef-frame: Public generic functions
Method, bdef-frames: Public generic functions
Method, bdef-frames: Public generic functions
Method, bdef-id: Public generic functions
Method, bdef-id: Public generic functions
Method, bdef-id: Public generic functions
Method, bdef-id: Public generic functions
Method, bdef-id: Public generic functions
Method, bdef-length: Public generic functions
Method, bdef-length: Public generic functions
Method, bdef-load: Private generic functions
Method, bdef-metadata: Public generic functions
Method, bdef-metadata: Public generic functions
Method, bdef-metadata: Public generic functions
Method, bdef-metadata: Public generic functions
Method, bdef-name: Public generic functions
Method, bdef-name: Public generic functions
Method, bdef-name: Public generic functions
Method, bdef-sample-rate: Public generic functions
Method, bdef-sample-rate: Public generic functions
Method, bdef-tempo: Public generic functions
Method, describe-object: Public standalone methods
Method, describe-object: Public standalone methods
Method, elt: Public standalone methods
Method, elt: Public standalone methods
Method, emptyp: Public standalone methods
Method, emptyp: Public standalone methods
Method, length: Public standalone methods
Method, length: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, splits-bdef: Private generic functions
Method, splits-export: Public generic functions
Method, splits-export: Public generic functions
Method, splits-export: Public generic functions
Method, splits-export: Public generic functions
Method, splits-import-format: Public generic functions
Method, splits-import-format: Public generic functions
Method, splits-metadata: Private generic functions
Method, splits-unit: Private generic functions
Method, subseq: Public standalone methods

O
op-1-format-to-frame: Private ordinary functions

P
percents-samples: Private ordinary functions
percents-seconds: Private ordinary functions
print-object: Public standalone methods
print-object: Public standalone methods

R
remove-bdef-auto-metadata: Public ordinary functions
remove-bdef-dynamic-metadata: Public ordinary functions

S
samples-percents: Private ordinary functions
samples-seconds: Private ordinary functions
seconds-percents: Private ordinary functions
seconds-samples: Private ordinary functions
set-bdef-auto-metadata: Public ordinary functions
splits-bdef: Private generic functions
splits-bdef: Private generic functions
splits-comments: Private ordinary functions
splits-ends: Private ordinary functions
splits-export: Public generic functions
splits-export: Public generic functions
splits-export: Public generic functions
splits-export: Public generic functions
splits-export: Public generic functions
splits-from-aubio: Public ordinary functions
splits-from-aubio-onsets: Public compiler macros
splits-from-aubio-onsets: Public ordinary functions
splits-from-audacity-labels: Public compiler macros
splits-from-audacity-labels: Public ordinary functions
splits-from-op-1-drumset: Public ordinary functions
splits-import: Public ordinary functions
splits-import-detect-format: Private ordinary functions
splits-import-format: Public generic functions
splits-import-format: Public generic functions
splits-import-format: Public generic functions
splits-length: Public ordinary functions
splits-loops: Private ordinary functions
splits-metadata: Private generic functions
splits-metadata: Private generic functions
splits-p: Public ordinary functions
splits-point: Public ordinary functions
splits-points: Public ordinary functions
splits-starts: Private ordinary functions
splits-unit: Private generic functions
splits-unit: Private generic functions
string-extract-bpm: Private ordinary functions
subseq: Public standalone methods


A.3 Variables

Jump to:   *   +  
B   C   E   L   M   N   S   U  
Index Entry  Section

*
*aubio-python-directory*: Private special variables
*bdef-auto-metadata*: Private special variables
*bdef-backends*: Public special variables
*bdef-default-num-channels*: Public special variables
*bdef-dictionary*: Private special variables
*bdef-dynamic-metadata*: Private special variables
*bdef-temporary-directory*: Public special variables
*deprecated-function-error-(setf⎵bdef-key)-notified-p*: Private special variables
*deprecated-function-error-(setf⎵bdef-ref)-notified-p*: Private special variables
*deprecated-function-error-bdef-elt-notified-p*: Private special variables
*deprecated-function-error-bdef-get-notified-p*: Private special variables
*deprecated-function-error-bdef-key-notified-p*: Private special variables
*deprecated-function-error-bdef-metadata-keys-notified-p*: Private special variables
*deprecated-function-error-bdef-ref-notified-p*: Private special variables
*deprecated-function-error-bdef-set-notified-p*: Private special variables
*deprecated-function-error-bdef-subseq-notified-p*: Private special variables
*deprecated-function-style-warning-splits-from-audacity-labels-notified-p*: Private special variables
*deprecated-function-warning-audacity-labels-from-splits-notified-p*: Private special variables
*deprecated-function-warning-splits-from-aubio-onsets-notified-p*: Private special variables
*ffmpeg-path*: Private special variables
*ffprobe-path*: Private special variables
*splits-format-auto-detect-functions*: Private special variables

+
+op-1-bytes-in-12-sec+: Private constants
+op-1-drumkit-end+: Private constants
+size-of-uint16-t+: Private constants

B
bdef: Public classes
buffer: Public classes

C
comments: Public classes
Constant, +op-1-bytes-in-12-sec+: Private constants
Constant, +op-1-drumkit-end+: Private constants
Constant, +size-of-uint16-t+: Private constants

E
ends: Public classes

L
loops: Public classes

M
metadata: Public classes
metadata: Public classes

N
name: Public classes

S
Slot, bdef: Public classes
Slot, buffer: Public classes
Slot, comments: Public classes
Slot, ends: Public classes
Slot, loops: Public classes
Slot, metadata: Public classes
Slot, metadata: Public classes
Slot, name: Public classes
Slot, starts: Public classes
Slot, unit: Public classes
Special Variable, *aubio-python-directory*: Private special variables
Special Variable, *bdef-auto-metadata*: Private special variables
Special Variable, *bdef-backends*: Public special variables
Special Variable, *bdef-default-num-channels*: Public special variables
Special Variable, *bdef-dictionary*: Private special variables
Special Variable, *bdef-dynamic-metadata*: Private special variables
Special Variable, *bdef-temporary-directory*: Public special variables
Special Variable, *deprecated-function-error-(setf⎵bdef-key)-notified-p*: Private special variables
Special Variable, *deprecated-function-error-(setf⎵bdef-ref)-notified-p*: Private special variables
Special Variable, *deprecated-function-error-bdef-elt-notified-p*: Private special variables
Special Variable, *deprecated-function-error-bdef-get-notified-p*: Private special variables
Special Variable, *deprecated-function-error-bdef-key-notified-p*: Private special variables
Special Variable, *deprecated-function-error-bdef-metadata-keys-notified-p*: Private special variables
Special Variable, *deprecated-function-error-bdef-ref-notified-p*: Private special variables
Special Variable, *deprecated-function-error-bdef-set-notified-p*: Private special variables
Special Variable, *deprecated-function-error-bdef-subseq-notified-p*: Private special variables
Special Variable, *deprecated-function-style-warning-splits-from-audacity-labels-notified-p*: Private special variables
Special Variable, *deprecated-function-warning-audacity-labels-from-splits-notified-p*: Private special variables
Special Variable, *deprecated-function-warning-splits-from-aubio-onsets-notified-p*: Private special variables
Special Variable, *ffmpeg-path*: Private special variables
Special Variable, *ffprobe-path*: Private special variables
Special Variable, *splits-format-auto-detect-functions*: Private special variables
starts: Public classes

U
unit: Public classes