-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
documentation.lisp
1442 lines (1066 loc) · 36.1 KB
/
documentation.lisp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
(in-package #:org.shirakumo.fraf.mixed.cffi)
;; low-level.lisp
(docs:define-docs
(variable *here*
"Variable containing the path to the low-level.lisp file.")
(variable *static*
"Variable containing the path to the static directory.
That directory contains the precompiled library binaries.")
(function samplesize
"Return the number of bytes required to represent a sample in the given format.
Acceptable values are
:INT8 :UINT8 :INT16 :UINT16 :INT24 :UINT24 :INT32 :UINT32
:FLOAT :DOUBLE"))
(in-package #:org.shirakumo.fraf.mixed)
;; bip-buffer.lisp
(docs:define-docs
(type bip-buffer
"Base class for all buffer types.
Implements an interface to allow for asynchronous read/write to the
buffer.
See DATA
See AVAILABLE-READ
See AVAILABLE-WRITE
See REQUEST-WRITE
See FINISH-WRITE
See REQUEST-READ
See FINISH-READ
See DATA-PTR
See WITH-BUFFER-TX
See WITH-BUFFER-TRANSFER")
(function available-read
"Returns the number of elements available for reading in the buffer.
See BIP-BUFFER
See BUFFER
See PACK")
(function available-write
"Returns the number of elements that can be written to the buffer.
See BIP-BUFFER
See BUFFER
See PACK")
(function request-write
"Prepares a writing operation on the buffer.
Returns two values:
START -- The number of elements after which the write may begin.
SIZE -- The number of elements that may be written.
After calling this, you **must** call FINISH-WRITE before calling
REQUEST-WRITE again.
See FINISH-WRITE
See BIP-BUFFER
See BUFFER
See PACK")
(function finish-write
"Finishes a writing transaction.
You must not call this function without a matching REQUEST-WRITE call
first. The SIZE should be the number of written elements, which may be
less than the number obtained from REQUEST-WRITE, but not more.
See REQUEST-WRITE
See BIP-BUFFER
See BUFFER
See PACK")
(function request-read
"Prepares a reading operation on the buffer.
Returns two values:
START -- The number of elements after which the read may begin.
SIZE -- The number of elements that may be read.
After calling this, you **must** call FINISH-READ before calling
REQUEST-WRITE again.
See FINISH-READ
See BIP-BUFFER
See BUFFER
See PACK")
(function finish-read
"Finishes a reading transaction.
You must not call this function without a matching REQUEST-READ call
first. The SIZE should be the number of read elements, which may be
less than the number obtained from REQUEST-READ, but not more.
See REQUEST-READ
See BIP-BUFFER
See BUFFER
See PACK")
(function data-ptr
"Returns a foreign pointer to the underlying storage of the data array.
See BIP-BUFFER
See BUFFER
See PACK")
(function with-buffer-tx
"Convenience macro to handle a buffer transaction.
DATA is bound to the storage array of the buffer.
START is bound to the starting index of the transaction.
SIZE is bound to the number of elements that may be operated on during
the transaction.
BUFFER should be a BIP-BUFFER instance.
DIRECTION can be either :INPUT or :OUTPUT depending on the type of
transaction desired.
INITIAL-SIZE should be the amount of space to request.
During BODY, two functions are available:
FINISH --- Completes the transaction, using the passed number of
elements. Note that this does not cause an unwind.
DATA-PTR --- Returns a foreign pointer to the start of the
transaction's valid memory.
This macro ensures that on unwind for any reason, whether after FINISH
or before, the buffer is left in a sealed state where it is safe to
call REQUEST-READ and REQUEST-WRITE again.
See BIP-BUFFER
See BUFFER
See PACK
See WITH-BUFFER-TRANSFER")
(function with-buffer-transfer
"Convenience macro to handle a transfer from one buffer to another.
Both FROM and TO may be the same buffer, in which case the transfer
happens from the region available to read to itself.
Otherwise, this is akin to nesting WITH-BUFFER-TX, with the special
exemption that FINISH will complete the transaction on both buffers at
once.
See BIP-BUFFER
See BUFFER
See PACK
See WITH-BUFFER-TRANSFER"))
;; buffer.lisp
(docs:define-docs
(type buffer
"Buffers encapsulate raw audio data between segments.
A buffer stores a C-array of floats. This array represents
a sample buffer for a single audio channel. The data is not
encoded in any way and consists solely of single-floats.
Upon construction the foreign array of floats is automatically
allocated based on the given size.
See C-OBJECT
See DATA
See SIZE
See CLEAR")
(function make-buffer
"Create a new buffer.
You may pass either an integer denoting the length of the
buffer in samples, or a vector of single-floats denoting the
buffers' initial contents.
See BUFFER")
(function data
"Accessor to the raw data array contained in the object.
See BUFFER
See PACK")
(function size
"Accessor to the size of the data contained in the object.
For packed-audio this number is in bytes.
For buffers this number is in floats.
When the size is set on a buffer, the buffer's data array is
resized to fit the requested size.
See BUFFER
See PACK
See SEGMENT-SEQUENCE")
(function clear
"Clears the buffer to fill its data array with just zeroes.
See BUFFER")
(function with-buffers
"Create a number of buffers for the duration of the body.
BUFFERS should be a list of symbols, to each of which a
fresh instance of a BUFFER with a size of SAMPLES will
be bound.")
(function forward-fft
"Perform a forward FFT on the samples in IN and store the frequency data in OUT.
FRAMESIZE must be a power of two in [2^1, 2^13] and the
buffers must be sized accordingly.
See BUFFER
See INVERSE-FFT")
(function inverse-fft
"Perform an inverse FFT on the frequency data in IN and store the samples in OUT.
FRAMESIZE must be a power of two in [2^1, 2^13] and the
buffers must be sized accordingly.
See BUFFER
See FORWARD-FFT"))
;; c-object.lisp
(docs:define-docs
(variable *c-object-table*
"A weak value table associating pointer addresses to corresponding objects.
This table keeps track of which foreign data is tracked
by which lisp instance.
See POINTER->OBJECT
See C-OBJECT")
(function init
"Loads the shared libraries to make libmixed work.
You must call this before calling any other functions.
It is safe to call this multiple times.")
(function handle
"Accessor to the pointer to the foreign data that this object tracks.
See CFFI:FOREIGN-POINTER
See C-OBJECT")
(type c-object
"Superclass for all objects that track foreign resources.
If no handle is given to the object upon creation, the proper
corresponding foreign data is automatically allocated. The
pointer to this data is then associated with the instance to
allow resolving the pointer to the original Lisp object.
Finalisation of the foreign data upon garbage collection of
the Lisp object is also handled.
The actual foreign allocation and cleanup of the data is
handled by ALLOCATE-HANDLE and FREE-HANDLE respectively. The
subclass in question is responsible for implementing
appropriate methods for them.
See HANDLE
See ALLOCATE-HANDLE
See FREE-HANDLE
See FREE
See POINTER->OBJECT")
(function allocate-handle
"Allocate space for the foreign resource of this object.
See C-OBJECT")
(function free-handle
"Return a function that cleans up the given handle and frees its foreign resources.
Instead of calling this function directly yourself, you should
use FREE.
See FREE
See C-OBJECT")
(function free
"Free the foreign data associated with this object.
This makes sure that the data is properly cleaned up and that
the object can't accidentally be double-freed or accessed in
any way after the free.
See C-OBJECT")
(function pointer->object
"Accessor to the object associated with the given foreign pointer.
See *C-OBJECT-TABLE*"))
;; mixer.lisp
(docs:define-docs
(type mixer
"Superclass for segments that mix a variable number of sources together.
See SEGMENT
See ADD
See WITHDRAW
See SOURCES
See SOURCE")
(function sources
"Accessor to the hash table mapping input locations to segments.
This map holds which locations have segments attached.
You should use the INPUT-FIELD or SOURCE accessors to
actually attach or detach source segments.
See MIXER
See SOURCE
See INPUT-FIELD")
(function source
"Accessor to the source segment attached to an input buffer or location.
Some mixers support attaching a source
segment to an input buffer. The effect being that the
segment is mixed before the corresponding buffer is
used, allowing for dynamic addition and removal of
segments without the need to alter the pipeline.
See MIXER
See SOURCES"))
;; pack.lisp
(docs:define-docs
(type pack
"A pack represents an interface to an outside sound source or drain.
The object holds all the necessary information to describe
the audio data present in a raw byte buffer. This includes
how many channels there are, how the samples are laid out
and how the samples are formatted in memory. It also includes
the samplerate of the channel's source so that it can be
converted if necessary.
Note that a pack only supports interleaved channel data. If the data
is sequential in memory, it must be handled by multiple packs.
See MAKE-PACK
See SOURCE
See DRAIN
See C-OBJECT
See DATA
See SIZE
See ENCODING
See CHANNELS
See SAMPLERATE
See FRAMESIZE
See TRANSFER")
(function make-pack
"Create a new pack object.
See PACK")
(function encoding
"Accessor to the sample encoding of the raw data buffer in the object.
The encoding has to be one of the following:
:INT8 :UINT8 :INT16 :UINT16 :INT24 :UINT24 :INT32 :UINT32
:FLOAT :DOUBLE
See PACK")
(function channels
"Accessor to the number of channels encoded in the data buffer in the object.
See PACK")
(function samplerate
"Accessor to the samplerate at which the samples are expected to be.
The sample rate is in Hz.
See PACK
See DELAY
See FADER
See BIQUAD-FILTER
See PITCH
See REPEAT
See SPACE-MIXER"))
;; segment-sequence.lisp
(docs:define-docs
(type segment-sequence
"A segment-sequence represents a mixing pipeline.
The sequence takes care of remembering the order in which
segments should be processed and running them in that
order when mixing is done.
See MAKE-SEGMENT-SEQUENCE
See C-OBJECT
See SEGMENTS
See ADD
See WITHDRAW
See START
See MIX
See END")
(function segments
"Accessor to a vector of segments the sequence contains.
This vector will become out of date if the sequence's
segments are added or removed from the C side
directly, or directly through this vector. Thus you
should never modify this directly and instead always
make sure to go through ADD/WITHDRAW.
See SEGMENT-SEQUENCE
See ADD
See WITHDRAW")
(function make-segment-sequence
"Create a new segment-sequence instance.
The segments given are added in order.
See SEGMENT-SEQUENCE")
(function add
"Add the object to the given collection.
For segment-sequences this means adding a segment to
the sequence. For mixers this means adding another
input buffer.
See SEGMENT-SEQUENCE
See MIXER")
(function withdraw
"Remove the object from the given collection.
For segment-sequences this means removing the segment
from the sequence. For mixers this means removing
the given input buffer.
See SEGMENT-SEQUENCE
See MIXER")
(function start
"Start the mixing process.
This method should be called as close as possible
to the next calls to MIX. Calling MIX before
START is called or after END is called is an error.
After START has been called, changing some segments'
fields may result in undefined behaviour and might
even lead to crashes.
See SEGMENT-SEQUENCE
See SEGMENT
See END
See MIX")
(function mix
"Perform the actual mixing.
This processes the given number of samples through
the pipeline. It is your job to make sure that
sources provide enough fresh samples and drains
will consume enough samples. Calling MIX with more
samples specified than any one buffer connected to
the segments in the sequence can hold is an error and
may crash your system. No checks for this problem
are done.
Calling MIX before START has been called or after
END has been called is an error and may result in
crashes. No checks for this problem are done.
If you want to ensure that the sequence is complete
and able to process the requested number of samples,
you should call CHECK-COMPLETE after running START.
When adding methods to MIX for virtual segments, you
should make sure to return true, unless your segment
has somehow ended and exhausted the samples it wants
to process, in which case you should return NIL.
See SEGMENT-SEQUENCE
See SEGMENT
See START
See END")
(function end
"End the mixing process.
This method should be called as close as possible
after all desired calls to MIX are done. Calling
MIX after END is called is an error. Some segments
may require END to be called before their fields
can be set freely. Thus mixing might need to be
'paused' to change settings.
See SEGMENT-SEQUENCE
See SEGMENT
See START
See MIX"))
;; segment.lisp
(docs:define-docs
(function decode-flags
"Decode an OR combined integer of INFO-FLAGS to a list of keywords for the flags.
See MIXED:INFO-FLAGS")
(function encode-flags
"Encode the list of keywords for the INFO-FLAGS to a an OR combined integer.
See MIXED:INFO-FLAGS")
(function decode-field-info
"Decode the field info contained in the pointer to a segment-info struct.
See MIXED:SEGMENT-INFO
See MIXED:FIELD-INFO")
(function encode-field-info
"Encode the field info into the segment-info struct pointed to by the pointer.
See MIXED:SEGMENT-INFO
See MIXED:FIELD-INFO")
(type segment
"Superclass for all mixing pipeline segments.
A segment is responsible for producing, consuming,
combining, splitting, or just in general somehow
processing audio data within a pipeline.
A segment is connected to several buffers at its
inputs and outputs. Each input, output, and the segment
itself may have a number of fields that can be accessed
to change the properties of the segment's behaviour.
Some of these properties may not be changed in real
time and instead might require a ending the mixing
first.
See C-OBJECT
See INPUTS
See OUTPUTS
See INFO
See START
See MIX
See END
See INPUT-FIELD
See OUTPUT-FIELD
See FIELD
See INPUT
See OUTPUT
See CONNECT")
(function inputs
"Accessor to the vector of input buffers connected to the segment.
This vector will become out of date if the segment's
buffers are added or removed from the C side directly,
or directly through this vector. Thus you should never
modify this directly and instead always
make sure to go through INPUT.
See SEGMENT
See INPUT")
(function outputs
"Accessor to the vector of output buffers connected to the segment.
This vector will become out of date if the segment's
buffers are added or removed from the C side directly,
or directly through this vector. Thus you should never
modify this directly and instead always
make sure to go through OUTPUT
See SEGMENT
See OUTPUT")
(function direct-info
"Direct accessor to the info slot on the segment.
See SEGMENT
See INFO")
(function info
"Fetch metadata information about the segment.
Returns a plist with the following entries:
:NAME --- A string denoting the name of the
type of segment this is.
:DESCRIPTION --- A string denoting a human-readable
description of the segment.
:FLAGS --- A list of flags for the segment.
Should be one of:
:INPLACE --- Output and input buffers may be
identical as processing is
in-place.
:MODIFIES-INPUT --- The data in the input buffer
is modified.
:MIN-INPUTS --- The minimal number of inputs that
needs to be connected to this
segment.
:MAX-INPUTS --- The maximal number of inputs that
may be connected to this segment.
:OUTPUTS --- The number of outputs that this
segment provides.
:FIELDS --- A list of plists describing the
possible flags. Each plist has the
following entries:
:FIELD --- The keyword or integer denoting
the field.
:DESCRIPTION --- A string for a human-readable
description of what the field
does.
:FLAGS --- A list of keywords describing the
applicability of the field. Must
be one of:
:IN --- This field is for inputs.
:OUT --- This field is for outputs.
:SEGMENT --- This field is for the segment.
:SET --- This field may be written to.
:GET --- This field may be read.
Note that this value is cached after the first
retrieval. You are thus not allowed to modify the
return value.
See SEGMENT")
(function bypass
"Accessor to whether the segment is bypassed or not.
A bypassed segment does not perform any operations when
mixed. The exact effects of this varies per segment, but
usually for a segment that transforms its inputs
somehow this will mean that it just copies the input to
the output verbatim.
Note that not all segments support bypassing. Check the
:FIELDS value in the field's info plist.
See SEGMENT
See INFO")
(function input-field
"Access the field of an input of the segment.
Which fields are supported depends on the segment in
question. Usually the :BUFFER field will be recognised
for which the value should be a BUFFER instance.
Some fields may only be read and not written to or
vice-versa.
See SEGMENT
See INPUT")
(function output-field
"Access the field of an output of the segment.
Which fields are supported depends on the segment in
question. Usually the :BUFFER field will be recognised
for which the value should be a BUFFER instance.
Some fields may only be read and not written to or
vice-versa.
See SEGMENT
See OUTPUT")
(function field
"Access the field of the segment.
Which fields are supported depends on the segment in
question.
Some fields may only be read and not written to or
vice-versa.
See SEGMENT")
(function input
"Accessor to the input buffer at the specified location of the segment.
See INPUT-FIELD
See SEGMENT")
(function output
"Accessor to the output buffer at the specified location of the segment.
See OUTPUT-FIELD
See SEGMENT")
(function connect
"Connect two segments together by connecting their respective input and output to a specific buffer.
See INPUT
See OUTPUT
See SEGMENT"))
;; toolkit.lisp
(docs:define-docs
(variable *default-samplerate*
"This variable holds the default sample rate used throughout.
This is set to 44100 for 44.1 kHz, which is
the standard sample rate for CD audio and should
thus be of sufficient quality for most purposes.")
(type mixed-error
"Condition class for errors related to the mixed library.
See ERROR-CODE")
(function error-code
"Accessor for the error code contained in the condition instance.
See MIXED:ERROR
See MIXED:ERROR-STRING")
(function with-error-on-failure
"Shorthand to handle return values of C functions.
If the last form in the body returns a zero, an
error of type MIXED-ERROR is signalled.
See MIXED-ERROR")
(function with-cleanup-on-failure
"If the body unwinds abnormally, CLEANUP is run.")
(function calloc
"Allocate a region of foreign data on the heap.
This is like CFFI:FOREIGN-ALLOC, except that the
memory region is zeroed out before the pointer to it
is returned.")
(function define-accessor
"Define a new accessor wrapper for a CFFI struct function.")
(function define-callback
"Defines a new callback that handles errors automatically.
If an error occurs within BODY, the ERROR-RETURN form
is instead evaluated and its value returned.
See CFFI:DEFCALLBACK")
(function define-std-callback
"Define a standard callback function.
Standard means that the function will return 1 on
success and 0 on abnormal exit.
See DEFINE-CALLBACK")
(function coerce-ctype
"Coerce the given value to the type and range appropriate for the given C-type.
Coercion is done for:
:FLOAT
:DOUBLE
:INT
:UINT")
(function define-field-accessor
"Define an accessor for a segment's field.
Generates the necessary methods on FIELD as well as
convenience wrapper methods.")
(function ptr->vec
"Convert a pointer to a C array of three floats to a vector.")
(function vec->ptr
"Convert the vector into a C array of three floats")
(function define-vector-field-accessor
"Define an accessor for a segment's vector value field.
Generates the necessary methods on FIELD as well as
convenience wrapper methods. The values should be
lists or vectors of three floats.")
(function define-input-vector-field-accessor
"Define an accessor for a segment's input vector value field.
Generates the necessary methods on FIELD as well as
convenience wrapper methods. The values should be
lists or vectors of three floats.")
(function define-delegated-slot-accessor
"Define an accessor that delegates its call to a slot of the instance.
Generates the necessary accessor methods to wrap
the access.")
(function vector-remove-pos
"Remove the element at the specified index in the vector.
Elements above it are shifted down and the vector's
size is adjusted.")
(function vector-insert-pos
"Set the value at the given position in the vector.
If the position is beyond the vector's length, it is
first adjusted to that length.")
(function vector-remove
"Remove the element from the vector.
Elements above it are shifted down and the vector's
size is adjusted. Only the first occurrence is
removed.
See VECTOR-REMOVE-POS")
(function removef
"Remove the given key/value pairs from the plist.
Returns a fresh list."))
;; segments/basic-mixer.lisp
(docs:define-docs
(type basic-mixer
"This segment additively mixes an arbitrary number of inputs to a single output.
Linear mixing means that all the inputs are summed
up and the resulting number is divided by the number
of inputs. This is equivalent to having all the
inputs play as \"individual speakers\" in real life.
See MIXER
See MAKE-BASIC-MIXER")
(function make-basic-mixer
"Create a new basic mixer, adding the given buffers as inputs.
See BASIC-MIXER
See ADD
See WITHDRAW"))
;; segments/delay.lisp
(docs:define-docs
(type delay
"A simple delay segment.
This just delays the input to the output by a given
number of seconds. Note that it will require an
internal buffer to hold the samples for the required
length of time, which might become expensive for very
long durations.
See SEGMENT
See MAKE-DELAY
See DURATION
See SAMPLERATE
See BYPASS")
(function make-delay
"Create a new delay segment.
See DELAY"))
;; segments/fader.lisp
(docs:define-docs
(type fader
"A volume fading segment.
This allows you to smoothly fade in and out an input.
The from and to are given in relative volume, meaning
in the range of [0.0, infinity[. The duration is given
in seconds. The fade type must be one of the following:
:LINEAR :CUBIC-IN :CUBIC-OUT :CUBIC-IN-OUT, each
referring to the respective easing function.
The time is measured from the last call to START out.
See SEGMENT
See MAKE-FADER
See FROM
See TO
See DURATION
See FADE-TYPE")
(function make-fader
"Create a new volume fader segment.
See FADER")
(function from
"Accessor to the starting volume of the fading segment.
Must be in the range of [0.0, infinity[.
See FADER")
(function to
"Accessor to the ending volume of the fading segment.
Must be in the range of [0.0, infinity[.
See FADER")
(function duration
"Accessor to the duration of the segment's effect.
Must be measured in seconds.
See FADER
See DELAY
See REPEAT")
(function fade-type
"Accessor to the type of easing function used for the fade.
Must be one of :LINEAR :CUBIC-IN :CUBIC-OUT :CUBIC-IN-OUT
See FADER"))
;; segments/biquad-filter.lisp
(docs:define-docs
(type biquad-filter
"A biquad filter for simple frequency filtering operations.
See SEGMENT
See MAKE-BIQUAD-FILTER
See FREQUENCY
See FILTER
See SAMPLERATE
See BYPASS
See Q
See GAIN")
(function make-biquad-filter
"Create a new frequency pass segment.
PASS can be either :high or :low, which will cause
high and low frequencies to pass through the filter
respectively.
See BIQUAD-FILTER")
(function frequency
"Accessor to the frequency around which the filter is tuned.
See BIQUAD-FILTER")
(function biquad-filter
"Accessor to whether the biquad-filter segment passes high or low frequencies.
Value must be either :HIGH or :LOW.
See BIQUAD-FILTER"))
;; segments/generator.lisp
(docs:define-docs
(type generator
"A primitive tone generator segment.
This segment can generate sine, square, sawtooth, and
triangle waves at a requested frequency. You can even
change the frequency and type on the fly.
See SEGMENT
See *DEFAULT-SAMPLERATE*
See WAVE-TYPE
See FREQUENCY")
(function make-generator
"Create a new tone generator.
See GENERATOR")
(function wave-type
"Accessor to the wave type the generator generates.
Must be one of :SINE :SQUARE :SAWTOOTH :TRIANGLE
See GENERATOR")
(function frequency
"Accessor to the frequency of the wave.