The harmony Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The harmony Reference Manual

This is the harmony Reference Manual, version 2.0.0, generated automatically by Declt version 2.4 "Will Decker" on Wed Jun 20 11:54:59 2018 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

About Harmony

Harmony is a library that provides you with audio processing tools as well as an audio server to play back music, sfx, and so forth. It is most suited for use in a game engine, but may feasibly also used for more advanced things such as an audio processing tool.

How To

A very basic sound system can be gained by loading the harmony-simple system and using its predefined audio pipeline and convenience functions.

(ql:quickload :harmony-simple)

Before any audio can be played, the audio server needs to be initialised.

(harmony-simple:initialize)

Once the server is running, we need some files to play. Harmony-simple sets up a pipeline that supports three distinct mixers: :music, :sfx, and :voice. The latter two mixers provide 3D audio, allowing you to place the sources in 3D space. Playing a file simply happens through the play function.

(harmony-simple:play #p"music.mp3" :music :loop T)
(harmony-simple:play #p"explosion.mp3" :sfx)

Returned by play is a source instance, which you can use to control the playback. You can pause, resume, and stop a source. When a source is stopped manually or naturally reaches its end it is removed from the mixer. You can resume and add it again if you want to re-use it. If you would like to smoothly fade a track, you can use the :fade initarg on play, or use the fade function after the fact. You can also directly control the volume with the volume accessor.

For sources on the 3D mixers, you can use the input-location and input-velocity accessors to modify their placement. The velocity will not cause the location to be updated automatically, and is instead used to calculate the intensity of the doppler effect. If you do not want to have a doppler effect, you can simply leave the velocity at its default. The mixer itself also has a few properties that you'll want to control in order to control the listener. Aside from the location and velocity, there's also the direction, up, soundspeed, doppler-factor, min-distance, max-distance, rolloff, and attenuation to control the properties of the 3D space.

If you need to pause the sound playback entirely, you can also use pause and resume without an argument.

Choosing the Playback Backend

Harmony includes support for a variety of playback backends: Out123, OpenAL, WASAPI, ALSA, and PulseAudio. It is recommended to use the native backends (WASAPI, ALSA) where possible as they do not have any C dependencies and should have reduced latency and complexity compared to the other backends (Out123, OpenAL).

You can choose a backend, and customise its options, with the :output-spec initarg on harmony-simple's initialize. For example, to use the PulseAudio backend:

(asdf:load-system :harmony-pulse)
(harmony-simple:initialize :output-spec '(harmony-pulse:pulse-drain))

A number of the backends include extra options like :program-name that allows you to change the appearance of your program in the system's volume mixer.

In-Memory Source Playback

Certain kinds of audio need to be played back often and with minimal latency. This is where buffering the audio in memory can be very useful. Harmony allows you to do this with the decode function, which constructs a source just like play and runs it in such a way that it decodes everything to its output buffers. The list of buffers is then returned. Once you have the buffers you can store them somewhere, so that when you want to play them back, all you need to do is create a buffer-source with those buffers as the source.

As an example, this is how it might work in your code:

(defvar *explosion* (harmony-simple:decode #p"explosion.mp3"))

(harmony-simple:play 'harmony:buffer-source :sfx :buffers *explosion*)

Since the buffer source merely indexes into the buffers and doesn't change them, you can easily instantiate as many as you need from the same buffers.

Constructing Your Own Pipeline

If you want a pipeline that is a bit more involved than what harmony-simple gives you, perhaps to add certain effects or other kinds of shenanigans, you can easily build that pipeline. Before you do, though, you should get briefly acquainted with cl-mixed, or at least with the segments it provides. Harmony uses libmixed underneath to do most of the audio processing and mixing, and in itself only provides a sound server, and a convenient way to handle segments and create a pipeline.

Here's an example of a pipeline consisting of an output, a LADSPA plugin, and a basic mixer. You'll need a server beforehand, which you can get by simply instantiating harmony:server.

(let* ((pipeline (make-instance 'harmony:pipeline))
       (output (make-instance 'harmony-out123:out123-drain :server server))
       (master (make-instance 'harmony:basic-mixer :server server :name :master))
       (ladspa (make-instance 'cl-mixed:ladspa :samplerate (harmony:samplerate server)
                                               :file #p"ladspa-plugin.so")))
  (harmony:connect pipeline ladspa 0 output 0)
  (harmony:connect pipeline ladspa 1 output 1)
  (harmony:connect pipeline master 0 output 0)
  (harmony:connect pipeline master 1 output 1)
  (harmony:compile-pipeline pipeline server))

Once the pipeline has been compiled to the server, you can start by adding segments to the master mixer, similar to before. Most of the other commands remain the same as well, just using a different package.

(harmony:play server #p"something.mp3" :master)

When you construct the pipeline, Harmony takes care of properly allocating the necessary internal buffers, connecting the segments as required, and determining the proper order in which to process them.

Extending Harmony's Segments

Segments are the lifeblood of Harmony. Through segments you get audio data into the pipeline, transform it as you need, and finally even output it to be heard. Being able to define custom and new segments is therefore the primary way in which to extend Harmony's functionality.

One of the easiest things to do is to define a new source. Let's do that with a sine wave generator. As a first step, we'll need to define a class.

(defclass sine (harmony:source cl-mixed:virtual)
  ((sine-phase :initform 0 :accessor sine-phase)))

The class inherits from source to get useful functionality for fading, pausing, and seeking. We also inherit from cl-mixed:virtual as this segment won't have a segment defined in C to support it underneath. Instead, we can now extend all the functionality of the segment from the lisp side.

As part of the contract of subclassing source, we need to implement a method on seek-to-sample. Let's do that:

(defmethod harmony:seek-to-sample ((source sine) position)
  (setf (sine-phase source) (mod position (harmony:samplerate (harmony:context source)))))

We'll be using the sine-phase to track the current phase of our sine wave, so in order to "seek" we'll need to adjust it here. Naturally you won't really be able to hear the effects of seeking on a sine wave generator, but for other sources proper seeking behaviour can be vital.

Another function we need to implement a method for is sample-count which returns the number of samples the source can return. Our sine wave generator can return an unbounded number, so we return T instead of an integer.

(defmethod harmony:sample-count ((source sine)) T)

Finally we need to implement the actual sample generation, which for all sources happens in process:

(defmethod harmony:process ((source sine) samples)
  (let* ((buffers (cl-mixed:outputs source))
         (phase (sine-phase source))
         (samplerate (harmony:samplerate (harmony:context source)))
         (factor (* 2 PI 440 (/ samplerate))))
    (loop for i from 0 below samples
          for sample = (sin (coerce (* factor phase) 'single-float))
          do (loop for buffer across buffers
                   do (setf (cffi:mem-aref (cl-mixed:data buffer) :float i) sample))
             (incf phase))
    (setf (sine-phase source) (mod phase samplerate))))

First we extract the output buffer vector and the current phase, and calculate the constant factor for the wave. We then iterate over the number of samples we need to generate, and set the sample at the corresponding position in each buffer. Note that buffers contain C arrays and as such we need to use CFFI's mem-aref instead of Lisp's aref. Once we're done with the sample generation we update the phase in our instance.

And that's it. You can now test your sine generator with (harmony-simple:play 'sine :music).

For a lot of sources and drains you will want to interact with other libraries and systems. They will usually have their own idea of how the sample data should be represented. Often times they'll want a single C array where the samples are interleaved, or might even need a different sample format than the floats Harmony uses internally. For this, libmixed offers a good amount of support by taking over the packing and unpacking of samples for you.

In Harmony, you can make use of this with the unpack-source and pack-drain respectively. As an additional contract, they'll have you construct a packed-audio object that encodes the sample representation format, but will in turn handle the conversion for you, so that you just need to write to or read from a buffer using your foreign system. For an example on how this works, see the mp3 and wav sources, or the alsa and pulse drains.

Finally I think it would be worth it to look at an example of an effect segment. We'll be writing a very primitive version of an echo effect with a linear falloff.

As before, we'll first want to create a new class to encapsulate our segment with.

(defclass echo (harmony:segment cl-mixed:virtual)
  ((buffers :initform NIL :accessor buffers)
   (offset :initform 0 :accessor offset)
   (delay :initarg :delay :initform 0.2 :accessor delay)
   (falloff :initarg :falloff :initform 0.8 :accessor falloff)))

We'll make this work by having internal buffers that keep some of the previous samples that come in and mixes them back into the output with a slight delay added. In order to know the proper size of the buffers, we'll need to know the sample rate ahead of time as well, hence the parameter.

Next we'll need to actually instantiate the buffers on start.

(defmethod cl-mixed:start ((echo echo))
  (let ((buffers (make-array 2)))
    (setf (buffers echo) buffers)
    (dotimes (i (length buffers))
      (setf (aref buffers i) (make-array (ceiling (* (delay echo)
                                                     (harmony:samplerate
                                                      (harmony:context echo))))
                                         :element-type 'single-float
                                         :initial-element 0.0s0)))))

Since we don't need to share these buffers with any C parts, we can just use a CL array for our convenience.

In order for Harmony to be able to assemble the pipeline from the segments properly, it needs to know some information about the segment. We can provide this information with a method on cl-mixed:info:

(defmethod cl-mixed:info ((echo echo))
  (list :min-inputs 2 :max-inputs 2 :outputs 2))

There are a few other info fields that are specified by libmixed, but this should be enough for our purposes.

Finally, the actual mixing step. The virtual class provides methods for all of the actions that can be performed on a segment. It already handles the connecting of input and output buffers for us, so we don't need to care about that. All we need to do is handle the mixing logic.

(defmethod cl-mixed:mix (samples (echo echo))
  (let ((offset (offset echo))
        (falloff (falloff echo)))
    (loop for out-buffer across (cl-mixed:outputs echo)
          for in-buffer across (cl-mixed:inputs echo)
          for out = (cl-mixed:data out-buffer)
          for in = (cl-mixed:data in-buffer)
          for buf across (buffers echo)
          for off = offset
          do (loop for i from 0 below samples
                   for sample = (cffi:mem-aref in :float i)
                   for echo = (aref buf off)
                   do (setf (cffi:mem-aref out :float i) (+ sample echo))
                      (setf (aref buf off) (* (+ sample echo) falloff))
                      (setf off (mod (1+ off) (length buf)))))
    (setf (offset echo) (mod (+ offset samples) (length (aref (buffers echo) 0))))))

This iterates over all channels (in->buf->out), and for each channel does the following: for each sample to compute, output the input sample added to the sample looked up in the echo buffer. Then store the same multiplied by the falloff into the echo buffer. Finally advance the offset into the echo buffer. At the end of the function we have to make sure to store the current offset in the segment for the next time mix is called.

In order to test this we'll create our own pipeline real quick:

(let ((pipeline (make-instance 'harmony:pipeline))
      (output (harmony-simple:make-segment 'harmony-out123:out123-drain))
      (echo (harmony-simple:make-segment 'echo :name :echo))
      (source (harmony-simple:make-segment 'harmony-mp3:mp3-source :file #p"some.mp3")))
  (harmony:connect pipeline echo 0 output 0)
  (harmony:connect pipeline echo 1 output 1)
  (harmony:connect pipeline source 0 echo 0)
  (harmony:connect pipeline source 1 echo 1)
  (harmony:compile-pipeline pipeline harmony-simple:*server*))

Note that this will perform all the pipeline computation locally, and then switch out the pipeline in the server. If you had something else going on in the previous pipeline, then that will be replaced. You should now hear the song being played back with an echo effect.

For more information on the details of segments and the underlying mechanisms of the mixing, see the documentation of the cl-mixed library.

Also See


Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

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


Previous: , Up: Systems   [Contents][Index]

2.1 harmony

Maintainer

Nicolas Hafner <shinmera@tymoon.eu>

Author

Nicolas Hafner <shinmera@tymoon.eu>

Home Page

https://github.com/Shirakumo/harmony

License

Artistic

Description

A common lisp sound server and sound processing library.

Version

2.0.0

Dependencies
Source

harmony.asd (file)

Components

Next: , Previous: , Up: Top   [Contents][Index]

3 Modules

Modules are listed depth-first from the system components tree.


Next: , Previous: , Up: Modules   [Contents][Index]

3.1 harmony/drains

Dependency

files.lisp (file)

Parent

harmony (system)

Location

drains/

Component

buffer.lisp (file)


Previous: , Up: Modules   [Contents][Index]

3.2 harmony/sources

Dependency

drains (module)

Parent

harmony (system)

Location

sources/

Component

buffer.lisp (file)


Next: , Previous: , Up: Top   [Contents][Index]

4 Files

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


Previous: , Up: Files   [Contents][Index]

4.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.1 harmony.asd

Location

harmony.asd

Systems

harmony (system)


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.2 harmony/package.lisp

Parent

harmony (system)

Location

package.lisp

Packages

harmony


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.3 harmony/toolkit.lisp

Dependency

package.lisp (file)

Parent

harmony (system)

Location

toolkit.lisp

Exported Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.4 harmony/mixing-context.lisp

Dependency

toolkit.lisp (file)

Parent

harmony (system)

Location

mixing-context.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.5 harmony/segment.lisp

Dependency

mixing-context.lisp (file)

Parent

harmony (system)

Location

segment.lisp

Exported Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.6 harmony/server.lisp

Dependency

segment.lisp (file)

Parent

harmony (system)

Location

server.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.7 harmony/mixers.lisp

Dependency

server.lisp (file)

Parent

harmony (system)

Location

mixers.lisp

Exported Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.8 harmony/fadable.lisp

Dependency

mixers.lisp (file)

Parent

harmony (system)

Location

fadable.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.9 harmony/source.lisp

Dependency

fadable.lisp (file)

Parent

harmony (system)

Location

source.lisp

Exported Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.10 harmony/drain.lisp

Dependency

source.lisp (file)

Parent

harmony (system)

Location

drain.lisp

Exported Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.11 harmony/pipeline.lisp

Dependency

drain.lisp (file)

Parent

harmony (system)

Location

pipeline.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.12 harmony/files.lisp

Dependency

pipeline.lisp (file)

Parent

harmony (system)

Location

files.lisp

Exported Definitions
Internal Definitions

*filetype-source-map* (special variable)


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.13 harmony/drains/buffer.lisp

Parent

drains (module)

Location

drains/buffer.lisp

Exported Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.14 harmony/sources/buffer.lisp

Parent

sources (module)

Location

sources/buffer.lisp

Exported Definitions

Previous: , Up: Lisp files   [Contents][Index]

4.1.15 harmony/documentation.lisp

Dependency

sources (module)

Parent

harmony (system)

Location

documentation.lisp


Next: , Previous: , Up: Top   [Contents][Index]

5 Packages

Packages are listed by definition order.


Previous: , Up: Packages   [Contents][Index]

5.1 harmony

Source

package.lisp (file)

Nickname

org.shirakumo.fraf.harmony

Use List

common-lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

6 Definitions

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


Next: , Previous: , Up: Definitions   [Contents][Index]

6.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.1 Macros

Macro: define-source-type NAME TYPE

Conveniently define a source type mapping.

See SOURCE-TYPE

Package

harmony

Source

files.lisp (file)

Macro: with-body-in-mixing-context (CONTEXT &rest ARGS) &body BODY

Shorthand macro to evaluate the body in the mixing context.

See CALL-IN-MIXING-CONTEXT

Package

harmony

Source

mixing-context.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.2 Functions

Function: allocate-buffers NODES BUFFERSIZE &optional OLD-BUFFERS

Handle the allocation of the necessary buffers for the nodes.

The number of buffers necessary is determined by
looking at the BUFFER attribute of each port and maximising that.

If OLD-BUFFERS is given, only additional buffers
as necessary are allocated and the buffers in the
old sequence are re-used.

After all buffers have been allocated, the BUFFER attribute on each port in the nodes list is
replaced by the actual buffer instance.

See FLOW:ATTRIBUTE
See CL-MIXED:MAKE-BUFFER

Package

harmony

Source

pipeline.lisp (file)

Function: ease-cubic-in X

Cubic-in easing.

X -> X³

Package

harmony

Source

toolkit.lisp (file)

Function: ease-cubic-in-out X

Cubic-in-out easing.

X -> (2*x)³/2 | If x < 0.5 1+(2*(x-1))³/2 | otherwise

Package

harmony

Source

toolkit.lisp (file)

Function: ease-cubic-out X

Cubic-out easing.

X -> 1+(x-1)³

Package

harmony

Source

toolkit.lisp (file)

Function: ease-linear X

Linear easing.

X -> X

Package

harmony

Source

toolkit.lisp (file)

Function: fill-for-unpack-source SOURCE SAMPLES DIRECT-READ ARG

This is a convenience function for unpack sources.

Handling the edge-cases of reaching the output end and looping properly can be a bit tricky. This function takes care of properly filling the packed audio array with data while handling the necessary wraparound or zeroing in case of stream end.

DIRECT-READ should be a function of three arguments: ARG — The arg passed into the function. BUFFER — A pointer to the C array of data. BYTES — The number of bytes to write into it.

Package

harmony

Source

source.lisp (file)

Function: memclear DEST NUM

Clear the memory in a region to zero.

This is a tiny wrapper around memset. DEST — A destination array pointer. NUM — The number of bytes to copy.

See MEMSET

Package

harmony

Source

toolkit.lisp (file)

Function: memcpy DEST SOURCE NUM

Copy memory from one region to another.

This is the libc memcpy().
DEST — A destination array pointer. SOURCE — A source array pointer. NUM — The number of bytes to copy.

See memcpy()

Package

harmony

Source

toolkit.lisp (file)

Function: memset DEST SOURCE NUM

Set memory in a region to a particular byte.

This is the libc memset().
DEST — A destination array pointer. SOURCE — A source byte to set the array with. NUM — The number of bytes to copy.

See memset()

Package

harmony

Source

toolkit.lisp (file)

Function: source-type NAME

Accessor to the file type extension to source type mapping.

The name should be a string designating the file
type, and the value a source class name.

See *FILETYPE-SOURCE-MAP*
See DEFINE-SOURCE-TYPE

Package

harmony

Source

files.lisp (file)

Writer

(setf source-type) (function)

Function: (setf source-type) TYPE NAME
Package

harmony

Source

files.lisp (file)

Reader

source-type (function)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.3 Generic functions

Generic Function: buffers OBJECT

Accessor to the sequence of buffers.

The buffers are internal to this object and should not be touched unless you really, really know what you’re doing.

See MIXER
See SERVER

Package

harmony

Writer

(setf buffers) (generic function)

Methods
Method: buffers (BUFFER-SOURCE buffer-source)

automatically generated reader method

Source

buffer.lisp (file)

Method: buffers (BUFFER-DRAIN buffer-drain)

automatically generated reader method

Source

buffer.lisp (file)

Method: buffers (MIXER mixer)

automatically generated reader method

Source

mixers.lisp (file)

Method: buffers (SERVER server)

automatically generated reader method

Source

server.lisp (file)

Generic Function: (setf buffers) NEW-VALUE OBJECT
Package

harmony

Reader

buffers (generic function)

Methods
Method: (setf buffers) NEW-VALUE (BUFFER-SOURCE buffer-source)

automatically generated writer method

Source

buffer.lisp (file)

Method: (setf buffers) NEW-VALUE (BUFFER-DRAIN buffer-drain)

automatically generated writer method

Source

buffer.lisp (file)

Method: (setf buffers) NEW-VALUE (MIXER mixer)

automatically generated writer method

Source

mixers.lisp (file)

Method: (setf buffers) NEW-VALUE (SERVER server)

automatically generated writer method

Source

server.lisp (file)

Generic Function: buffersize OBJECT

Accessor to the number of samples in a buffer on the context.

This is SETFable, but note that this will only
adapt the buffers constructed through the pipeline. Buffers, and especially internal data arrays, are
not adjusted and may not be able to hold the
required amount of data if you increase the buffer
size. Use at your own risk.

See MIXING-CONTEXT

Package

harmony

Writer

(setf buffersize) (generic function)

Methods
Method: buffersize (MIXING-CONTEXT mixing-context)

automatically generated reader method

Source

mixing-context.lisp (file)

Generic Function: (setf buffersize) NEW-VALUE OBJECT
Package

harmony

Reader

buffersize (generic function)

Methods
Method: (setf buffersize) NEW-VALUE (MIXING-CONTEXT mixing-context)

automatically generated writer method

Source

mixing-context.lisp (file)

Method: (setf buffersize) SIZE (SERVER server) before
Source

server.lisp (file)

Generic Function: channels-per-source MIXER

Returns the number of channel buffers each source should provide.

See MIXER

Package

harmony

Source

mixers.lisp (file)

Methods
Method: channels-per-source (SEGMENT space-mixer)
Method: channels-per-source (SEGMENT basic-mixer)
Generic Function: compile-pipeline PIPELINE SERVER

Compile the pipeline into the given server.

This performs a buffer allocation on each of the inputs and outputs of the segments connected in the pipeline, flattens the graph topologically to figure out the proper order to mix the segments in, and finally constructs a mixer object to configure the server with.

Once everything has been properly built, the server is updated with the new device, buffers, and mixer. The device is taken to be the last segment in the topological sort.

After everything has been updated, the old mixer and unneeded buffers are freed. Segments are not freed, and will instead be garbage-collected automatically if no longer needed.

This also updates the SEGMENT-MAP in the server, by clearing it first, and then updating it with all the segments contained in the pipeline.

See PIPELINE
See SERVER
See ALLOCATE-BUFFERS
See FLOW:ALLOCATE-PORTS
See COMPLETE-SEGMENT
See SEGMENT-MAP

Package

harmony

Methods
Method: compile-pipeline (PIPELINE pipeline) (SERVER server)
Source

pipeline.lisp (file)

Generic Function: connect PIPELINE SOURCE SOURCE-OUTPUT TARGET TARGET-INPUT

Connects the output location to the input location of the given segments.

The system cannot feasibly figure out how you intend
locations to be connected together, which is why you
must specify them yourself.

See PIPELINE
See DISCONNECT
See SEVER

Package

harmony

Methods
Method: connect (PIPELINE pipeline) (SOURCE segment) SOURCE-OUTPUT (TARGET segment) TARGET-INPUT
Source

pipeline.lisp (file)

Generic Function: context OBJECT

Accessor to the segment’s context.

See SEGMENT
See MIXING-CONTEXT

Package

harmony

Writer

(setf context) (generic function)

Methods
Method: context (SEGMENT segment)

automatically generated reader method

Source

segment.lisp (file)

Generic Function: (setf context) NEW-VALUE OBJECT
Package

harmony

Reader

context (generic function)

Methods
Method: (setf context) NEW-VALUE (SEGMENT segment)

automatically generated writer method

Source

segment.lisp (file)

Generic Function: decode SOURCE-ISH &key BUFFERS CLASS SAMPLERATE &allow-other-keys

Conveniently decode a source to a list of buffers.

This allows you to fully store a source as decompressed samples in-memory, ready for direct playback from the internal buffers.

Mostly this should be used for small effects and clips that need minimal latency upon playback.

You can use the BUFFER-SOURCE to play the buffers back directly.

Note that the source will not get a SERVER instance as the context, but instead a constructed MIXING-CONTEXT. It will also not be part of a pipeline, and will instead just be connected to the output buffers, started, mixed, and ended in that order. The source should thus be tricked into thinking it’s playing just like normal, meaning a source should not require any additional code to allow being decoded.

See SOURCE
See BUFFER-SOURCE

Package

harmony

Source

source.lisp (file)

Methods
Method: decode (FILE pathname) &rest INITARGS &key CLASS &allow-other-keys
Source

files.lisp (file)

Method: decode (CLASS class) &rest INITARGS &key SAMPLERATE BUFFERS
Method: decode (CLASS symbol) &rest INITARGS
Generic Function: device OBJECT

Accessor to the device segment of the server.

The device segment is like any other segment in the pipeline, with the exception that the server uses its PAUSED-P state to determine whether it should suspend mixing or not. Usually COMPILE- PIPELINE will ensure that the device is the last segment in the sorted segments list, and thus the segment responsible for outputting the audio data.

See SERVER

Package

harmony

Writer

(setf device) (generic function)

Methods
Method: device (SERVER server)

automatically generated reader method

Source

server.lisp (file)

Generic Function: (setf device) NEW-VALUE OBJECT
Package

harmony

Reader

device (generic function)

Methods
Method: (setf device) NEW-VALUE (SERVER server)

automatically generated writer method

Source

server.lisp (file)

Generic Function: disconnect PIPELINE SOURCE SOURCE-OUTPUT TARGET TARGET-INPUT

Disconnects the output location from the input location of the given segments.

The system cannot feasibly figure out how you intend
locations to be disconnected, which is why you must
specify them yourself.

See PIPELINE
See CONNECT
See SEVER

Package

harmony

Methods
Method: disconnect (PIPELINE pipeline) (SOURCE segment) SOURCE-OUTPUT (TARGET segment) TARGET-INPUT
Source

pipeline.lisp (file)

Generic Function: ended-p OBJECT

Accessor to whether the source has reached its end or not.

Once a source has been marked as ended, it is automatically paused as soon as possible, and then removed from its mixer if the mixer is known to the source.

And ended source can be started anew by using
the RESUME function.

See STOP
See RESUME

Package

harmony

Writer

(setf ended-p) (generic function)

Methods
Method: ended-p (SOURCE source)

automatically generated reader method

Source

source.lisp (file)

Generic Function: (setf ended-p) NEW-VALUE OBJECT
Package

harmony

Reader

ended-p (generic function)

Methods
Method: (setf ended-p) NEW-VALUE (SOURCE source)

automatically generated writer method

Source

source.lisp (file)

Generic Function: ensure-node NODE PIPELINE

Either creates or returns the node corresponding to the given segment.

See PIPELINE
See NODES
See MAKE-NODE

Package

harmony

Methods
Method: ensure-node (SEGMENT segment) (PIPELINE pipeline)
Source

pipeline.lisp (file)

Method: ensure-node (NODE node) PIPELINE
Source

pipeline.lisp (file)

Generic Function: fade FADABLE TO TIME &key BY FROM

Cause the segment to start fading as soon as possible.

TIME should be a float, specifying the duration
of the fade in seconds. If :FROM is not specified, it is taken to be current volume of the segment. BY should be a function of one float argument
and one return value.

See EASING-FUNCTION
See FADABLE

Package

harmony

Methods
Method: fade (FADABLE fadable) TO TIME &key BY FROM
Source

fadable.lisp (file)

Generic Function: file OBJECT

Accessor to the pathname of the file the file-source reads from.

See FILE-SOURCE

Package

harmony

Writer

(setf file) (generic function)

Methods
Method: file (FILE-SOURCE file-source)

automatically generated reader method

Source

files.lisp (file)

Generic Function: (setf file) NEW-VALUE OBJECT
Package

harmony

Reader

file (generic function)

Methods
Method: (setf file) NEW-VALUE (FILE-SOURCE file-source)

automatically generated writer method

Source

files.lisp (file)

Generic Function: initialize-packed-audio SOURCE

This function should return a packed-audio instance.

The instance should contain a pointer to a C array of opaque samples, as well as a precise description of the way in which the samples are laid out, as well as what their rate and format is.

See CL-MIXED:PACKED-AUDIO
See UNPACK-SOURCE
See PACK-DRAIN

Package

harmony

Source

source.lisp (file)

Generic Function: looping-p OBJECT

Accessor to whether the source should loop after finishing.

See SOURCE

Package

harmony

Writer

(setf looping-p) (generic function)

Methods
Method: looping-p (SOURCE source)

automatically generated reader method

Source

source.lisp (file)

Generic Function: (setf looping-p) NEW-VALUE OBJECT
Package

harmony

Reader

looping-p (generic function)

Methods
Method: (setf looping-p) NEW-VALUE (SOURCE source)

automatically generated writer method

Source

source.lisp (file)

Generic Function: make-node SEGMENT

Construct a new node instance for the given segment.

The segment must support the INFO operation and report accurately on its number of inputs and outputs. Otherwise, a proper node cannot be constructed.

See NODE
See SEGMENT

Package

harmony

Methods
Method: make-node (SEGMENT segment)
Source

pipeline.lisp (file)

Generic Function: name OBJECT

Accessor to the name of the segment.

The name should be a symbol, and can be used to retrieve the segment from the server after the pipeline has been compiled for it.

See SEGMENT

Package

harmony

Methods
Method: name (SEGMENT segment)

automatically generated reader method

Source

segment.lisp (file)

Generic Function: nodes OBJECT

Accessor to the hash table mapping segments to their corresponding nodes.

See PIPELINE

Package

harmony

Writer

(setf nodes) (generic function)

Methods
Method: nodes (PIPELINE pipeline)

automatically generated reader method

Source

pipeline.lisp (file)

Generic Function: (setf nodes) NEW-VALUE OBJECT
Package

harmony

Reader

nodes (generic function)

Methods
Method: (setf nodes) NEW-VALUE (PIPELINE pipeline)

automatically generated writer method

Source

pipeline.lisp (file)

Generic Function: pack-mix-function OBJECT

Accessor to the function pointer for the packer segment’s mix function.

See CL-MIXED:PACKER
See PACK-DRAIN

Package

harmony

Writer

(setf pack-mix-function) (generic function)

Methods
Method: pack-mix-function (PACK-DRAIN pack-drain)

automatically generated reader method

Source

drain.lisp (file)

Generic Function: (setf pack-mix-function) NEW-VALUE OBJECT
Package

harmony

Reader

pack-mix-function (generic function)

Methods
Method: (setf pack-mix-function) NEW-VALUE (PACK-DRAIN pack-drain)

automatically generated writer method

Source

drain.lisp (file)

Generic Function: pause SERVER

Pause the source or drain.

See SOURCE
See DRAIN
See SERVER

Package

harmony

Methods
Method: pause (DRAIN drain)
Source

drain.lisp (file)

Method: pause (SOURCE source)
Source

source.lisp (file)

Method: pause (SERVER server)
Source

server.lisp (file)

Generic Function: paused-p SERVER

Accessor to whether the source is paused or not.

See SOURCE
See PAUSE
See RESUME

Package

harmony

Writer

(setf paused-p) (generic function)

Methods
Method: paused-p (SOURCE source)

automatically generated reader method

Source

source.lisp (file)

Method: paused-p (SERVER server)
Source

server.lisp (file)

Generic Function: (setf paused-p) VALUE SERVER
Package

harmony

Reader

paused-p (generic function)

Methods
Method: (setf paused-p) NEW-VALUE (SOURCE source)

automatically generated writer method

Source

source.lisp (file)

Method: (setf paused-p) VALUE (SERVER server)
Source

server.lisp (file)

Method: (setf paused-p) VALUE (SOURCE source) before
Source

source.lisp (file)

Generic Function: play CONTEXT SOURCE-ISH MIXER &key PAUSED LOOP FADE VOLUME NAME CLASS &allow-other-keys

Conveniently play back a source on the designated mixer of the server.

In general PLAY is responsible for creating or
initialising a source if necessary, adding it to the
specified mixer, and playing it back.

PLAY is supposed to be "smart" about its arguments
and will coerce where possible. For instance, the
SOURCE-ISH can be a symbol, class, source, or
pathname. The mixer can be either a symbol or a
mixer. Additional coercions could be added through
libraries.

The INITARGS are either creation initargs for new
sources, or REINITIALIZE-INSTANCE initargs for
existing sources.

See SOURCE

Package

harmony

Source

source.lisp (file)

Methods
Method: play SERVER (FILE pathname) MIXER &rest INITARGS &key CLASS &allow-other-keys
Source

files.lisp (file)

Method: play (CONTEXT mixing-context) (SOURCE source) (MIXER mixer) &rest INITARGS
Method: play (CONTEXT mixing-context) (CLASS class) (MIXER mixer) &rest INITARGS
Method: play (SERVER server) SOURCE-ISH (MIXER symbol) &rest INITARGS
Method: play CONTEXT (CLASS symbol) MIXER &rest INITARGS
Generic Function: process SOURCE SAMPLES

This function is responsible for invoking the actual sample processing step of a segment.

Note that not all segments will call this function,
and unless you do so yourself, currently only SOURCE
and DRAIN will.

In general a call to this function should result in
samples from the connected input buffers to be read
and samples to the connected output buffers to be
written.

See SOURCE
See DRAIN

Package

harmony

Source

source.lisp (file)

Methods
Method: process (SOURCE buffer-source) SAMPLES
Source

buffer.lisp (file)

Method: process (DRAIN buffer-drain) SAMPLES
Source

buffer.lisp (file)

Method: process (DRAIN pack-drain) SAMPLES around
Source

drain.lisp (file)

Method: process (SOURCE unpack-source) SAMPLES around
Generic Function: remix-factor OBJECT

Returns the conversion factor between the channel’s and the server’s samplerate.

See SOURCE
See DRAIN

Package

harmony

Writer

(setf remix-factor) (generic function)

Methods
Method: remix-factor (PACK-DRAIN pack-drain)

automatically generated reader method

Source

drain.lisp (file)

Method: remix-factor (UNPACK-SOURCE unpack-source)

automatically generated reader method

Source

source.lisp (file)

Generic Function: (setf remix-factor) NEW-VALUE OBJECT
Package

harmony

Reader

remix-factor (generic function)

Methods
Method: (setf remix-factor) NEW-VALUE (PACK-DRAIN pack-drain)

automatically generated writer method

Source

drain.lisp (file)

Method: (setf remix-factor) NEW-VALUE (UNPACK-SOURCE unpack-source)

automatically generated writer method

Source

source.lisp (file)

Generic Function: resume SERVER

Resume the source or drain from a pause.

If the source was ENDED-P, it is seeked to position 0 before resuming.

See SOURCE
See DRAIN
See SERVER

Package

harmony

Methods
Method: resume (DRAIN drain)
Source

drain.lisp (file)

Method: resume (SOURCE source)
Source

source.lisp (file)

Method: resume (SERVER server)
Source

server.lisp (file)

Generic Function: run SERVER

This function is called by the background processing thread of the server.

It is responsible for starting, ending, and mixing
the segments in the pipeline. It is also
responsible for checking the server’s evaluation-
queue, and running any function that appears on it.

Within PROCESS, *IN-PROCESSING-THREAD* is bound to
T.

If the device of the server is PAUSED-P, then
BT:THREAD-YIELD is called.

See SERVER

Package

harmony

Methods
Method: run (SERVER server)
Source

server.lisp (file)

Generic Function: sample-count SOURCE

Return the number of samples the source can play back.

Note that this function may return T instead of
an integer if the number of samples is unbounded.

Every source must implement a method for this function.

See SOURCE

Package

harmony

Source

source.lisp (file)

Methods
Method: sample-count (SOURCE buffer-source)
Source

buffer.lisp (file)

Generic Function: sample-position OBJECT

Returns the sample counter for the source.

The sample counter is kept to keep track of the seeking position. It is not necessarily entirely accurate.

The samples are counted in the source’s channel samplerate, rather than the server’s samplerate. It is updated during mixing.

See SOURCE

Package

harmony

Writer

(setf sample-position) (generic function)

Methods
Method: sample-position (BUFFER-DRAIN buffer-drain)

automatically generated reader method

Source

buffer.lisp (file)

Method: sample-position (SOURCE source)

automatically generated reader method

Source

source.lisp (file)

Generic Function: (setf sample-position) NEW-VALUE OBJECT
Package

harmony

Reader

sample-position (generic function)

Methods
Method: (setf sample-position) NEW-VALUE (BUFFER-DRAIN buffer-drain)

automatically generated writer method

Source

buffer.lisp (file)

Method: (setf sample-position) NEW-VALUE (SOURCE source)

automatically generated writer method

Source

source.lisp (file)

Generic Function: samples OBJECT

Accessor to the number of samples the context processes each iteration.

See MIXING-CONTEXT

Package

harmony

Writer

(setf samples) (generic function)

Methods
Method: samples (MIXING-CONTEXT mixing-context)

automatically generated reader method

Source

mixing-context.lisp (file)

Generic Function: (setf samples) NEW-VALUE OBJECT
Package

harmony

Reader

samples (generic function)

Methods
Method: (setf samples) NEW-VALUE (MIXING-CONTEXT mixing-context)

automatically generated writer method

Source

mixing-context.lisp (file)

Generic Function: seek SOURCE POSITION &key MODE BY

Seek the source to the requested position.

MODE may be either :ABSOLUTE or :RELATIVE, where relative denotes the requested position to be relative to the current position. BY may be either :SAMPLE or :SECOND, where :SAMPLE denotes the specific requested sample position in the source’s stream, and :SECOND requests the approximate playback time in seconds.

See SOURCE
See SEEK-TO-SAMPLE

Package

harmony

Methods
Method: seek (SOURCE source) POSITION &key MODE BY
Source

source.lisp (file)

Generic Function: seek-to-sample SOURCE POSITION

Seek to the specified sample.

This position is absolute. Every source must implement a method for this function.

You should /not/ call this function yourself. It is for internal use only, and exported for the sole purpose of allowing you to define a method on it for your custom source. To do the seeking on a source, use SEEK instead.

See SEEK
See SOURCE

Package

harmony

Source

source.lisp (file)

Methods
Method: seek-to-sample (SOURCE buffer-source) POSITION
Source

buffer.lisp (file)

Generic Function: segment NAME SERVER

Accessor to the segment of the given name on the server.

This is useful to retrieve segments at a later
point in time after the pipeline has already been assembled.

See SEGMENT-MAP
See SERVER

Package

harmony

Writer

(setf segment) (generic function)

Methods
Method: segment (NAME symbol) (SERVER server)
Source

server.lisp (file)

Generic Function: (setf segment) SEGMENT NAME SERVER
Package

harmony

Reader

segment (generic function)

Generic Function: sever PIPELINE SEGMENT

Severs all connections to and from the given segment.

See CONNECT
See DISCONNECT
See PIPELINE

Package

harmony

Methods
Method: sever (PIPELINE pipeline) (SEGMENT segment)
Source

pipeline.lisp (file)

Generic Function: sources MIXER

Returns a list of all segments currently connected to the mixer.

Note that these segments are not necessarily of type
SOURCE.

See MIXER

Package

harmony

Methods
Method: sources (MIXER mixer)
Source

mixers.lisp (file)

Generic Function: start SERVER

Start up the server’s background processing thread.

This in turn causes audio processing to "actually" happen. If the server is not ready to process audio, an error is signalled. If the server has already been started, an error is signalled.

See THREAD
See SERVER
See STARTED-P
See STOP

Package

harmony

Methods
Method: start (SERVER server)
Source

server.lisp (file)

Generic Function: started-p SERVER

Returns true if the server has been started already and is currently running.

See SERVER
See START
See STOP

Package

harmony

Methods
Method: started-p (SERVER server)
Source

server.lisp (file)

Generic Function: stop SERVER

Stops the server or source.

When the server is stopped, its background processing thread is shut down. If no thread is currently running, nothing happens.

When a source is stopped, its ENDED-P property is set to T.

See THREAD
See SERVER
See START
See STARTED-P
See ENDED-P

Package

harmony

Methods
Method: stop (SOURCE source)
Source

source.lisp (file)

Method: stop (SERVER server)
Source

server.lisp (file)

Generic Function: unpack-mix-function OBJECT

Accessor to the foreign function pointer for the unpacker segment mix function.

See CL-MIXED:UNPACKER
See UNPACK-SOURCE

Package

harmony

Writer

(setf unpack-mix-function) (generic function)

Methods
Method: unpack-mix-function (UNPACK-SOURCE unpack-source)

automatically generated reader method

Source

source.lisp (file)

Generic Function: (setf unpack-mix-function) NEW-VALUE OBJECT
Package

harmony

Reader

unpack-mix-function (generic function)

Methods
Method: (setf unpack-mix-function) NEW-VALUE (UNPACK-SOURCE unpack-source)

automatically generated writer method

Source

source.lisp (file)


Previous: , Up: Exported definitions   [Contents][Index]

6.1.4 Classes

Class: basic-mixer ()

This mixer simply adds all its sources together.

Note that unless you control the volume of your sources carefully, this can easily result in the clipping of the audio samples, and thus in distortion. No dynamic range compression is applied whatsoever.

By default the mixer is initialised to input and output two channels. Should you require more or less, you must specify it via its initarg.

Each source connected to the mixer /must/ have as many outputs as this mixer has channels.

See CL-MIXED:BASIC-MIXER
See MIXER

Package

harmony

Source

mixers.lisp (file)

Direct superclasses
  • mixer (class)
  • basic-mixer (class)
Direct methods

channels-per-source (method)

Direct Default Initargs
InitargValue
:channels2
Class: buffer-drain ()

In-memory buffer drain.

This drain simply copies the data from the input buffers to its preset buffers as it is mixed.

This is mostly useful for transferring a mixer pipeline to internal buffers, or for reading a file source into buffers for in-memory playback through a buffer-source later.

Note that if the number of written samples exceeds the size of the first buffer, no further samples are written and the input data is simply thrown away. You are responsible for making the buffers be the appropriate size yourself.

See CL-MIXED:VIRTUAL
See DRAIN
See BUFFER-SOURCE

Package

harmony

Source

buffer.lisp (file)

Direct superclasses
  • drain (class)
  • virtual (class)
Direct methods
  • start (method)
  • process (method)
  • initialize-instance (method)
  • sample-position (method)
  • sample-position (method)
  • buffers (method)
  • buffers (method)
Direct slots
Slot: buffers
Initform

#()

Readers

buffers (generic function)

Writers

(setf buffers) (generic function)

Slot: sample-position
Initform

0

Readers

sample-position (generic function)

Writers

(setf sample-position) (generic function)

Direct Default Initargs
InitargValue
:buffers(error "buffers required.")
Class: buffer-source ()

In-memory buffer source.

This source simply copies the data from its preset buffers to the output buffers as it is mixed.

This is mostly useful for very low-latency effects that you can keep entirely in memory ahead of time. For instance, you could decode a wave file into the corresponding BUFFER instances and then instantiate buffer-sources from those whenever the effect should be played.

See CL-MIXED:VIRTUAL
See SOURCE
See BUFFER-DRAIN

Package

harmony

Source

buffer.lisp (file)

Direct superclasses
  • virtual (class)
  • source (class)
Direct methods
Direct slots
Slot: buffers
Initform

#()

Readers

buffers (generic function)

Writers

(setf buffers) (generic function)

Direct Default Initargs
InitargValue
:buffers(error "buffers required.")
Class: drain ()

Superclass for all drain segments in Harmony.

A drain is a segment that only consumes audio and sends it off somewhere outside of the pipeline for further processing.

A class that implements this protocol must implement a primary method on PROCESS to handle the audio processing step.

See SEGMENT
See PROCESS

Package

harmony

Source

drain.lisp (file)

Direct superclasses

segment (class)

Direct subclasses
Direct methods
  • resume (method)
  • pause (method)
  • initialize-instance (method)
Class: fadable ()

Mixin class for all segments that support volume fading.

Any implementing class must implement a method for VOLUME and (SETF VOLUME). Furthermore, the class must call PERFORM-FADING at the end of each of its mix iterations.

In order for the fading effect to be nice, the number of samples processed in each iteration must be relatively small.

See SEGMENT
See START-VOLUME
See TARGET-VOLUME
See FADE-COUNT
See FADE-END
See EASING-FUNCTION
See FADE
See PERFORM-FADING

Package

harmony

Source

fadable.lisp (file)

Direct superclasses

segment (class)

Direct subclasses

source (class)

Direct methods
Direct slots
Slot: start-volume
Initform

1.0

Readers

start-volume (generic function)

Writers

(setf start-volume) (generic function)

Slot: target-volume
Initform

1.0

Readers

target-volume (generic function)

Writers

(setf target-volume) (generic function)

Slot: fade-count
Initform

0

Readers

fade-count (generic function)

Writers

(setf fade-count) (generic function)

Slot: fade-end
Initform

0

Readers

fade-end (generic function)

Writers

(setf fade-end) (generic function)

Slot: easing-function
Initform

(function harmony:ease-linear)

Readers

easing-function (generic function)

Writers

(setf easing-function) (generic function)

Class: file-source ()

Superclass for sources that back a file.

See SOURCE
See FILE

Package

harmony

Source

files.lisp (file)

Direct superclasses

source (class)

Direct methods
  • file (method)
  • file (method)
Direct slots
Slot: file
Initargs

:file

Readers

file (generic function)

Writers

(setf file) (generic function)

Class: in-port ()

A port to represent an input location on a segment.

See FLOW:IN-PORT
See FLOW:1-PORT

Package

harmony

Source

pipeline.lisp (file)

Direct superclasses
  • 1-port (class)
  • in-port (class)
Class: in-ports ()

A port to represent a segment’s inputs for a segment that supports arbitrary input locations.

See FLOW:IN-PORT
See FLOW:N-PORT

Package

harmony

Source

pipeline.lisp (file)

Direct superclasses
  • n-port (class)
  • in-port (class)
Class: mixer ()

Superclass for all mixer segments.

Mixers are segments that accumulate multiple inputs. They all allow you to add or remove sources to mix from dynamically at runtime without having to re- compile the entire pipeline. Any source dynamically attached to a mixer should /not/ be part of the pipeline, as otherwise it is processed multiple times.

Any class that implements this protocol must implement a method on CHANNELS-PER-SOURCE which returns the number of used input buffers for each source that is added to the mixer.

See SEGMENT
See CL-MIXED:MIXER
See BUFFERS
See SOURCES
See ADD
See WITHDRAW
See CHANNELS-PER-SOURCE

Package

harmony

Source

mixers.lisp (file)

Direct superclasses
Direct subclasses
Direct methods
  • play (method)
  • play (method)
  • sources (method)
  • withdraw (method)
  • add (method)
  • add (method)
  • initialize-instance (method)
  • buffers (method)
  • buffers (method)
Direct slots
Slot: buffers
Readers

buffers (generic function)

Writers

(setf buffers) (generic function)

Class: mixing-context ()

A context that holds information about the global state of a mixing pipeline.

Upon construction the context must know the general
buffer size and the sample rate used throughout the
pipeline. These properties may not change unless
you completely recreate every segment and recompile
the pipeline.

The buffer size defaults to 441 and the sample rate
to 44100. Note that having too high a buffer size
will result in degraded output quality for some
operations like fading. Note that having a sample
rate that differs from your inputs or the output
device will likely result in bad audio quality and
distortions, as the audio data needs to be
resampled.

The number of actual samples being processed each
run is controlled by the SAMPLES field, and can be
changed at runtime. Note however that setting this
to a value higher than BUFFERSIZE will most likely
spawn demons in your pants and crash your Lisp.

See SAMPLES
See BUFFERSIZE
See SAMPLERATE
See CALL-IN-MIXING-CONTEXT
See WITH-BODY-IN-MIXING-CONTEXT

Package

harmony

Source

mixing-context.lisp (file)

Direct superclasses

standard-object (class)

Direct subclasses

server (class)

Direct methods
Direct slots
Slot: samples
Initargs

:samples

Initform

0

Readers

samples (generic function)

Writers

(setf samples) (generic function)

Slot: buffersize
Initargs

:buffersize

Initform

0

Readers

buffersize (generic function)

Writers

(setf buffersize) (generic function)

Slot: samplerate
Initargs

:samplerate

Initform

0

Readers

samplerate (generic function)

Direct Default Initargs
InitargValue
:buffersize441
:samplerate44100
Class: node ()

A node to represent a segment in the pipeline.

You should construct this through MAKE-NODE.

See FLOW:DYNAMIC-NODE
See MAKE-NODE
See COMPLETE-SEGMENT
See NTH-OUT
See NTH-IN

Package

harmony

Source

pipeline.lisp (file)

Direct superclasses

dynamic-node (class)

Direct methods
Class: out-port ()

A port to represent an output location on a segment.

See FLOW:OUT-PORT
See FLOW:N-PORT

Package

harmony

Source

pipeline.lisp (file)

Direct superclasses
  • n-port (class)
  • out-port (class)
Class: pack-drain ()

Superclass for drains that pack to a compact format first.

This drain performs a preprocessing of the input buffers by merging them, and possibly converting
or resampling them, into a single C array of
audio samples.

This is convenient for a lot of external libraries
and APIs that expect a singular C buffer of samples
in a specific format.

A class that implements this protocol must implement
a primary method on INITIALIZE-PACKED-AUDIO, which should return a valid PACKED-AUDIO instance that
holds and describes the expected audio format properties.

See DRAIN
See REMIX-FACTOR
See PACKED-AUDIO
See INITIALIZE-PACKED-AUDIO
See CL-MIXED:PACKED-AUDIO

Package

harmony

Source

drain.lisp (file)

Direct superclasses

drain (class)

Direct methods
  • bypass (method)
  • bypass (method)
  • field (method)
  • field (method)
  • volume (method)
  • volume (method)
  • field (method)
  • field (method)
  • process (method)
  • initialize-instance (method)
  • pack-mix-function (method)
  • pack-mix-function (method)
  • packed-audio (method)
  • packed-audio (method)
  • remix-factor (method)
  • remix-factor (method)
Direct slots
Slot: remix-factor
Initform

0

Readers

remix-factor (generic function)

Writers

(setf remix-factor) (generic function)

Slot: packed-audio
Readers

packed-audio (generic function)

Writers

(setf packed-audio) (generic function)

Slot: pack-mix-function
Readers

pack-mix-function (generic function)

Writers

(setf pack-mix-function) (generic function)

Class: pipeline ()

This class holds a collection of nodes during the assembly of an audio pipeline.

It is primarily used to handle the logic of connecting
segments together and finally compiling it all down
to a fully assembled audio pipeline ready for use in
the server.

Among other things it takes care of buffer allocation
and proper buffer assignment.

See CONNECT
See DISCONNECT
See SEVER
See COMPILE-PIPELINE

Package

harmony

Source

pipeline.lisp (file)

Direct superclasses

standard-object (class)

Direct methods
Direct slots
Slot: nodes
Initform

(make-hash-table :test (quote eq))

Readers

nodes (generic function)

Writers

(setf nodes) (generic function)

Class: segment ()

Base class for all Harmony segments that can appear in a pipeline.

A segment must carry a reference to the context
that it is running on. This reference can be
supplied through the :CONTEXT initarg.

Segments can have a name, which allows them to be
found again through the server object, when they
appear in the server’s pipeline.

Note that even segments that are not derived
from this class, but rather the underlying class CL-MIXED:SEGMENT may be used in a pipeline.

See CL-MIXED:SEGMENT
See CONTEXT
See NAME

Package

harmony

Source

segment.lisp (file)

Direct superclasses

segment (class)

Direct subclasses
Direct methods
  • connect (method)
  • segment (method)
  • print-object (method)
  • name (method)
  • context (method)
  • context (method)
Direct slots
Slot: context
Initargs

:context

Readers

context (generic function)

Writers

(setf context) (generic function)

Slot: name
Initargs

:name

Readers

name (generic function)

Direct Default Initargs
InitargValue
:context(error "context initarg required.")
:namenil
Class: server ()

This class represents a sound server.

The server is responsible for keeping a background thread that constantly processes and outputs sound.

The actual construction of a sound pipeline should be done through the PIPELINE class, which can then compile its information down to a format suitable for the server.

See MIXING-CONTEXT
See SEGMENT-MAP
See SAMPLES
See BUFFERSIZE
See SAMPLESIZE
See DEVICE
See SEGMENT-SEQUENCE
See BUFFERS
See THREAD
See COMPILE-PIPELINE
See EVALUATION-QUEUE-HEAD
See EVALUATION-QUEUE-TAIL
See EVALUATION-LOCK
See SEGMENT
See SEGMENTS
See START
See STARTED-P
See STOP
See RUN
See CALL-IN-SERVER-THREAD
See PAUSED-P
See PAUSE
See RESUME

Package

harmony

Source

server.lisp (file)

Direct superclasses

mixing-context (class)

Direct methods
Direct slots
Slot: segment-map
Initform

(make-hash-table :test (quote eql))

Readers

segment-map (generic function)

Writers

(setf segment-map) (generic function)

Slot: device
Initargs

:device

Readers

device (generic function)

Writers

(setf device) (generic function)

Slot: segment-sequence
Readers

segment-sequence (generic function)

Writers

(setf segment-sequence) (generic function)

Slot: buffers
Readers

buffers (generic function)

Writers

(setf buffers) (generic function)

Slot: thread
Readers

thread (generic function)

Writers

(setf thread) (generic function)

Slot: evaluation-queue-head
Readers

evaluation-queue-head (generic function)

Writers

(setf evaluation-queue-head) (generic function)

Slot: evaluation-queue-tail
Readers

evaluation-queue-tail (generic function)

Writers

(setf evaluation-queue-tail) (generic function)

Slot: evaluation-lock
Readers

evaluation-lock (generic function)

Writers

(setf evaluation-lock) (generic function)

Class: source ()

Superclass for all of Harmony’s source segments.

A source segment does not input any data and instead directly provides it, either by generating it on the fly, or by reading it from a file or some kind of stream.

A class that implements this protocol must implement a primary method on PROCESS to output samples to its connected buffers.

Furthermore it must implement the SEEK-TO-SAMPLE method to provide seeking. If it cannot seek, even in the most imprecise way, it must implement that method to signal an error.

See FADABLE
See LOOPING-P
See PAUSED-P
See ENDED-P
See SAMPLE-POSITION
See PROCESS
See PAUSE
See RESUME
See STOP
See SEEK
See SEEK-TO-SAMPLE
See SAMPLE-COUNT
See PLAY

Package

harmony

Source

source.lisp (file)

Direct superclasses

fadable (class)

Direct subclasses
Direct methods
Direct slots
Slot: looping-p
Initargs

:loop

Readers

looping-p (generic function)

Writers

(setf looping-p) (generic function)

Slot: paused-p
Initargs

:paused

Readers

paused-p (generic function)

Writers

(setf paused-p) (generic function)

Slot: ended-p
Readers

ended-p (generic function)

Writers

(setf ended-p) (generic function)

Slot: sample-position
Initform

0

Readers

sample-position (generic function)

Writers

(setf sample-position) (generic function)

Class: space-mixer ()

This mixer mixes sources as if they were located in 3D space.

Note that unless you control the volume of your
sources carefully, this can easily result in the
clipping of the audio samples, and thus in distortion.
No dynamic range compression is applied whatsoever.

Each source only has to have a single output buffer, which is then interpreted as a point audio source. If
you require different shapes of sources, you can get
that behaviour by modifying the location of the source relative to the listener in such a way that the
closest point of the source’s shape is the actual point the source has. This won’t account for overlapping and such finer details of sound, but should be good enough for most cases.

Note that unlike in CL-MIXED, where each source is independent of the mixer, and you thus have to use the INPUT-LOCATION/VELOCITY functions to adjust their parameters, in Harmony the sources are tied to a mixer and you can thus use the same LOCATION and VELOCITY functions for sources as you would for the mixer. In
the case of the mixer, the location and velocity are
to be interpreted as those of the listener.

See CL-MIXED:SPACE-MIXER
See MIXER
See LOCATION
See VELOCITY
See DIRECTION
See UP
See SOUNDSPEED
See DOPPLER-FACTOR
See MIN-DISTANCE
See MAX-DISTANCE
See ROLLOFF
See ATTENUATION

Package

harmony

Source

mixers.lisp (file)

Direct superclasses
  • mixer (class)
  • space-mixer (class)
Direct methods

channels-per-source (method)

Class: unpack-source ()

Superclass for sources that unpack from a compact format first.

This source performs postprocessing of a data array
by splitting it out to the connected output buffers,
and possibly converting or resampling it as
necessary.

This is convenient for a lot of external libraries
and APIs that provide a singular C buffer of samples
in a specific format.

A class that implements this protocol must implement
a primary method on INITIALIZE-PACKED-AUDIO, which
should return a valid PACKED-AUDIO instance that
holds and describes the provided audio format
properties.

See SOURCE
See REMIX-FACTOR
See PACKED-AUDIO
See INITIALIZE-PACKED-AUDIO
See FILL-FOR-UNPACK-SOURCE

Package

harmony

Source

source.lisp (file)

Direct superclasses

source (class)

Direct methods
  • bypass (method)
  • bypass (method)
  • field (method)
  • field (method)
  • volume (method)
  • volume (method)
  • field (method)
  • field (method)
  • process (method)
  • initialize-instance (method)
  • unpack-mix-function (method)
  • unpack-mix-function (method)
  • packed-audio (method)
  • packed-audio (method)
  • remix-factor (method)
  • remix-factor (method)
Direct slots
Slot: remix-factor
Initform

0

Readers

remix-factor (generic function)

Writers

(setf remix-factor) (generic function)

Slot: packed-audio
Readers

packed-audio (generic function)

Writers

(setf packed-audio) (generic function)

Slot: unpack-mix-function
Readers

unpack-mix-function (generic function)

Writers

(setf unpack-mix-function) (generic function)


Previous: , Up: Definitions   [Contents][Index]

6.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.1 Special variables

Special Variable: *filetype-source-map*

This map stores the associations of file type extensions to source class names.

See SOURCE-TYPE

Package

harmony

Source

files.lisp (file)

Special Variable: *in-processing-thread*

If this is T, then the current context is within the server’s processing thread.

See PROCESS
See CALL-IN-SERVER-THREAD

Package

harmony

Source

server.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.2 Functions

Function: perform-fading FADABLE SAMPLES

Perform the computations necessary to adjust the volume to fade.

You should call this function at the end of every
iteration of your primary mixing of the segment.

See FADABLE

Package

harmony

Source

fadable.lisp (file)


Previous: , Up: Internal definitions   [Contents][Index]

6.2.3 Generic functions

Generic Function: call-in-mixing-context FUNCTION CONTEXT &key SYNCHRONIZE TIMEOUT VALUES &allow-other-keys

Causes the given function to be evaluated in the context.

For a SERVER the following additional arguments are recognised:

If SYNCHRONIZE is non-NIL, then this function does not return until the given function has been evaluated. If additionally VALUES is non-NIL, the values as produced by the given function are
returned after evaluation.

If TIMEOUT is given, it should be the number of seconds after which this function gives up waiting for the given function to be evaluated or to finish evaluating.

Note that if *IN-PROCESSING-THREAD* is non-NIL, or
if the server has no thread, the function is evaluated directly and immediately. Otherwise it
is placed onto the server’s evaluation-queue.

See WITH-BODY-IN-MIXING-CONTEXT
See *IN-PROCESSING-THREAD*

Package

harmony

Source

mixing-context.lisp (file)

Methods
Method: call-in-mixing-context FUNCTION (SERVER server) &key SYNCHRONIZE TIMEOUT VALUES
Source

server.lisp (file)

Method: call-in-mixing-context FUNCTION (CONTEXT mixing-context) &key
Generic Function: complete-segment NODE

Complete the segment in the node and return it.

Completing it means assigning the buffers to the inputs and outputs of the segment as appropriate. The node’s ports must have a BUFFER attribute for this purpose.

See NODE
See SEGMENT
See CL-MIXED:INPUT
See CL-MIXED:OUTPUT
See FLOW:ATTRIBUTE

Package

harmony

Methods
Method: complete-segment (NODE node)
Source

pipeline.lisp (file)

Generic Function: easing-function OBJECT

Accessor to the function used to ease the volume.

This function should take one float argument in the range [0,1] and should return another float value close to the range [0,1]. It must not necessarily match the range exactly.

See FADABLE

Package

harmony

Writer

(setf easing-function) (generic function)

Methods
Method: easing-function (FADABLE fadable)

automatically generated reader method

Source

fadable.lisp (file)

Generic Function: (setf easing-function) NEW-VALUE OBJECT
Package

harmony

Reader

easing-function (generic function)

Methods
Method: (setf easing-function) NEW-VALUE (FADABLE fadable)

automatically generated writer method

Source

fadable.lisp (file)

Generic Function: evaluation-lock OBJECT

Accessor to the lock used to secure the evaluation queue.

See SERVER
See EVALUATION-QUEUE

Package

harmony

Writer

(setf evaluation-lock) (generic function)

Methods
Method: evaluation-lock (SERVER server)

automatically generated reader method

Source

server.lisp (file)

Generic Function: (setf evaluation-lock) NEW-VALUE OBJECT
Package

harmony

Reader

evaluation-lock (generic function)

Methods
Method: (setf evaluation-lock) NEW-VALUE (SERVER server)

automatically generated writer method

Source

server.lisp (file)

Generic Function: evaluation-queue-head OBJECT

Accessor to the head of the list of functions the server should evaluate.

This list is used to cause functions to be run
inside the server thread, forcing a
synchronisation of the state. This in turn allows
you to evaluate things that might otherwise cause
race conditions or other kinds of problems that
might wreck the system.

See SERVER
See CALL-IN-SERVER-THREAD
See EVALUATION-LOCK

Package

harmony

Writer

(setf evaluation-queue-head) (generic function)

Methods
Method: evaluation-queue-head (SERVER server)

automatically generated reader method

Source

server.lisp (file)

Generic Function: (setf evaluation-queue-head) NEW-VALUE OBJECT
Package

harmony

Reader

evaluation-queue-head (generic function)

Methods
Method: (setf evaluation-queue-head) NEW-VALUE (SERVER server)

automatically generated writer method

Source

server.lisp (file)

Generic Function: evaluation-queue-tail OBJECT

Accessor to the tail end of the list of functions the server should evaluate.

This always references a CONS whose CDR can be
used to append new functions to the queue.

See SERVER
See CALL-IN-SERVER-THREAD
See EVALUATION-LOCK

Package

harmony

Writer

(setf evaluation-queue-tail) (generic function)

Methods
Method: evaluation-queue-tail (SERVER server)

automatically generated reader method

Source

server.lisp (file)

Generic Function: (setf evaluation-queue-tail) NEW-VALUE OBJECT
Package

harmony

Reader

evaluation-queue-tail (generic function)

Methods
Method: (setf evaluation-queue-tail) NEW-VALUE (SERVER server)

automatically generated writer method

Source

server.lisp (file)

Generic Function: fade-count OBJECT

Accessor to the current sample count in the fading process.

The fade duration is counted in number of samples
from zero. If this is the same as FADE-END, no
fading is performed. Otherwise this is increased
by the number of samples processed every time PERFORM-FADING is called.

See FADE-END
See TARGET-VOLUME
See START-VOLUME
See FADABLE

Package

harmony

Writer

(setf fade-count) (generic function)

Methods
Method: fade-count (FADABLE fadable)

automatically generated reader method

Source

fadable.lisp (file)

Generic Function: (setf fade-count) NEW-VALUE OBJECT
Package

harmony

Reader

fade-count (generic function)

Methods
Method: (setf fade-count) NEW-VALUE (FADABLE fadable)

automatically generated writer method

Source

fadable.lisp (file)

Generic Function: fade-end OBJECT

Accessor to the sample count after which the target-volume is reached.

See FADE-COUNT
See TARGET-VOLUME
See START-VOLUME
See FADABLE

Package

harmony

Writer

(setf fade-end) (generic function)

Methods
Method: fade-end (FADABLE fadable)

automatically generated reader method

Source

fadable.lisp (file)

Generic Function: (setf fade-end) NEW-VALUE OBJECT
Package

harmony

Reader

fade-end (generic function)

Methods
Method: (setf fade-end) NEW-VALUE (FADABLE fadable)

automatically generated writer method

Source

fadable.lisp (file)

Generic Function: nth-in N NODE

Return the nth input port of the node.

If no such input port exists, an error is signalled. Note that IN-PORTS act as if they cover an indefinite number of locations.

See NODE

Package

harmony

Methods
Method: nth-in N (NODE node)
Source

pipeline.lisp (file)

Generic Function: nth-out N NODE

Return the nth output port of the node.

If no such output port exists, an error is signalled.

See NODE

Package

harmony

Methods
Method: nth-out N (NODE node)
Source

pipeline.lisp (file)

Generic Function: segment-map OBJECT

Accessor to the hash table associating names to segments.

This map is usually populated by COMPILE-PIPELINE.

See NAME
See SERVER
See SEGMENT

Package

harmony

Writer

(setf segment-map) (generic function)

Methods
Method: segment-map (SERVER server)

automatically generated reader method

Source

server.lisp (file)

Generic Function: (setf segment-map) NEW-VALUE OBJECT
Package

harmony

Reader

segment-map (generic function)

Methods
Method: (setf segment-map) NEW-VALUE (SERVER server)

automatically generated writer method

Source

server.lisp (file)

Generic Function: segment-sequence OBJECT

Accessor to the segment-sequence of the server.

This object handles the invocation of the segments in their proper order. It is usually created and assigned by COMPILE-PIPELINE.

See CL-MIXED:SEGMENT-SEQUENCE
See SERVER

Package

harmony

Writer

(setf segment-sequence) (generic function)

Methods
Method: segment-sequence (SERVER server)

automatically generated reader method

Source

server.lisp (file)

Generic Function: (setf segment-sequence) NEW-VALUE OBJECT
Package

harmony

Reader

segment-sequence (generic function)

Methods
Method: (setf segment-sequence) NEW-VALUE (SERVER server)

automatically generated writer method

Source

server.lisp (file)

Generic Function: start-volume OBJECT

Accessor to the starting volume of the fading segment.

See FADABLE

Package

harmony

Writer

(setf start-volume) (generic function)

Methods
Method: start-volume (FADABLE fadable)

automatically generated reader method

Source

fadable.lisp (file)

Generic Function: (setf start-volume) NEW-VALUE OBJECT
Package

harmony

Reader

start-volume (generic function)

Methods
Method: (setf start-volume) NEW-VALUE (FADABLE fadable)

automatically generated writer method

Source

fadable.lisp (file)

Generic Function: target-volume OBJECT

Accessor to the ending/target volume of the fading segment.

See FADABLE

Package

harmony

Writer

(setf target-volume) (generic function)

Methods
Method: target-volume (FADABLE fadable)

automatically generated reader method

Source

fadable.lisp (file)

Generic Function: (setf target-volume) NEW-VALUE OBJECT
Package

harmony

Reader

target-volume (generic function)

Methods
Method: (setf target-volume) NEW-VALUE (FADABLE fadable)

automatically generated writer method

Source

fadable.lisp (file)

Generic Function: thread OBJECT

Accessor to the background processing thread of the server.

If this is NIL, you may assume that the server
is currently not processing any data.

See START
See STARTED-P
See STOP
See PROCESS

Package

harmony

Writer

(setf thread) (generic function)

Methods
Method: thread (SERVER server)

automatically generated reader method

Source

server.lisp (file)

Generic Function: (setf thread) NEW-VALUE OBJECT
Package

harmony

Reader

thread (generic function)

Methods
Method: (setf thread) NEW-VALUE (SERVER server)

automatically generated writer method

Source

server.lisp (file)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   F   H   L   M  
Index Entry  Section

F
File, Lisp, harmony.asd: The harmony<dot>asd file
File, Lisp, harmony/documentation.lisp: The harmony/documentation<dot>lisp file
File, Lisp, harmony/drain.lisp: The harmony/drain<dot>lisp file
File, Lisp, harmony/drains/buffer.lisp: The harmony/drains/buffer<dot>lisp file
File, Lisp, harmony/fadable.lisp: The harmony/fadable<dot>lisp file
File, Lisp, harmony/files.lisp: The harmony/files<dot>lisp file
File, Lisp, harmony/mixers.lisp: The harmony/mixers<dot>lisp file
File, Lisp, harmony/mixing-context.lisp: The harmony/mixing-context<dot>lisp file
File, Lisp, harmony/package.lisp: The harmony/package<dot>lisp file
File, Lisp, harmony/pipeline.lisp: The harmony/pipeline<dot>lisp file
File, Lisp, harmony/segment.lisp: The harmony/segment<dot>lisp file
File, Lisp, harmony/server.lisp: The harmony/server<dot>lisp file
File, Lisp, harmony/source.lisp: The harmony/source<dot>lisp file
File, Lisp, harmony/sources/buffer.lisp: The harmony/sources/buffer<dot>lisp file
File, Lisp, harmony/toolkit.lisp: The harmony/toolkit<dot>lisp file

H
harmony.asd: The harmony<dot>asd file
harmony/documentation.lisp: The harmony/documentation<dot>lisp file
harmony/drain.lisp: The harmony/drain<dot>lisp file
harmony/drains: The harmony/drains module
harmony/drains/buffer.lisp: The harmony/drains/buffer<dot>lisp file
harmony/fadable.lisp: The harmony/fadable<dot>lisp file
harmony/files.lisp: The harmony/files<dot>lisp file
harmony/mixers.lisp: The harmony/mixers<dot>lisp file
harmony/mixing-context.lisp: The harmony/mixing-context<dot>lisp file
harmony/package.lisp: The harmony/package<dot>lisp file
harmony/pipeline.lisp: The harmony/pipeline<dot>lisp file
harmony/segment.lisp: The harmony/segment<dot>lisp file
harmony/server.lisp: The harmony/server<dot>lisp file
harmony/source.lisp: The harmony/source<dot>lisp file
harmony/sources: The harmony/sources module
harmony/sources/buffer.lisp: The harmony/sources/buffer<dot>lisp file
harmony/toolkit.lisp: The harmony/toolkit<dot>lisp file

L
Lisp File, harmony.asd: The harmony<dot>asd file
Lisp File, harmony/documentation.lisp: The harmony/documentation<dot>lisp file
Lisp File, harmony/drain.lisp: The harmony/drain<dot>lisp file
Lisp File, harmony/drains/buffer.lisp: The harmony/drains/buffer<dot>lisp file
Lisp File, harmony/fadable.lisp: The harmony/fadable<dot>lisp file
Lisp File, harmony/files.lisp: The harmony/files<dot>lisp file
Lisp File, harmony/mixers.lisp: The harmony/mixers<dot>lisp file
Lisp File, harmony/mixing-context.lisp: The harmony/mixing-context<dot>lisp file
Lisp File, harmony/package.lisp: The harmony/package<dot>lisp file
Lisp File, harmony/pipeline.lisp: The harmony/pipeline<dot>lisp file
Lisp File, harmony/segment.lisp: The harmony/segment<dot>lisp file
Lisp File, harmony/server.lisp: The harmony/server<dot>lisp file
Lisp File, harmony/source.lisp: The harmony/source<dot>lisp file
Lisp File, harmony/sources/buffer.lisp: The harmony/sources/buffer<dot>lisp file
Lisp File, harmony/toolkit.lisp: The harmony/toolkit<dot>lisp file

M
Module, harmony/drains: The harmony/drains module
Module, harmony/sources: The harmony/sources module

Jump to:   F   H   L   M  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   (  
A   B   C   D   E   F   G   I   L   M   N   P   R   S   T   U   W  
Index Entry  Section

(
(setf buffers): Exported generic functions
(setf buffers): Exported generic functions
(setf buffers): Exported generic functions
(setf buffers): Exported generic functions
(setf buffers): Exported generic functions
(setf buffersize): Exported generic functions
(setf buffersize): Exported generic functions
(setf buffersize): Exported generic functions
(setf context): Exported generic functions
(setf context): Exported generic functions
(setf device): Exported generic functions
(setf device): Exported generic functions
(setf easing-function): Internal generic functions
(setf easing-function): Internal generic functions
(setf ended-p): Exported generic functions
(setf ended-p): Exported generic functions
(setf evaluation-lock): Internal generic functions
(setf evaluation-lock): Internal generic functions
(setf evaluation-queue-head): Internal generic functions
(setf evaluation-queue-head): Internal generic functions
(setf evaluation-queue-tail): Internal generic functions
(setf evaluation-queue-tail): Internal generic functions
(setf fade-count): Internal generic functions
(setf fade-count): Internal generic functions
(setf fade-end): Internal generic functions
(setf fade-end): Internal generic functions
(setf file): Exported generic functions
(setf file): Exported generic functions
(setf looping-p): Exported generic functions
(setf looping-p): Exported generic functions
(setf nodes): Exported generic functions
(setf nodes): Exported generic functions
(setf pack-mix-function): Exported generic functions
(setf pack-mix-function): Exported generic functions
(setf paused-p): Exported generic functions
(setf paused-p): Exported generic functions
(setf paused-p): Exported generic functions
(setf paused-p): Exported generic functions
(setf remix-factor): Exported generic functions
(setf remix-factor): Exported generic functions
(setf remix-factor): Exported generic functions
(setf sample-position): Exported generic functions
(setf sample-position): Exported generic functions
(setf sample-position): Exported generic functions
(setf samples): Exported generic functions
(setf samples): Exported generic functions
(setf segment): Exported generic functions
(setf segment-map): Internal generic functions
(setf segment-map): Internal generic functions
(setf segment-sequence): Internal generic functions
(setf segment-sequence): Internal generic functions
(setf source-type): Exported functions
(setf start-volume): Internal generic functions
(setf start-volume): Internal generic functions
(setf target-volume): Internal generic functions
(setf target-volume): Internal generic functions
(setf thread): Internal generic functions
(setf thread): Internal generic functions
(setf unpack-mix-function): Exported generic functions
(setf unpack-mix-function): Exported generic functions

A
allocate-buffers: Exported functions

B
buffers: Exported generic functions
buffers: Exported generic functions
buffers: Exported generic functions
buffers: Exported generic functions
buffers: Exported generic functions
buffersize: Exported generic functions
buffersize: Exported generic functions

C
call-in-mixing-context: Internal generic functions
call-in-mixing-context: Internal generic functions
call-in-mixing-context: Internal generic functions
channels-per-source: Exported generic functions
channels-per-source: Exported generic functions
channels-per-source: Exported generic functions
compile-pipeline: Exported generic functions
compile-pipeline: Exported generic functions
complete-segment: Internal generic functions
complete-segment: Internal generic functions
connect: Exported generic functions
connect: Exported generic functions
context: Exported generic functions
context: Exported generic functions

D
decode: Exported generic functions
decode: Exported generic functions
decode: Exported generic functions
decode: Exported generic functions
define-source-type: Exported macros
device: Exported generic functions
device: Exported generic functions
disconnect: Exported generic functions
disconnect: Exported generic functions

E
ease-cubic-in: Exported functions
ease-cubic-in-out: Exported functions
ease-cubic-out: Exported functions
ease-linear: Exported functions
easing-function: Internal generic functions
easing-function: Internal generic functions
ended-p: Exported generic functions
ended-p: Exported generic functions
ensure-node: Exported generic functions
ensure-node: Exported generic functions
ensure-node: Exported generic functions
evaluation-lock: Internal generic functions
evaluation-lock: Internal generic functions
evaluation-queue-head: Internal generic functions
evaluation-queue-head: Internal generic functions
evaluation-queue-tail: Internal generic functions
evaluation-queue-tail: Internal generic functions

F
fade: Exported generic functions
fade: Exported generic functions
fade-count: Internal generic functions
fade-count: Internal generic functions
fade-end: Internal generic functions
fade-end: Internal generic functions
file: Exported generic functions
file: Exported generic functions
fill-for-unpack-source: Exported functions
Function, (setf source-type): Exported functions
Function, allocate-buffers: Exported functions
Function, ease-cubic-in: Exported functions
Function, ease-cubic-in-out: Exported functions
Function, ease-cubic-out: Exported functions
Function, ease-linear: Exported functions
Function, fill-for-unpack-source: Exported functions
Function, memclear: Exported functions
Function, memcpy: Exported functions
Function, memset: Exported functions
Function, perform-fading: Internal functions
Function, source-type: Exported functions

G
Generic Function, (setf buffers): Exported generic functions
Generic Function, (setf buffersize): Exported generic functions
Generic Function, (setf context): Exported generic functions
Generic Function, (setf device): Exported generic functions
Generic Function, (setf easing-function): Internal generic functions
Generic Function, (setf ended-p): Exported generic functions
Generic Function, (setf evaluation-lock): Internal generic functions
Generic Function, (setf evaluation-queue-head): Internal generic functions
Generic Function, (setf evaluation-queue-tail): Internal generic functions
Generic Function, (setf fade-count): Internal generic functions
Generic Function, (setf fade-end): Internal generic functions
Generic Function, (setf file): Exported generic functions
Generic Function, (setf looping-p): Exported generic functions
Generic Function, (setf nodes): Exported generic functions
Generic Function, (setf pack-mix-function): Exported generic functions
Generic Function, (setf paused-p): Exported generic functions
Generic Function, (setf remix-factor): Exported generic functions
Generic Function, (setf sample-position): Exported generic functions
Generic Function, (setf samples): Exported generic functions
Generic Function, (setf segment): Exported generic functions
Generic Function, (setf segment-map): Internal generic functions
Generic Function, (setf segment-sequence): Internal generic functions
Generic Function, (setf start-volume): Internal generic functions
Generic Function, (setf target-volume): Internal generic functions
Generic Function, (setf thread): Internal generic functions
Generic Function, (setf unpack-mix-function): Exported generic functions
Generic Function, buffers: Exported generic functions
Generic Function, buffersize: Exported generic functions
Generic Function, call-in-mixing-context: Internal generic functions
Generic Function, channels-per-source: Exported generic functions
Generic Function, compile-pipeline: Exported generic functions
Generic Function, complete-segment: Internal generic functions
Generic Function, connect: Exported generic functions
Generic Function, context: Exported generic functions
Generic Function, decode: Exported generic functions
Generic Function, device: Exported generic functions
Generic Function, disconnect: Exported generic functions
Generic Function, easing-function: Internal generic functions
Generic Function, ended-p: Exported generic functions
Generic Function, ensure-node: Exported generic functions
Generic Function, evaluation-lock: Internal generic functions
Generic Function, evaluation-queue-head: Internal generic functions
Generic Function, evaluation-queue-tail: Internal generic functions
Generic Function, fade: Exported generic functions
Generic Function, fade-count: Internal generic functions
Generic Function, fade-end: Internal generic functions
Generic Function, file: Exported generic functions
Generic Function, initialize-packed-audio: Exported generic functions
Generic Function, looping-p: Exported generic functions
Generic Function, make-node: Exported generic functions
Generic Function, name: Exported generic functions
Generic Function, nodes: Exported generic functions
Generic Function, nth-in: Internal generic functions
Generic Function, nth-out: Internal generic functions
Generic Function, pack-mix-function: Exported generic functions
Generic Function, pause: Exported generic functions
Generic Function, paused-p: Exported generic functions
Generic Function, play: Exported generic functions
Generic Function, process: Exported generic functions
Generic Function, remix-factor: Exported generic functions
Generic Function, resume: Exported generic functions
Generic Function, run: Exported generic functions
Generic Function, sample-count: Exported generic functions
Generic Function, sample-position: Exported generic functions
Generic Function, samples: Exported generic functions
Generic Function, seek: Exported generic functions
Generic Function, seek-to-sample: Exported generic functions
Generic Function, segment: Exported generic functions
Generic Function, segment-map: Internal generic functions
Generic Function, segment-sequence: Internal generic functions
Generic Function, sever: Exported generic functions
Generic Function, sources: Exported generic functions
Generic Function, start: Exported generic functions
Generic Function, start-volume: Internal generic functions
Generic Function, started-p: Exported generic functions
Generic Function, stop: Exported generic functions
Generic Function, target-volume: Internal generic functions
Generic Function, thread: Internal generic functions
Generic Function, unpack-mix-function: Exported generic functions

I
initialize-packed-audio: Exported generic functions

L
looping-p: Exported generic functions
looping-p: Exported generic functions

M
Macro, define-source-type: Exported macros
Macro, with-body-in-mixing-context: Exported macros
make-node: Exported generic functions
make-node: Exported generic functions
memclear: Exported functions
memcpy: Exported functions
memset: Exported functions
Method, (setf buffers): Exported generic functions
Method, (setf buffers): Exported generic functions
Method, (setf buffers): Exported generic functions
Method, (setf buffers): Exported generic functions
Method, (setf buffersize): Exported generic functions
Method, (setf buffersize): Exported generic functions
Method, (setf context): Exported generic functions
Method, (setf device): Exported generic functions
Method, (setf easing-function): Internal generic functions
Method, (setf ended-p): Exported generic functions
Method, (setf evaluation-lock): Internal generic functions
Method, (setf evaluation-queue-head): Internal generic functions
Method, (setf evaluation-queue-tail): Internal generic functions
Method, (setf fade-count): Internal generic functions
Method, (setf fade-end): Internal generic functions
Method, (setf file): Exported generic functions
Method, (setf looping-p): Exported generic functions
Method, (setf nodes): Exported generic functions
Method, (setf pack-mix-function): Exported generic functions
Method, (setf paused-p): Exported generic functions
Method, (setf paused-p): Exported generic functions
Method, (setf paused-p): Exported generic functions
Method, (setf remix-factor): Exported generic functions
Method, (setf remix-factor): Exported generic functions
Method, (setf sample-position): Exported generic functions
Method, (setf sample-position): Exported generic functions
Method, (setf samples): Exported generic functions
Method, (setf segment-map): Internal generic functions
Method, (setf segment-sequence): Internal generic functions
Method, (setf start-volume): Internal generic functions
Method, (setf target-volume): Internal generic functions
Method, (setf thread): Internal generic functions
Method, (setf unpack-mix-function): Exported generic functions
Method, buffers: Exported generic functions
Method, buffers: Exported generic functions
Method, buffers: Exported generic functions
Method, buffers: Exported generic functions
Method, buffersize: Exported generic functions
Method, call-in-mixing-context: Internal generic functions
Method, call-in-mixing-context: Internal generic functions
Method, channels-per-source: Exported generic functions
Method, channels-per-source: Exported generic functions
Method, compile-pipeline: Exported generic functions
Method, complete-segment: Internal generic functions
Method, connect: Exported generic functions
Method, context: Exported generic functions
Method, decode: Exported generic functions
Method, decode: Exported generic functions
Method, decode: Exported generic functions
Method, device: Exported generic functions
Method, disconnect: Exported generic functions
Method, easing-function: Internal generic functions
Method, ended-p: Exported generic functions
Method, ensure-node: Exported generic functions
Method, ensure-node: Exported generic functions
Method, evaluation-lock: Internal generic functions
Method, evaluation-queue-head: Internal generic functions
Method, evaluation-queue-tail: Internal generic functions
Method, fade: Exported generic functions
Method, fade-count: Internal generic functions
Method, fade-end: Internal generic functions
Method, file: Exported generic functions
Method, looping-p: Exported generic functions
Method, make-node: Exported generic functions
Method, name: Exported generic functions
Method, nodes: Exported generic functions
Method, nth-in: Internal generic functions
Method, nth-out: Internal generic functions
Method, pack-mix-function: Exported generic functions
Method, pause: Exported generic functions
Method, pause: Exported generic functions
Method, pause: Exported generic functions
Method, paused-p: Exported generic functions
Method, paused-p: Exported generic functions
Method, play: Exported generic functions
Method, play: Exported generic functions
Method, play: Exported generic functions
Method, play: Exported generic functions
Method, play: Exported generic functions
Method, process: Exported generic functions
Method, process: Exported generic functions
Method, process: Exported generic functions
Method, process: Exported generic functions
Method, remix-factor: Exported generic functions
Method, remix-factor: Exported generic functions
Method, resume: Exported generic functions
Method, resume: Exported generic functions
Method, resume: Exported generic functions
Method, run: Exported generic functions
Method, sample-count: Exported generic functions
Method, sample-position: Exported generic functions
Method, sample-position: Exported generic functions
Method, samples: Exported generic functions
Method, seek: Exported generic functions
Method, seek-to-sample: Exported generic functions
Method, segment: Exported generic functions
Method, segment-map: Internal generic functions
Method, segment-sequence: Internal generic functions
Method, sever: Exported generic functions
Method, sources: Exported generic functions
Method, start: Exported generic functions
Method, start-volume: Internal generic functions
Method, started-p: Exported generic functions
Method, stop: Exported generic functions
Method, stop: Exported generic functions
Method, target-volume: Internal generic functions
Method, thread: Internal generic functions
Method, unpack-mix-function: Exported generic functions

N
name: Exported generic functions
name: Exported generic functions
nodes: Exported generic functions
nodes: Exported generic functions
nth-in: Internal generic functions
nth-in: Internal generic functions
nth-out: Internal generic functions
nth-out: Internal generic functions

P
pack-mix-function: Exported generic functions
pack-mix-function: Exported generic functions
pause: Exported generic functions
pause: Exported generic functions
pause: Exported generic functions
pause: Exported generic functions
paused-p: Exported generic functions
paused-p: Exported generic functions
paused-p: Exported generic functions
perform-fading: Internal functions
play: Exported generic functions
play: Exported generic functions
play: Exported generic functions
play: Exported generic functions
play: Exported generic functions
play: Exported generic functions
process: Exported generic functions
process: Exported generic functions
process: Exported generic functions
process: Exported generic functions
process: Exported generic functions

R
remix-factor: Exported generic functions
remix-factor: Exported generic functions
remix-factor: Exported generic functions
resume: Exported generic functions
resume: Exported generic functions
resume: Exported generic functions
resume: Exported generic functions
run: Exported generic functions
run: Exported generic functions

S
sample-count: Exported generic functions
sample-count: Exported generic functions
sample-position: Exported generic functions
sample-position: Exported generic functions
sample-position: Exported generic functions
samples: Exported generic functions
samples: Exported generic functions
seek: Exported generic functions
seek: Exported generic functions
seek-to-sample: Exported generic functions
seek-to-sample: Exported generic functions
segment: Exported generic functions
segment: Exported generic functions
segment-map: Internal generic functions
segment-map: Internal generic functions
segment-sequence: Internal generic functions
segment-sequence: Internal generic functions
sever: Exported generic functions
sever: Exported generic functions
source-type: Exported functions
sources: Exported generic functions
sources: Exported generic functions
start: Exported generic functions
start: Exported generic functions
start-volume: Internal generic functions
start-volume: Internal generic functions
started-p: Exported generic functions
started-p: Exported generic functions
stop: Exported generic functions
stop: Exported generic functions
stop: Exported generic functions

T
target-volume: Internal generic functions
target-volume: Internal generic functions
thread: Internal generic functions
thread: Internal generic functions

U
unpack-mix-function: Exported generic functions
unpack-mix-function: Exported generic functions

W
with-body-in-mixing-context: Exported macros

Jump to:   (  
A   B   C   D   E   F   G   I   L   M   N   P   R   S   T   U   W  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   *  
B   C   D   E   F   L   N   P   R   S   T   U  
Index Entry  Section

*
*filetype-source-map*: Internal special variables
*in-processing-thread*: Internal special variables

B
buffers: Exported classes
buffers: Exported classes
buffers: Exported classes
buffers: Exported classes
buffersize: Exported classes

C
context: Exported classes

D
device: Exported classes

E
easing-function: Exported classes
ended-p: Exported classes
evaluation-lock: Exported classes
evaluation-queue-head: Exported classes
evaluation-queue-tail: Exported classes

F
fade-count: Exported classes
fade-end: Exported classes
file: Exported classes

L
looping-p: Exported classes

N
name: Exported classes
nodes: Exported classes

P
pack-mix-function: Exported classes
packed-audio: Exported classes
packed-audio: Exported classes
paused-p: Exported classes

R
remix-factor: Exported classes
remix-factor: Exported classes

S
sample-position: Exported classes
sample-position: Exported classes
samplerate: Exported classes
samples: Exported classes
segment-map: Exported classes
segment-sequence: Exported classes
Slot, buffers: Exported classes
Slot, buffers: Exported classes
Slot, buffers: Exported classes
Slot, buffers: Exported classes
Slot, buffersize: Exported classes
Slot, context: Exported classes
Slot, device: Exported classes
Slot, easing-function: Exported classes
Slot, ended-p: Exported classes
Slot, evaluation-lock: Exported classes
Slot, evaluation-queue-head: Exported classes
Slot, evaluation-queue-tail: Exported classes
Slot, fade-count: Exported classes
Slot, fade-end: Exported classes
Slot, file: Exported classes
Slot, looping-p: Exported classes
Slot, name: Exported classes
Slot, nodes: Exported classes
Slot, pack-mix-function: Exported classes
Slot, packed-audio: Exported classes
Slot, packed-audio: Exported classes
Slot, paused-p: Exported classes
Slot, remix-factor: Exported classes
Slot, remix-factor: Exported classes
Slot, sample-position: Exported classes
Slot, sample-position: Exported classes
Slot, samplerate: Exported classes
Slot, samples: Exported classes
Slot, segment-map: Exported classes
Slot, segment-sequence: Exported classes
Slot, start-volume: Exported classes
Slot, target-volume: Exported classes
Slot, thread: Exported classes
Slot, unpack-mix-function: Exported classes
Special Variable, *filetype-source-map*: Internal special variables
Special Variable, *in-processing-thread*: Internal special variables
start-volume: Exported classes

T
target-volume: Exported classes
thread: Exported classes

U
unpack-mix-function: Exported classes

Jump to:   *  
B   C   D   E   F   L   N   P   R   S   T   U  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   B   C   D   F   H   I   M   N   O   P   S   U  
Index Entry  Section

B
basic-mixer: Exported classes
buffer-drain: Exported classes
buffer-source: Exported classes

C
Class, basic-mixer: Exported classes
Class, buffer-drain: Exported classes
Class, buffer-source: Exported classes
Class, drain: Exported classes
Class, fadable: Exported classes
Class, file-source: Exported classes
Class, in-port: Exported classes
Class, in-ports: Exported classes
Class, mixer: Exported classes
Class, mixing-context: Exported classes
Class, node: Exported classes
Class, out-port: Exported classes
Class, pack-drain: Exported classes
Class, pipeline: Exported classes
Class, segment: Exported classes
Class, server: Exported classes
Class, source: Exported classes
Class, space-mixer: Exported classes
Class, unpack-source: Exported classes

D
drain: Exported classes

F
fadable: Exported classes
file-source: Exported classes

H
harmony: The harmony system
harmony: The harmony package

I
in-port: Exported classes
in-ports: Exported classes

M
mixer: Exported classes
mixing-context: Exported classes

N
node: Exported classes

O
out-port: Exported classes

P
pack-drain: Exported classes
Package, harmony: The harmony package
pipeline: Exported classes

S
segment: Exported classes
server: Exported classes
source: Exported classes
space-mixer: Exported classes
System, harmony: The harmony system

U
unpack-source: Exported classes

Jump to:   B   C   D   F   H   I   M   N   O   P   S   U