DH_Queue
Provides memory storage and retrieval of numeric values
organized as a dynamic
queue, in which values are added to the back end
and removed from the front on a first in - first out
(FIFO) basis. The length of the queue varies as values are inserted and
removed. Values can optionally be saved to a text file when the
module closes, and loaded from a text file when the module opens, to provide
persistent storage, or to pre-load the queue with a predefined set of
values.
Inputs:
 Input
- Value to be stored
Insert - Writes the Input value to the back end
of the queue.
Remove - Deletes the value at the front of the
queue.
Download
File Name - Should be used to give the module's
data file a unique name if a file is used. Clear
- Resets all slots to 0 and deletes the saved file if any. I suggest connecting a Voltage to List to it,
and applying a pulse from a momentary contact button
or other source to the Voltage to List's input to
clear the memory.
Outputs:
Output - Provides the value currently at the front
of the queue. Parameters:
(right-click Properties)
Max Queue Size - Sets the upper limit on
queue length. The actual length of the queue
varies dynamically as values are inserted and
removed.
Use File? - Selects whether or not values will be saved to
and loaded from a text file.
Text
File Format:
The module's memory can be preloaded by providing a text file with
the desired numeric values, separated by spaces, tabs, commas, or
new lines. The values are read in from left to right, top to bottom, just
as you would read English language text.
Saving as VST:
If you want the queue to be preloaded from a text file when your VST is
opened, do the following:
Put the file in your SynthEdit folder.
Use just the filename, without a path,
in the module's File Name field.
When you save as VST, go to the
Embedded Files tab, and Add the file.
The file will then be unloaded into the
directory that the VST creates for its .sep/.sem modules, and DH_Queue will
find it there.
Also see:
DH_Array,
DH_Queue2, and
DH_Stack for other memory configurations.
Version History:
2.3 - September 3, 2005 - Added "Use File?" parameter to make use of
file optional, updated to SDK2.
2.2 - February 5, 2004 - File save/load routines rewritten to save
data as plain text, and to increase the
reliability of choosing the plugin's
folder as the default directory.
2.1 - December 1, 2003 - Removed automatic tagging of filenames based
on order of module creation.
2.0 - November 26, 2003 - Added disk read/write capability to provide
persistent memory. Added Clear pin.
1.0 - August 27, 2003 - Initial public release
DH_Queue © 2003-2005 David Haupt. All rights reserved. Use of this module is subject
to the disclaimer and license agreement
that is included as part of the Help file. SE_Enabler
Modules and DH_BasicModulePak are trademarks of David Haupt.
SynthEdit
copyright © 2000-2004 Jeff McClintock. |