Next: Introduction, Previous: (dir), Up: (dir) [Contents][Index]
This is the cl-mixed Reference Manual, version 2.0.0, generated automatically by Declt version 3.0 "Montgomery Scott" on Tue Dec 22 12:32:44 2020 GMT+0.
• Introduction | What cl-mixed is all about | |
• Systems | The systems documentation | |
• Modules | The modules documentation | |
• Files | The files documentation | |
• Packages | The packages documentation | |
• Definitions | The symbols documentation | |
• Indexes | Concepts, functions, variables and data types |
# About cl-mixed This is a bindings library to "libmixed"(https://github.com/Shirakumo/libmixed), an audio mixing and processing library. ## How To Precompiled versions of the underlying library are included in this for most common system combinations. If you want to build it manually however, refer to the "libmixed"(https://github.com/Shirakumo/libmixed) repository. Examples on how to use cl-mixed can be found in the "examples"(link examples/) directory. This also includes an example on how to create a custom audio processing element in pure lisp. cl-mixed also ships a variety of "extension"(link extensions/) systems providing segments that can be used for playing back audio on various sound systems, or reading audio from various formats.
Next: Modules, Previous: Introduction, Up: Top [Contents][Index]
The main system appears first, followed by any subsystem dependency.
• The cl-mixed system |
Nicolas Hafner <shinmera@tymoon.eu>
Nicolas Hafner <shinmera@tymoon.eu>
(:git "https://github.com/shirakumo/cl-mixed.git")
zlib
Bindings to libmixed, a sound mixing and processing library.
2.0.0
cl-mixed.asd (file)
Modules are listed depth-first from the system components tree.
• The cl-mixed/segments module |
mixer.lisp (file)
cl-mixed (system)
segments/
Files are sorted by type and then listed depth-first from the systems components trees.
• Lisp files |
Next: The cl-mixed/package․lisp file, Previous: Lisp files, Up: Lisp files [Contents][Index]
cl-mixed.asd
cl-mixed (system)
Next: The cl-mixed/low-level․lisp file, Previous: The cl-mixed․asd file, Up: Lisp files [Contents][Index]
cl-mixed (system)
package.lisp
Next: The cl-mixed/toolkit․lisp file, Previous: The cl-mixed/package․lisp file, Up: Lisp files [Contents][Index]
package.lisp (file)
cl-mixed (system)
low-level.lisp
*here* (special variable)
Next: The cl-mixed/c-object․lisp file, Previous: The cl-mixed/low-level․lisp file, Up: Lisp files [Contents][Index]
low-level.lisp (file)
cl-mixed (system)
toolkit.lisp
Next: The cl-mixed/bip-buffer․lisp file, Previous: The cl-mixed/toolkit․lisp file, Up: Lisp files [Contents][Index]
toolkit.lisp (file)
cl-mixed (system)
c-object.lisp
*c-object-table* (special variable)
Next: The cl-mixed/buffer․lisp file, Previous: The cl-mixed/c-object․lisp file, Up: Lisp files [Contents][Index]
c-object.lisp (file)
cl-mixed (system)
bip-buffer.lisp
Next: The cl-mixed/pack․lisp file, Previous: The cl-mixed/bip-buffer․lisp file, Up: Lisp files [Contents][Index]
bip-buffer.lisp (file)
cl-mixed (system)
buffer.lisp
allocate-handle (method)
Next: The cl-mixed/segment․lisp file, Previous: The cl-mixed/buffer․lisp file, Up: Lisp files [Contents][Index]
buffer.lisp (file)
cl-mixed (system)
pack.lisp
allocate-handle (method)
Next: The cl-mixed/generic․lisp file, Previous: The cl-mixed/pack․lisp file, Up: Lisp files [Contents][Index]
pack.lisp (file)
cl-mixed (system)
segment.lisp
Next: The cl-mixed/drain․lisp file, Previous: The cl-mixed/segment․lisp file, Up: Lisp files [Contents][Index]
segment.lisp (file)
cl-mixed (system)
generic.lisp
Next: The cl-mixed/source․lisp file, Previous: The cl-mixed/generic․lisp file, Up: Lisp files [Contents][Index]
generic.lisp (file)
cl-mixed (system)
drain.lisp
Next: The cl-mixed/mixer․lisp file, Previous: The cl-mixed/drain․lisp file, Up: Lisp files [Contents][Index]
drain.lisp (file)
cl-mixed (system)
source.lisp
Next: The cl-mixed/segments/basic-mixer․lisp file, Previous: The cl-mixed/source․lisp file, Up: Lisp files [Contents][Index]
source.lisp (file)
cl-mixed (system)
mixer.lisp
Next: The cl-mixed/segments/bundle․lisp file, Previous: The cl-mixed/mixer․lisp file, Up: Lisp files [Contents][Index]
segments (module)
segments/basic-mixer.lisp
Next: The cl-mixed/segments/chain․lisp file, Previous: The cl-mixed/segments/basic-mixer․lisp file, Up: Lisp files [Contents][Index]
segments (module)
segments/bundle.lisp
Next: The cl-mixed/segments/channel-convert․lisp file, Previous: The cl-mixed/segments/bundle․lisp file, Up: Lisp files [Contents][Index]
segments (module)
segments/chain.lisp
Next: The cl-mixed/segments/delay․lisp file, Previous: The cl-mixed/segments/chain․lisp file, Up: Lisp files [Contents][Index]
segments (module)
segments/channel-convert.lisp
Next: The cl-mixed/segments/distribute․lisp file, Previous: The cl-mixed/segments/channel-convert․lisp file, Up: Lisp files [Contents][Index]
segments (module)
segments/delay.lisp
Next: The cl-mixed/segments/fader․lisp file, Previous: The cl-mixed/segments/delay․lisp file, Up: Lisp files [Contents][Index]
segments (module)
segments/distribute.lisp
Next: The cl-mixed/segments/frequency-pass․lisp file, Previous: The cl-mixed/segments/distribute․lisp file, Up: Lisp files [Contents][Index]
segments (module)
segments/fader.lisp
Next: The cl-mixed/segments/gate․lisp file, Previous: The cl-mixed/segments/fader․lisp file, Up: Lisp files [Contents][Index]
segments (module)
segments/frequency-pass.lisp
Next: The cl-mixed/segments/generator․lisp file, Previous: The cl-mixed/segments/frequency-pass․lisp file, Up: Lisp files [Contents][Index]
segments (module)
segments/gate.lisp
Next: The cl-mixed/segments/ladspa․lisp file, Previous: The cl-mixed/segments/gate․lisp file, Up: Lisp files [Contents][Index]
segments (module)
segments/generator.lisp
Next: The cl-mixed/segments/noise․lisp file, Previous: The cl-mixed/segments/generator․lisp file, Up: Lisp files [Contents][Index]
segments (module)
segments/ladspa.lisp
Next: The cl-mixed/segments/null․lisp file, Previous: The cl-mixed/segments/ladspa․lisp file, Up: Lisp files [Contents][Index]
segments (module)
segments/noise.lisp
Next: The cl-mixed/segments/packer․lisp file, Previous: The cl-mixed/segments/noise․lisp file, Up: Lisp files [Contents][Index]
segments (module)
segments/null.lisp
Next: The cl-mixed/segments/pitch․lisp file, Previous: The cl-mixed/segments/null․lisp file, Up: Lisp files [Contents][Index]
segments (module)
segments/packer.lisp
Next: The cl-mixed/segments/quantize․lisp file, Previous: The cl-mixed/segments/packer․lisp file, Up: Lisp files [Contents][Index]
segments (module)
segments/pitch.lisp
Next: The cl-mixed/segments/queue․lisp file, Previous: The cl-mixed/segments/pitch․lisp file, Up: Lisp files [Contents][Index]
segments (module)
segments/quantize.lisp
Next: The cl-mixed/segments/repeat․lisp file, Previous: The cl-mixed/segments/quantize․lisp file, Up: Lisp files [Contents][Index]
segments (module)
segments/queue.lisp
Next: The cl-mixed/segments/space-mixer․lisp file, Previous: The cl-mixed/segments/queue․lisp file, Up: Lisp files [Contents][Index]
segments (module)
segments/repeat.lisp
Next: The cl-mixed/segments/speed-change․lisp file, Previous: The cl-mixed/segments/repeat․lisp file, Up: Lisp files [Contents][Index]
segments (module)
segments/space-mixer.lisp
Next: The cl-mixed/segments/unpacker․lisp file, Previous: The cl-mixed/segments/space-mixer․lisp file, Up: Lisp files [Contents][Index]
segments (module)
segments/speed-change.lisp
Next: The cl-mixed/segments/virtual․lisp file, Previous: The cl-mixed/segments/speed-change․lisp file, Up: Lisp files [Contents][Index]
segments (module)
segments/unpacker.lisp
Next: The cl-mixed/segments/volume-control․lisp file, Previous: The cl-mixed/segments/unpacker․lisp file, Up: Lisp files [Contents][Index]
segments (module)
segments/virtual.lisp
Next: The cl-mixed/documentation․lisp file, Previous: The cl-mixed/segments/virtual․lisp file, Up: Lisp files [Contents][Index]
segments (module)
segments/volume-control.lisp
Previous: The cl-mixed/segments/volume-control․lisp file, Up: Lisp files [Contents][Index]
Next: Definitions, Previous: Files, Up: Top [Contents][Index]
Packages are listed by definition order.
• The org.shirakumo.fraf.mixed.cffi package | ||
• The org.shirakumo.fraf.mixed package |
Next: The org․shirakumo․fraf․mixed package, Previous: Packages, Up: Packages [Contents][Index]
package.lisp (file)
*here* (special variable)
Previous: The org․shirakumo․fraf․mixed․cffi package, Up: Packages [Contents][Index]
package.lisp (file)
Definitions are sorted by export status, category, package, and then by lexicographic order.
• Exported definitions | ||
• Internal definitions |
Next: Internal definitions, Previous: Definitions, Up: Definitions [Contents][Index]
• Exported special variables | ||
• Exported macros | ||
• Exported functions | ||
• Exported generic functions | ||
• Exported conditions | ||
• Exported classes |
Next: Exported macros, Previous: Exported definitions, Up: Exported definitions [Contents][Index]
toolkit.lisp (file)
This variable holds the default sample rate used throughout.
This is set to 44100 for 44.1 kHz, which is
the standard sample rate for CD audio and should
thus be of sufficient quality for most purposes.
toolkit.lisp (file)
Variable containing the path to the static directory. That directory contains the precompiled library binaries.
low-level.lisp (file)
Next: Exported functions, Previous: Exported special variables, Up: Exported definitions [Contents][Index]
bip-buffer.lisp (file)
bip-buffer.lisp (file)
Create a number of buffers for the duration of the body.
BUFFERS should be a list of symbols, to each of which a fresh instance of a BUFFER with a size of SAMPLES will be bound.
buffer.lisp (file)
chain.lisp (file)
c-object.lisp (file)
Next: Exported generic functions, Previous: Exported macros, Up: Exported definitions [Contents][Index]
bip-buffer.lisp (file)
bip-buffer.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
bip-buffer.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
bip-buffer.lisp (file)
bip-buffer.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
toolkit.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
Create a new basic mixer, adding the given buffers as inputs.
See BASIC-MIXER
See ADD
See WITHDRAW
basic-mixer.lisp (file)
low-level.lisp (file)
Create a new buffer.
You may pass either an integer denoting the length of the
buffer in samples, or a vector of single-floats denoting the
buffers’ initial contents.
See BUFFER
buffer.lisp (file)
bundle.lisp (file)
chain.lisp (file)
channel-convert.lisp (file)
Create a new delay segment.
See DELAY
delay.lisp (file)
distribute.lisp (file)
Create a new volume fader segment.
See FADER
fader.lisp (file)
Create a new frequency pass segment.
PASS can be either :high or :low, which will cause
high and low frequencies to pass through the filter
respectively.
See FREQUENCY-PASS
frequency-pass.lisp (file)
gate.lisp (file)
Create a new tone generator.
See GENERATOR
generator.lisp (file)
Create a new LADSPA segment.
The file must point to a valid shared library and the
index should designate the requested plugin with the
library.
Any additional keys are used to set the corresponding
fields on the segments, allowing you to directly
configure the LADSPA plugin in the same call.
See LADSPA
ladspa.lisp (file)
Create a new noise segment.
The type can be one of :WHITE, :PINK, :BROWN.
See NOISE
noise.lisp (file)
low-level.lisp (file)
pack.lisp (file)
Create a new packer segment.
This automatically creates a packed-audio object to use.
If you prefer to use a packed-audio object you created
yourself, simply use MAKE-INSTANCE instead.
See PACKED-AUDIO
See PACKER
packer.lisp (file)
Create a new pitch shifting segment.
See PITCH
pitch.lisp (file)
quantize.lisp (file)
queue.lisp (file)
Create a new repeat segment.
The time designates the size of the internal buffer
that it can repeat to the output.
See REPEAT
repeat.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
Create a new space-mixer segment for 3D audio processing.
See SPACE-MIXER
space-mixer.lisp (file)
speed-change.lisp (file)
Create a new unpacker segment.
This automatically creates a packed-audi object
to use. If you prefer to use a packed-audio object
you created yourself, simply use MAKE-INSTANCE
instead.
See PACKED-AUDIO
See UNPACKER
unpacker.lisp (file)
null.lisp (file)
Create a new volume control segment.
See VOLUME-CONTROL
volume-control.lisp (file)
null.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
Accessor to the object associated with the given foreign pointer.
See *C-OBJECT-TABLE*
c-object.lisp (file)
(setf pointer->object) (function)
c-object.lisp (file)
pointer->object (function)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
bip-buffer.lisp (file)
bip-buffer.lisp (file)
low-level.lisp (file)
Return the number of bytes required to represent a sample in the given format.
Acceptable values are
:INT8 :UINT8 :INT16 :UINT16 :INT24 :UINT24 :INT32 :UINT32
:FLOAT :DOUBLE
low-level.lisp (file)
toolkit.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
low-level.lisp (file)
Next: Exported conditions, Previous: Exported functions, Up: Exported definitions [Contents][Index]
Add the object to the given collection.
For segment-sequences this means adding a segment to
the sequence. For mixers this means adding another
input buffer.
See SEGMENT-SEQUENCE
See MIXER
space-mixer.lisp (file)
queue.lisp (file)
chain.lisp (file)
basic-mixer.lisp (file)
gate.lisp (file)
bundle.lisp (file)
Accessor to the attenuation function used to describe the distance volume falloff.
The value should be one of
:NONE :LINEAR :INVERSE :EXPONENTIAL
The value may also be a pointer to a C function
of the following signature:
float attenuation(float min,
float max,
float dist,
float roll);
See mixed.h
See SPACE-MIXER
(setf attenuation) (generic function)
space-mixer.lisp (file)
attenuation (generic function)
space-mixer.lisp (file)
Accessor to whether the segment is bypassed or not.
A bypassed segment does not perform any operations when
mixed. The exact effects of this varies per segment, but
usually for a segment that transforms its inputs
somehow this will mean that it just copies the input to
the output verbatim.
Note that not all segments support bypassing. Check the
:FIELDS value in the field’s info plist.
See SEGMENT
See INFO
(setf bypass) (generic function)
volume-control.lisp (file)
unpacker.lisp (file)
speed-change.lisp (file)
repeat.lisp (file)
queue.lisp (file)
quantize.lisp (file)
pitch.lisp (file)
packer.lisp (file)
gate.lisp (file)
frequency-pass.lisp (file)
fader.lisp (file)
delay.lisp (file)
chain.lisp (file)
bundle.lisp (file)
bypass (generic function)
volume-control.lisp (file)
unpacker.lisp (file)
speed-change.lisp (file)
repeat.lisp (file)
queue.lisp (file)
quantize.lisp (file)
pitch.lisp (file)
packer.lisp (file)
gate.lisp (file)
frequency-pass.lisp (file)
fader.lisp (file)
delay.lisp (file)
chain.lisp (file)
bundle.lisp (file)
automatically generated reader method
source.lisp (file)
automatically generated writer method
source.lisp (file)
drain.lisp (file)
source.lisp (file)
Accessor to the number of channels encoded in the data buffer in the object.
See PACKED-AUDIO
(setf channels) (generic function)
unpacker.lisp (file)
space-mixer.lisp (file)
packer.lisp (file)
automatically generated reader method
basic-mixer.lisp (file)
pack.lisp (file)
channels (generic function)
unpacker.lisp (file)
packer.lisp (file)
automatically generated writer method
basic-mixer.lisp (file)
pack.lisp (file)
Clears the buffer to fill its data array with just zeroes.
See BUFFER
queue.lisp (file)
pack.lisp (file)
buffer.lisp (file)
gate.lisp (file)
bundle.lisp (file)
Connect two segments together by connecting their respective input and output to a specific buffer.
See INPUT
See OUTPUT
See SEGMENT
distribute.lisp (file)
segment.lisp (file)
queue.lisp (file)
Accessor to the cutoff frequency of the frequency-pass segment.
See FREQUENCY-PASS
(setf cutoff) (generic function)
frequency-pass.lisp (file)
bundle.lisp (file)
cutoff (generic function)
frequency-pass.lisp (file)
bundle.lisp (file)
Accessor to the raw data array contained in the object.
See BUFFER
See PACKED-AUDIO
(setf data) (generic function)
unpacker.lisp (file)
packer.lisp (file)
automatically generated reader method
pack.lisp (file)
automatically generated reader method
buffer.lisp (file)
data (generic function)
unpacker.lisp (file)
packer.lisp (file)
Accessor for the direction the listener is facing in space.
To set a vector, the value should be a list or a vector
of three floats. When reading, the returned value is
always a vector of three floats.
See SPACE-MIXER
(setf direction) (generic function)
space-mixer.lisp (file)
bundle.lisp (file)
direction (generic function)
space-mixer.lisp (file)
bundle.lisp (file)
automatically generated reader method
source.lisp (file)
automatically generated writer method
source.lisp (file)
Accessor to the over-/under-statement factor of the doppler effect.
See SPACE-MIXER
(setf doppler-factor) (generic function)
space-mixer.lisp (file)
bundle.lisp (file)
doppler-factor (generic function)
space-mixer.lisp (file)
bundle.lisp (file)
Accessor to the duration of the segment’s effect.
Must be measured in seconds.
See FADER
See DELAY
See REPEAT
(setf duration) (generic function)
repeat.lisp (file)
fader.lisp (file)
delay.lisp (file)
bundle.lisp (file)
duration (generic function)
repeat.lisp (file)
fader.lisp (file)
delay.lisp (file)
bundle.lisp (file)
Accessor to the sample encoding of the raw data buffer in the object.
The encoding has to be one of the following:
:INT8 :UINT8 :INT16 :UINT16 :INT24 :UINT24 :INT32 :UINT32
:FLOAT :DOUBLE
See PACKED-AUDIO
(setf encoding) (generic function)
unpacker.lisp (file)
packer.lisp (file)
pack.lisp (file)
encoding (generic function)
unpacker.lisp (file)
packer.lisp (file)
pack.lisp (file)
End the mixing process.
This method should be called as close as possible
after all desired calls to MIX are done. Calling
MIX after END is called is an error. Some segments
may require END to be called before their fields
can be set freely. Thus mixing might need to be
’paused’ to change settings.
See SEGMENT-SEQUENCE
See SEGMENT
See START
See MIX
virtual.lisp (file)
bundle.lisp (file)
segment.lisp (file)
Accessor for the error code contained in the condition instance.
See MIXED:ERROR
See MIXED:ERROR-STRING
(setf error-code) (generic function)
toolkit.lisp (file)
error-code (generic function)
toolkit.lisp (file)
Accessor to the type of easing function used for the fade.
Must be one of :LINEAR :CUBIC-IN :CUBIC-OUT :CUBIC-IN-OUT
See FADER
(setf fade-type) (generic function)
fader.lisp (file)
bundle.lisp (file)
fade-type (generic function)
fader.lisp (file)
bundle.lisp (file)
Access the field of the segment.
Which fields are supported depends on the segment in
question.
Some fields may only be read and not written to or
vice-versa.
See SEGMENT
(setf field) (generic function)
volume-control.lisp (file)
volume-control.lisp (file)
volume-control.lisp (file)
virtual.lisp (file)
unpacker.lisp (file)
unpacker.lisp (file)
speed-change.lisp (file)
speed-change.lisp (file)
space-mixer.lisp (file)
space-mixer.lisp (file)
space-mixer.lisp (file)
space-mixer.lisp (file)
space-mixer.lisp (file)
space-mixer.lisp (file)
space-mixer.lisp (file)
space-mixer.lisp (file)
space-mixer.lisp (file)
space-mixer.lisp (file)
space-mixer.lisp (file)
repeat.lisp (file)
repeat.lisp (file)
repeat.lisp (file)
repeat.lisp (file)
queue.lisp (file)
queue.lisp (file)
queue.lisp (file)
queue.lisp (file)
quantize.lisp (file)
quantize.lisp (file)
quantize.lisp (file)
pitch.lisp (file)
pitch.lisp (file)
pitch.lisp (file)
pitch.lisp (file)
packer.lisp (file)
packer.lisp (file)
noise.lisp (file)
noise.lisp (file)
ladspa.lisp (file)
generator.lisp (file)
generator.lisp (file)
generator.lisp (file)
gate.lisp (file)
gate.lisp (file)
gate.lisp (file)
gate.lisp (file)
gate.lisp (file)
gate.lisp (file)
gate.lisp (file)
frequency-pass.lisp (file)
frequency-pass.lisp (file)
frequency-pass.lisp (file)
frequency-pass.lisp (file)
frequency-pass.lisp (file)
fader.lisp (file)
fader.lisp (file)
fader.lisp (file)
fader.lisp (file)
fader.lisp (file)
delay.lisp (file)
delay.lisp (file)
delay.lisp (file)
chain.lisp (file)
bundle.lisp (file)
basic-mixer.lisp (file)
field (generic function)
volume-control.lisp (file)
volume-control.lisp (file)
volume-control.lisp (file)
virtual.lisp (file)
unpacker.lisp (file)
unpacker.lisp (file)
speed-change.lisp (file)
speed-change.lisp (file)
space-mixer.lisp (file)
space-mixer.lisp (file)
space-mixer.lisp (file)
space-mixer.lisp (file)
space-mixer.lisp (file)
space-mixer.lisp (file)
space-mixer.lisp (file)
space-mixer.lisp (file)
space-mixer.lisp (file)
space-mixer.lisp (file)
space-mixer.lisp (file)
repeat.lisp (file)
repeat.lisp (file)
repeat.lisp (file)
repeat.lisp (file)
queue.lisp (file)
queue.lisp (file)
queue.lisp (file)
quantize.lisp (file)
quantize.lisp (file)
quantize.lisp (file)
pitch.lisp (file)
pitch.lisp (file)
pitch.lisp (file)
pitch.lisp (file)
packer.lisp (file)
packer.lisp (file)
noise.lisp (file)
noise.lisp (file)
ladspa.lisp (file)
generator.lisp (file)
generator.lisp (file)
generator.lisp (file)
gate.lisp (file)
gate.lisp (file)
gate.lisp (file)
gate.lisp (file)
gate.lisp (file)
gate.lisp (file)
gate.lisp (file)
frequency-pass.lisp (file)
frequency-pass.lisp (file)
frequency-pass.lisp (file)
frequency-pass.lisp (file)
frequency-pass.lisp (file)
fader.lisp (file)
fader.lisp (file)
fader.lisp (file)
fader.lisp (file)
fader.lisp (file)
delay.lisp (file)
delay.lisp (file)
delay.lisp (file)
chain.lisp (file)
bundle.lisp (file)
basic-mixer.lisp (file)
segment.lisp (file)
source.lisp (file)
source.lisp (file)
source.lisp (file)
pack.lisp (file)
buffer.lisp (file)
Free the foreign data associated with this object.
This makes sure that the data is properly cleaned up and that
the object can’t accidentally be double-freed or accessed in
any way after the free.
See C-OBJECT
virtual.lisp (file)
bundle.lisp (file)
segment.lisp (file)
pack.lisp (file)
buffer.lisp (file)
c-object.lisp (file)
c-object.lisp (file)
Accessor to the frequency of the wave.
Must be in the range [0.0, samplerate].
See GENERATOR
(setf frequency) (generic function)
generator.lisp (file)
bundle.lisp (file)
frequency (generic function)
generator.lisp (file)
bundle.lisp (file)
Accessor to whether the frequency-pass segment passes high or low frequencies.
Value must be either :HIGH or :LOW.
See FREQUENCY-PASS
(setf frequency-pass) (generic function)
frequency-pass.lisp (file)
bundle.lisp (file)
frequency-pass (generic function)
frequency-pass.lisp (file)
bundle.lisp (file)
Accessor to the starting volume of the fading segment.
Must be in the range of [0.0, infinity[.
See FADER
(setf from) (generic function)
fader.lisp (file)
bundle.lisp (file)
from (generic function)
fader.lisp (file)
bundle.lisp (file)
Accessor to the pointer to the foreign data that this object tracks.
See CFFI:FOREIGN-POINTER
See C-OBJECT
(setf handle) (generic function)
automatically generated reader method
c-object.lisp (file)
c-object.lisp (file)
handle (generic function)
automatically generated writer method
c-object.lisp (file)
gate.lisp (file)
bundle.lisp (file)
queue.lisp (file)
queue.lisp (file)
Fetch metadata information about the segment.
Returns a plist with the following entries:
:NAME — A string denoting the name of the
type of segment this is.
:DESCRIPTION — A string denoting a human-readable
description of the segment.
:FLAGS — A list of flags for the segment.
Should be one of:
:INPLACE — Output and input buffers may be
identical as processing is
in-place.
:MODIFIES-INPUT — The data in the input buffer
is modified.
:MIN-INPUTS — The minimal number of inputs that
needs to be connected to this
segment.
:MAX-INPUTS — The maximal number of inputs that
may be connected to this segment.
:OUTPUTS — The number of outputs that this
segment provides.
:FIELDS — A list of plists describing the
possible flags. Each plist has the
following entries:
:FIELD — The keyword or integer denoting
the field.
:DESCRIPTION — A string for a human-readable
description of what the field
does.
:FLAGS — A list of keywords describing the
applicability of the field. Must
be one of:
:IN — This field is for inputs.
:OUT — This field is for outputs.
:SEGMENT — This field is for the segment.
:SET — This field may be written to.
:GET — This field may be read.
Note that this value is cached after the first
retrieval. You are thus not allowed to modify the
return value.
See SEGMENT
virtual.lisp (file)
bundle.lisp (file)
source.lisp (file)
drain.lisp (file)
segment.lisp (file)
Accessor to the input buffer at the specified location of the segment.
See INPUT-FIELD
See SEGMENT
(setf input) (generic function)
unpacker.lisp (file)
bundle.lisp (file)
segment.lisp (file)
input (generic function)
bundle.lisp (file)
segment.lisp (file)
Access the field of an input of the segment.
Which fields are supported depends on the segment in
question. Usually the :BUFFER field will be recognised
for which the value should be a BUFFER instance.
Some fields may only be read and not written to or
vice-versa.
See SEGMENT
See INPUT
(setf input-field) (generic function)
virtual.lisp (file)
virtual.lisp (file)
unpacker.lisp (file)
space-mixer.lisp (file)
space-mixer.lisp (file)
bundle.lisp (file)
segment.lisp (file)
segment.lisp (file)
input-field (generic function)
virtual.lisp (file)
space-mixer.lisp (file)
space-mixer.lisp (file)
bundle.lisp (file)
segment.lisp (file)
mixer.lisp (file)
mixer.lisp (file)
mixer.lisp (file)
segment.lisp (file)
Accessor for the location of the source in space.
To set a vector, the value should be a list or a vector
of three floats. When reading, the returned value is
always a vector of three floats.
See SPACE-MIXER
(setf input-location) (generic function)
space-mixer.lisp (file)
space-mixer.lisp (file)
input-location (generic function)
space-mixer.lisp (file)
space-mixer.lisp (file)
Accessor for the velocity of the source in space.
To set a vector, the value should be a list or a vector
of three floats. When reading, the returned value is
always a vector of three floats.
See SPACE-MIXER
(setf input-velocity) (generic function)
space-mixer.lisp (file)
space-mixer.lisp (file)
input-velocity (generic function)
space-mixer.lisp (file)
space-mixer.lisp (file)
Accessor to the vector of input buffers connected to the segment.
This vector will become out of date if the segment’s
buffers are added or removed from the C side directly,
or directly through this vector. Thus you should never
modify this directly and instead always
make sure to go through INPUT.
See SEGMENT
See INPUT
bundle.lisp (file)
automatically generated reader method
segment.lisp (file)
Accessor for the location of the listener in space.
To set a vector, the value should be a list or a vector
of three floats. When reading, the returned value is
always a vector of three floats.
See SPACE-MIXER
(setf location) (generic function)
space-mixer.lisp (file)
bundle.lisp (file)
location (generic function)
space-mixer.lisp (file)
bundle.lisp (file)
segment.lisp (file)
Accessor to the maximal distance above which the source is inaudible.
See SPACE-MIXER
(setf max-distance) (generic function)
space-mixer.lisp (file)
bundle.lisp (file)
max-distance (generic function)
space-mixer.lisp (file)
bundle.lisp (file)
Accessor to the minimal distance below which the source is at max volume.
See SPACE-MIXER
(setf min-distance) (generic function)
space-mixer.lisp (file)
bundle.lisp (file)
min-distance (generic function)
space-mixer.lisp (file)
bundle.lisp (file)
Perform the actual mixing.
This processes the given number of samples through
the pipeline. It is your job to make sure that
sources provide enough fresh samples and drains
will consume enough samples. Calling MIX with more
samples specified than any one buffer connected to
the segments in the sequence can hold is an error and
may crash your system. No checks for this problem
are done.
Calling MIX before START has been called or after
END has been called is an error and may result in
crashes. No checks for this problem are done.
If you want to ensure that the sequence is complete and able to process the requested number of samples, you should call CHECK-COMPLETE after running START.
When adding methods to MIX for virtual segments, you
should make sure to return true, unless your segment
has somehow ended and exhausted the samples it wants
to process, in which case you should return NIL.
See SEGMENT-SEQUENCE
See SEGMENT
See START
See END
virtual.lisp (file)
bundle.lisp (file)
segment.lisp (file)
Accessor to the type of noise being generated.
The value must be one of :WHITE, :PINK, :BROWN.
See NOISE
(setf noise-type) (generic function)
noise.lisp (file)
bundle.lisp (file)
noise-type (generic function)
noise.lisp (file)
bundle.lisp (file)
gate.lisp (file)
bundle.lisp (file)
queue.lisp (file)
queue.lisp (file)
Accessor to the output buffer at the specified location of the segment.
See OUTPUT-FIELD
See SEGMENT
(setf output) (generic function)
packer.lisp (file)
bundle.lisp (file)
source.lisp (file)
drain.lisp (file)
segment.lisp (file)
output (generic function)
bundle.lisp (file)
segment.lisp (file)
Access the field of an output of the segment.
Which fields are supported depends on the segment in
question. Usually the :BUFFER field will be recognised
for which the value should be a BUFFER instance.
Some fields may only be read and not written to or
vice-versa.
See SEGMENT
See OUTPUT
(setf output-field) (generic function)
virtual.lisp (file)
virtual.lisp (file)
packer.lisp (file)
bundle.lisp (file)
source.lisp (file)
drain.lisp (file)
segment.lisp (file)
segment.lisp (file)
output-field (generic function)
virtual.lisp (file)
bundle.lisp (file)
segment.lisp (file)
segment.lisp (file)
Accessor to the vector of output buffers connected to the segment.
This vector will become out of date if the segment’s
buffers are added or removed from the C side directly,
or directly through this vector. Thus you should never
modify this directly and instead always
make sure to go through OUTPUT
See SEGMENT
See OUTPUT
bundle.lisp (file)
automatically generated reader method
segment.lisp (file)
automatically generated reader method
unpacker.lisp (file)
automatically generated reader method
packer.lisp (file)
automatically generated reader method
source.lisp (file)
automatically generated reader method
drain.lisp (file)
source.lisp (file)
drain.lisp (file)
Accessor to the outputting pan of the volume control segment.
Must be in the range [-1,1].
See VOLUME-CONTROL
(setf pan) (generic function)
volume-control.lisp (file)
bundle.lisp (file)
pan (generic function)
volume-control.lisp (file)
bundle.lisp (file)
Accessor to the current pitch shifting value.
The pitch shift is denoted as a float in the range
of ]0,infinity[, where 1 is no change, 0.5 halves the
pitch, and 2 doubles the pitch.
Note that extreme values on either side will result
in heavy distortions and quality loss. Anything
outside the range of [0.5,2.0] will already result in
audible artefacts.
See PITCH
(setf pitch) (generic function)
pitch.lisp (file)
bundle.lisp (file)
pitch (generic function)
pitch.lisp (file)
bundle.lisp (file)
automatically generated reader method
drain.lisp (file)
automatically generated writer method
drain.lisp (file)
gate.lisp (file)
bundle.lisp (file)
Accessor to the mode the repeat segment is currently in.
The value must be either :RECORD or :PLAY.
When in record mode, the segment will fill its internal
buffer with the samples from the input buffer, and copy
them to the output buffer. While in this mode it is thus
"transparent" and does not change anything.
When in play mode, the segment continuously plays back
its internal buffer to the output buffer, ignoring all
samples on the input buffer.
See REPEAT
(setf repeat-mode) (generic function)
repeat.lisp (file)
bundle.lisp (file)
repeat-mode (generic function)
repeat.lisp (file)
bundle.lisp (file)
segment.lisp (file)
Accessor to the rolloff factor that describes the curvature of the attenuation function.
See SPACE-MIXER
(setf rolloff) (generic function)
space-mixer.lisp (file)
bundle.lisp (file)
rolloff (generic function)
space-mixer.lisp (file)
bundle.lisp (file)
Accessor to the samplerate at which the samples are expected to be.
The sample rate is in Hz.
See PACKED-AUDIO
See DELAY
See FADER
See FREQUENCY-PASS
See PITCH
See REPEAT
See SPACE-MIXER
(setf samplerate) (generic function)
unpacker.lisp (file)
repeat.lisp (file)
pitch.lisp (file)
packer.lisp (file)
gate.lisp (file)
frequency-pass.lisp (file)
delay.lisp (file)
bundle.lisp (file)
pack.lisp (file)
samplerate (generic function)
unpacker.lisp (file)
repeat.lisp (file)
pitch.lisp (file)
packer.lisp (file)
gate.lisp (file)
frequency-pass.lisp (file)
delay.lisp (file)
bundle.lisp (file)
pack.lisp (file)
source.lisp (file)
source.lisp (file)
Accessor to a vector of segments the sequence contains.
This vector will become out of date if the sequence’s
segments are added or removed from the C side
directly, or directly through this vector. Thus you
should never modify this directly and instead always
make sure to go through ADD/WITHDRAW.
See SEGMENT-SEQUENCE
See ADD
See WITHDRAW
automatically generated reader method
queue.lisp (file)
automatically generated reader method
chain.lisp (file)
automatically generated reader method
bundle.lisp (file)
Accessor to the size of the data contained in the object.
For packed-audio this number is in bytes.
For buffers this number is in floats.
When the size is set on a buffer, the buffer’s data array is
resized to fit the requested size.
See BUFFER
See PACKED-AUDIO
See SEGMENT-SEQUENCE
(setf size) (generic function)
unpacker.lisp (file)
packer.lisp (file)
pack.lisp (file)
buffer.lisp (file)
size (generic function)
unpacker.lisp (file)
packer.lisp (file)
pack.lisp (file)
buffer.lisp (file)
pack.lisp (file)
Accessor to the speed of sound in space.
This value only influences the strength of
the doppler factor.
See SPACE-MIXER
(setf soundspeed) (generic function)
space-mixer.lisp (file)
bundle.lisp (file)
soundspeed (generic function)
space-mixer.lisp (file)
bundle.lisp (file)
speed-change.lisp (file)
bundle.lisp (file)
Start the mixing process.
This method should be called as close as possible
to the next calls to MIX. Calling MIX before
START is called or after END is called is an error.
After START has been called, changing some segments’
fields may result in undefined behaviour and might
even lead to crashes.
See SEGMENT-SEQUENCE
See SEGMENT
See END
See MIX
virtual.lisp (file)
bundle.lisp (file)
segment.lisp (file)
quantize.lisp (file)
bundle.lisp (file)
Accessor to the ending volume of the fading segment.
Must be in the range of [0.0, infinity[.
See FADER
(setf to) (generic function)
fader.lisp (file)
bundle.lisp (file)
to (generic function)
fader.lisp (file)
bundle.lisp (file)
pack.lisp (file)
pack.lisp (file)
pack.lisp (file)
pack.lisp (file)
buffer.lisp (file)
Accessor for the vector representing "upwards" in space.
To set a vector, the value should be a list or a vector
of three floats. When reading, the returned value is
always a vector of three floats.
See SPACE-MIXER
(setf up) (generic function)
space-mixer.lisp (file)
bundle.lisp (file)
up (generic function)
space-mixer.lisp (file)
bundle.lisp (file)
Accessor for the velocity of the listener in space.
To set a vector, the value should be a list or a vector
of three floats. When reading, the returned value is
always a vector of three floats.
See SPACE-MIXER
(setf velocity) (generic function)
space-mixer.lisp (file)
bundle.lisp (file)
velocity (generic function)
space-mixer.lisp (file)
bundle.lisp (file)
Accessor to the outputting volume of the segment.
Must be in the range [0, infinity[.
See VOLUME-CONTROL
See NOISE
See GENERATOR
(setf volume) (generic function)
volume-control.lisp (file)
unpacker.lisp (file)
space-mixer.lisp (file)
packer.lisp (file)
noise.lisp (file)
generator.lisp (file)
bundle.lisp (file)
basic-mixer.lisp (file)
volume (generic function)
volume-control.lisp (file)
unpacker.lisp (file)
space-mixer.lisp (file)
packer.lisp (file)
noise.lisp (file)
generator.lisp (file)
bundle.lisp (file)
basic-mixer.lisp (file)
Accessor to the wave type the generator generates.
Must be one of :SINE :SQUARE :SAWTOOTH :TRIANGLE
See GENERATOR
(setf wave-type) (generic function)
generator.lisp (file)
bundle.lisp (file)
wave-type (generic function)
generator.lisp (file)
bundle.lisp (file)
quantize.lisp (file)
pitch.lisp (file)
frequency-pass.lisp (file)
bundle.lisp (file)
Remove the object from the given collection.
For segment-sequences this means removing the segment
from the sequence. For mixers this means removing
the given input buffer.
See SEGMENT-SEQUENCE
See MIXER
space-mixer.lisp (file)
queue.lisp (file)
queue.lisp (file)
chain.lisp (file)
chain.lisp (file)
basic-mixer.lisp (file)
Next: Exported classes, Previous: Exported generic functions, Up: Exported definitions [Contents][Index]
Condition class for errors related to the mixed library.
See ERROR-CODE
toolkit.lisp (file)
error (condition)
:error-code
error-code (generic function)
(setf error-code) (generic function)
Initarg | Value |
---|---|
:error-code | (org.shirakumo.fraf.mixed.cffi:error) |
Previous: Exported conditions, Up: Exported definitions [Contents][Index]
This segment additively mixes an arbitrary number of inputs to a single output.
Linear mixing means that all the inputs are summed
up and the resulting number is divided by the number
of inputs. This is equivalent to having all the
inputs play as "individual speakers" in real life.
See MIXER
See MAKE-BASIC-MIXER
basic-mixer.lisp (file)
mixer (class)
:channels
2
channels (generic function)
(setf channels) (generic function)
low-level.lisp (file)
Buffers encapsulate raw audio data between segments.
A buffer stores a C-array of floats. This array represents
a sample buffer for a single audio channel. The data is not
encoded in any way and consists solely of single-floats.
Upon construction the foreign array of floats is automatically
allocated based on the given size.
See C-OBJECT
See DATA
See SIZE
See CLEAR
buffer.lisp (file)
data (generic function)
bundle.lisp (file)
virtual (class)
segments (generic function)
Superclass for all objects that track foreign resources.
If no handle is given to the object upon creation, the proper
corresponding foreign data is automatically allocated. The
pointer to this data is then associated with the instance to
allow resolving the pointer to the original Lisp object.
Finalisation of the foreign data upon garbage collection of
the Lisp object is also handled.
The actual foreign allocation and cleanup of the data is
handled by ALLOCATE-HANDLE and FREE-HANDLE respectively. The
subclass in question is responsible for implementing
appropriate methods for them.
See HANDLE
See ALLOCATE-HANDLE
See FREE-HANDLE
See FREE
See POINTER->OBJECT
c-object.lisp (file)
standard-object (class)
:handle
handle (generic function)
(setf handle) (generic function)
chain.lisp (file)
segment (class)
(make-array 0 :adjustable t :fill-pointer t)
segments (generic function)
channel-convert.lisp (file)
segment (class)
initialize-instance (method)
Initarg | Value |
---|---|
:in | (error "in required.") |
:out | (error "out required.") |
:samplerate | org.shirakumo.fraf.mixed:*default-samplerate* |
A simple delay segment.
This just delays the input to the output by a given
number of seconds. Note that it will require an
internal buffer to hold the samples for the required
length of time, which might become expensive for very
long durations.
See SEGMENT
See MAKE-DELAY
See DURATION
See SAMPLERATE
See BYPASS
delay.lisp (file)
segment (class)
Initarg | Value |
---|---|
:samplerate | org.shirakumo.fraf.mixed:*default-samplerate* |
distribute.lisp (file)
segment (class)
drain.lisp (file)
virtual (class)
:program-name
"mixed"
program-name (generic function)
(setf program-name) (generic function)
pack (generic function)
A volume fading segment.
This allows you to smoothly fade in and out an input.
The from and to are given in relative volume, meaning
in the range of [0.0, infinity[. The duration is given
in seconds. The fade type must be one of the following:
:LINEAR :CUBIC-IN :CUBIC-OUT :CUBIC-IN-OUT, each
referring to the respective easing function.
The time is measured from the last call to START out.
See SEGMENT
See MAKE-FADER
See FROM
See TO
See DURATION
See FADE-TYPE
fader.lisp (file)
segment (class)
Initarg | Value |
---|---|
:from | 0.0 |
:to | 1.0 |
:time | 1.0 |
:type | :cubic-in-out |
:samplerate | org.shirakumo.fraf.mixed:*default-samplerate* |
low-level.lisp (file)
A frequency low or high pass filter.
This filters out frequencies below or above a given
cutoff frequency.
See SEGMENT
See MAKE-FREQUENCY-PASS
See CUTOFF
See FREQUENCY-PASS
See SAMPLERATE
See BYPASS
frequency-pass.lisp (file)
segment (class)
Initarg | Value |
---|---|
:pass | :low |
:samplerate | org.shirakumo.fraf.mixed:*default-samplerate* |
gate.lisp (file)
segment (class)
Initarg | Value |
---|---|
:samplerate | org.shirakumo.fraf.mixed:*default-samplerate* |
A primitive tone generator segment.
This segment can generate sine, square, sawtooth, and
triangle waves at a requested frequency. You can even
change the frequency and type on the fly.
See SEGMENT
See *DEFAULT-SAMPLERATE*
See WAVE-TYPE
See FREQUENCY
generator.lisp (file)
segment (class)
Initarg | Value |
---|---|
:type | :sine |
:frequency | 440 |
:samplerate | org.shirakumo.fraf.mixed:*default-samplerate* |
This segment invokes a LADSPA plugin.
LADSPA (Linux Audio Developers’ Simple Plugin API)
is a standard interface for audio effects. Such effects
are contained in shared library files and can be loaded
in and used with libmixed straight up.
Please refer to the plugin’s documentation for necessary
configuration values, and to the libmixed documentation
for how to set them.
See SEGMENT
See *DEFAULT-SAMPLERATE*
See MAKE-LADSPA
ladspa.lisp (file)
segment (class)
Initarg | Value |
---|---|
:file | (error "ladspa file required.") |
:index | 0 |
:samplerate | org.shirakumo.fraf.mixed:*default-samplerate* |
Superclass for segments that mix a variable number of sources together.
See SEGMENT
See ADD
See WITHDRAW
See SOURCES
See SOURCE
mixer.lisp (file)
segment (class)
free-locations (generic function)
(setf free-locations) (generic function)
A noise generator segment.
This segment produces a single channel of noise,
either white, pink, or brownian noise.
See SEGMENT
See MAKE-NOISE
See VOLUME
See NOISE-TYPE
noise.lisp (file)
segment (class)
Initarg | Value |
---|---|
:type | :pink |
low-level.lisp (file)
pack.lisp (file)
data (generic function)
This segment converts data from individual sample buffers to data for packed-audio.
This is mostly useful at the edges to convert to
something like an audio file library or audio
playback system from the internal buffers as used
by Mixed.
The samplerate argument defines the sample rate
in the input buffers. If it diverges from the
sample rate in the packed-audio, resampling occurs to
account for this. To change the resampling method,
use the :RESAMPLER method. The value must be a
pointer to a C function of the following signature:
int resample(struct mixed_buffer *in,
uint32_t in_samplerate,
struct mixed_buffer *out,
uint32_t out_samplerate,
uint32_t out_samples)
Three such resampling functions are available out
of the box:
- MIXED:RESAMPLE-NEAREST
- MIXED:RESAMPLE-LINEAR
- MIXED:RESAMPLE-CUBIC
See mixed.h
See PACKED-AUDIO
See SEGMENT
See MAKE-PACKER
See *DEFAULT-SAMPLERATE*
packer.lisp (file)
segment (class)
:pack
(error "pack required")
pack (generic function)
A pitch shifting segment.
This segment allows you to change the pitch of the
incoming audio.
See MAKE-PITCH
See PITCH
See SAMPLERATE
See BYPASS
pitch.lisp (file)
segment (class)
Initarg | Value |
---|---|
:pitch | 1.0 |
:samplerate | org.shirakumo.fraf.mixed:*default-samplerate* |
quantize.lisp (file)
segment (class)
Initarg | Value |
---|---|
:steps | (error "steps required.") |
queue.lisp (file)
segment (class)
(make-array 0 :adjustable t :fill-pointer t)
segments (generic function)
This segment repeats a recorded bit of its input sequence.
The segment is first in record mode when created.
Once you have the bit you want to repeat back, you
can switch the repeat-mode to :PLAY. It will then
ignore the input and instead continuously output the
recorded input bit.
See MAKE-REPEAT
See DURATION
See REPEAT-MODE
See SAMPLERATE
See BYPASS
repeat.lisp (file)
segment (class)
Initarg | Value |
---|---|
:samplerate | org.shirakumo.fraf.mixed:*default-samplerate* |
low-level.lisp (file)
Superclass for all mixing pipeline segments.
A segment is responsible for producing, consuming,
combining, splitting, or just in general somehow
processing audio data within a pipeline.
A segment is connected to several buffers at its inputs and outputs. Each input, output, and the segment itself may have a number of fields that can be accessed to change the properties of the segment’s behaviour.
Some of these properties may not be changed in real
time and instead might require a ending the mixing
first.
See C-OBJECT
See INPUTS
See OUTPUTS
See INFO
See START
See MIX
See END
See INPUT-FIELD
See OUTPUT-FIELD
See FIELD
See INPUT
See OUTPUT
See CONNECT
segment.lisp (file)
c-object (class)
inputs (generic function)
outputs (generic function)
direct-info (generic function)
(setf direct-info) (generic function)
low-level.lisp (file)
source.lisp (file)
virtual (class)
pack (generic function)
0
byte-position (generic function)
(setf byte-position) (generic function)
done-p (generic function)
(setf done-p) (generic function)
A segment to simulate audio effects in 3D space.
Each input represents an individual source in space.
Each such source can have a location and a velocity,
both of which are vectors of three elements. If the
velocity is non-zero, a doppler effect is applied to
the source.
The segment itself also has a :LOCATION and :VELOCITY, representing the listener’s own properties. It has some additional fields to change the properties of the 3D space. In total, the following fields are available:
:LOCATION — The location of the input or
listener. Value should be a list
of three floats.
:VELOCITY — The velocity of the input or
listener. Value should be a list
of three floats.
:DIRECTION — The direction the listener is
facing. Value should be a list of
three floats. Default is (0 0 1)
:UP — The vector pointing "up" in
space. Value should be a list of
three floats. Default is (0 1 0)
:SOUNDSPEED — The speed of sound in the medium.
Default is 34330, meaning "1" is
measured as 1cm.
:DOPPLER-FACTOR — This can be used to over- or
understate the effect of the
doppler. Default is 1.0.
:MIN-DISTANCE — The minimal distance under which
the source has reached max volume.
:MAX-DISTANCE — The maximal distance over which
the source is completely inaudible.
:ROLLOFF — The rolloff factor describing the
curvature of the attenuation
function.
:ATTENUATION — The attenuation function describing
how volume changes over distance.
Should be one of :NONE :LINEAR
:INVERSE :EXPONENTIAL.
See MIXER
See MAKE-SPACE-MIXER
See LOCATION
See INPUT-LOCATION
See VELOCITY
See INPUT-VELOCITY
See DIRECTION
See UP
See SOUNDSPEED
See DOPPLER-FACTOR
See MIN-DISTANCE
See MAX-DISTANCE
See ROLLOFF
See ATTENUATION
See *DEFAULT-SAMPLERATE*
space-mixer.lisp (file)
mixer (class)
Initarg | Value |
---|---|
:samplerate | org.shirakumo.fraf.mixed:*default-samplerate* |
speed-change.lisp (file)
segment (class)
Initarg | Value |
---|---|
:speed-factor | 1.0 |
This segment converts data from packed-audio to individual sample buffers.
This is mostly useful at the edges to convert from
something like an audio file library to the format
needed by Mixed.
The samplerate argument defines the sample rate
in the output buffers. If it diverges from the
sample rate in the packed-audio, resampling occurs to
account for this. To change the resampling method,
use the :RESAMPLER method. The value must be a
pointer to a C function of the following signature:
int resample(struct mixed_buffer *in,
size_t in_samplerate,
struct mixed_buffer *out,
size_t out_samplerate,
size_t out_samples)
Three such resampling functions are available out
of the box:
- MIXED:RESAMPLE-NEAREST
- MIXED:RESAMPLE-LINEAR
- MIXED:RESAMPLE-CUBIC
See PACKED-AUDIO
See SEGMENT
See MAKE-UNPACKER
See *DEFAULT-SAMPLERATE*
unpacker.lisp (file)
segment (class)
:pack
(error "pack required")
pack (generic function)
Superclass for segments implemented in Lisp.
The segment should implement the following
methods according to its need:
INFO
START
MIX
END
INPUT-FIELD
(SETF INPUT-FIELD)
OUTPUT-FIELD
(SETF OUTPUT-FIELD)
FIELD
Default methods for INPUT/OUTPUT-FIELD to
handle the recording of the input/output
buffers already exist. Every other method
by default does nothing. You should in the
very least implement a method for MIX on
your subclass.
See SEGMENT
See INFO
See START
See MIX
See END
See INPUT-FIELD
See OUTPUT-FIELD
See FIELD
See INPUTS
See OUTPUTS
virtual.lisp (file)
segment (class)
A volume control segment that can change the volume and pan.
This is a stereo segment, and as such requires two
input and output buffers each. You may use the
location keywords :LEFT and :RIGHT to address them.
The pan goes from -1.0 for left to 1.0 for right.
The volume goes from 0.0 upwards. Values below zero
result in an error, and values above 1.0 will likely
lead to clipping and thus audio distortions.
See SEGMENT
See MAKE-VOLUME-CONTROL
See VOLUME
See PAN
volume-control.lisp (file)
segment (class)
Initarg | Value |
---|---|
:volume | 1.0 |
:pan | 0.0 |
Previous: Exported definitions, Up: Definitions [Contents][Index]
• Internal special variables | ||
• Internal macros | ||
• Internal functions | ||
• Internal generic functions | ||
• Internal classes |
Next: Internal macros, Previous: Internal definitions, Up: Internal definitions [Contents][Index]
A weak value table associating pointer addresses to corresponding objects.
This table keeps track of which foreign data is tracked
by which lisp instance.
See POINTER->OBJECT
See C-OBJECT
c-object.lisp (file)
Variable containing the path to the low-level.lisp file.
low-level.lisp (file)
Next: Internal functions, Previous: Internal special variables, Up: Internal definitions [Contents][Index]
Define a new accessor wrapper for a CFFI struct function.
toolkit.lisp (file)
Defines a new callback that handles errors automatically.
If an error occurs within BODY, the ERROR-RETURN form
is instead evaluated and its value returned.
See CFFI:DEFCALLBACK
toolkit.lisp (file)
Define an accessor that delegates its call to a slot of the instance.
Generates the necessary accessor methods to wrap
the access.
toolkit.lisp (file)
Define an accessor for a segment’s field.
Generates the necessary methods on FIELD as well as convenience wrapper methods.
toolkit.lisp (file)
toolkit.lisp (file)
toolkit.lisp (file)
Define an accessor for a segment’s input vector value field.
Generates the necessary methods on FIELD as well as
convenience wrapper methods. The values should be
lists or vectors of three floats.
toolkit.lisp (file)
Define a standard callback function.
Standard means that the function will return 1 on
success and 0 on abnormal exit.
See DEFINE-CALLBACK
toolkit.lisp (file)
Define an accessor for a segment’s vector value field.
Generates the necessary methods on FIELD as well as convenience wrapper methods. The values should be lists or vectors of three floats.
toolkit.lisp (file)
toolkit.lisp (file)
bip-buffer.lisp (file)
If the body unwinds abnormally, CLEANUP is run.
toolkit.lisp (file)
Shorthand to handle return values of C functions.
If the last form in the body returns a zero, an
error of type MIXED-ERROR is signalled.
See MIXED-ERROR
toolkit.lisp (file)
Next: Internal generic functions, Previous: Internal macros, Up: Internal definitions [Contents][Index]