Array Modules

ARoStep ARwStep ARoRanAd ARwRanAdr AChgWrite

AMultiTap AMultiRW AMultiRW AMultiRo VirtArray

ArySnap AryCopy AryTable

Array TmpArray AryPopUp

Sequencer/Array Property Dialog


Sequencer and array modules are very similar. Their function is to access and sequence values stored in a memory array. Array modules use global memory arrays, and therefore an array module can share its sequence data with any number of other array modules. Sequencer modules have their arrays stored with the module, so their sequence data is private to the module.

Most ArtWonk sequencer and array modules are nearly identical. The main difference between them is that Array modules have an additional input, which specifies the array number handle (Ary#). Array modules have the same names as the corresponding Sequencer modules, but the name starts with "A," as in the "RoStep" sequencer module and the "ARoStep" array module.

Memory arrays used by sequencer and array modules may be of any practical size. The default size is 128 elements, numbered 0-127. Use the Properties pop up button on the upper right of the module to change the sequence size and to initialize it with various fills such as counts, scales, or random values.

Most uses you put arrays to will be one of two categories:

1. The array contents needs to be saved with the patch, similarly to sequencer modules. For this you should use the Array module to return a valid array number that does not conflict with existing arrays. You can use the Properties pop up to set up initial array values, just as with the sequence modules.

2. The memory is discarded when the patch is saved, and reinitialized to zeros when the patch is loaded. Here, you should use the TmpArray module to return a valid array number, and to initialize the array to the size you specify.

Arrays are identified by an array number handle (the Ary#), which may be from 100 to 999, for a total of 900 possible arrays. You should never give arbitrary array numbers; instead always use an Ary# handle as returned by modules that generate array numbers such as Array and TmpArray, described above, or by the NewArray() function in the Function module.

The Ary# identifier is a handle, not an absolute pointer to an array. It may and probably will change when a patch or macro containing it is saved and loaded again, so you should never give them hard coded Ary# values. Always instead use one of the array manager modules (Array, TmpArray), or other modules that return an Ary# to insure that the arrays used by the array sequencer modules do not conflict with previously assigned arrays.

The first 100 arrays, numbered 0-99 are not used by the array manager and should not be used by modules or functions. They are available for compatibility with earlier versions of the software, but may be removed in a future version.


ARwStep

This is the standard step sequencer module that increments or decrements to the next step on each strobe input.

Outputs:

Out: value at the current step (read address)

Addr: The current step address. This is incremented or decremented by the Strobe input; the address increments from 0 to the Limit value, then rolls over to 0 again. If reverse, it decrements from the Limit value to 0.

Inputs:

Strb: Strobe (0 to NZ transition) to step to the next address.

Limit: Sets the upper (roll over) limit of the count, the point at which it rolls over back to 0. This should be a value less than the allocated memory size.

Rev: Reverse direction of count. Set to non zero to decrement, 0 to increment.

Reset: Resets the current step address to the value set by Addr, below.

Addr: Dual purpose input. Sets the reset address and sets the write address when writing values to the sequence.

WVal: Value to write into the sequencer memory array upon receipt of WStrb.

WStrb: 0 to NZ transition writes WVal input to address given by Addr input (not to current step address)

Ary#: Connect with the Ary# output handle of the source array to be used for sequencer memory.


ARoStep

A step sequencer as above, but without the capability of writing. Use the property dialog to set memory contents. Or, as arrays are globally accessible, use any other module that can write to an array.

Outputs:

Out: value at the current step (read address)

Addr: The current step address. This is incremented or decremented by the Strobe input; the address increments from 0 to the Limit value, then rolls over to 0 again. If reverse, it decrements from the Limit value to 0.

Inputs:

Strb: Strobe (0 to NZ transition) to step to the next address.

Limit: Sets the upper limit of the count, the point at which it rolls over back to 0. This should be a value less than the allocated memory size.

Rev: Reverse direction of count. Set to non zero to decrement, 0 to increment.

Reset: Resets the current step address to 0 if counting forward, or Limit if counting backward.

Ary#: Connect with the Ary# output handle of the source array to be used for sequencer memory.


ARwRanAdr

Directly addressable sequencer. Has separate address inputs for read and write, to allow read/write operations such as delay sequencing. The Addresser clock module is especially useful for addressing this sequencer.

Output:

Out: Sequencer value addressed by the Addr input.

Inputs:

Addr: Address of sequencer step to send to output.

WVal: Value to write to WAdr address.

WAdr: Write address.

WStrb: Strobe writes value input to current write address.

Ary#: Connect with the Ary# output handle of the source array to be used for sequencer memory.


ARoRanAdr

Directly addressable read only sequencers.

Output:

Out: Sequencer value addressed by the Addr input.

Inputs:

Addr: Address of sequencer step to send to output.

Ary#: Connect with the Ary# output handle of the source array to be used for sequencer memory.


AChgWrite

Directly addressable sequencer. Has separate address inputs for read and write, to allow read/write operations such as delay sequencing. This is similar to the ARwRanAdr sequencer, but it writes on change at the Chng input, rather than strobe. The XWrit (Exclusive Write) feature is useful for setting LED position flags on sequencer interface widgets.

Output:

Out: Sequencer value addressed by the Addr input.

Inputs:

Addr: Address of sequencer step to send to output.

WVal: Value to write to WAdr address.

WAdr: Write address.

WChg: Strobe writes value input to current write address.

XWrit: (Exclusive Write), erases the previous value while writing the current value.

Ary#: Connect with the Ary# output handle of the source array to be used for sequencer memory.


AMultiTap

Directly addressable read only sequencer with adjustable multiple address and output pairs. Set the number of input/output pairs with the Tap control in the Properties dialog.

Outputs:

Outn: Sequencer value addressed by the corresponding Addr input.

Inputs:

Addrn: Address of sequencer step to send to output corresponding.

Ary#: Connect with the Ary# output handle of the source array to be used for sequencer memory.


AMultiRW

Directly addressable read/write array sequencer with individual input and output pairs for each stage. Set the number of input/output pairs with the Tap control in the Properties dialog.

Outputs:

Outn: Value at the nth stage, which will be the array value addressed by Ofst + n.

Inputs:

In n: Value to write to the nth stage, which is the array value addressed by Ofst + n. Only writes when the value changes, or when the Load flag triggers, as when the module is loaded from a patch or macro.

Ofst: Offset into the array to start reading and writing the stage steps. By using the offset you can set up multiple sequencers on a single array, or group several sequencers to create a sequencer macro with a larger number of steps than available in a single module (such as a 128 slider sequencer).

Ary#: Connect with the Ary# output handle of the source array to be used for sequencer memory.


AMultiRo

Directly addressable read only array sequencer with individual output for each stage (up to 106). Set the number of outputs with the Tap control in the Properties dialog.

Outputs:

Outn: Value at the nth stage, which will be the array value addressed by Ofst + n.

Inputs:

Ofst: Offset into the array to start reading and writing the stage steps. By using the offset you can set up multiple sequencers on a single array, or group several sequencers to create a sequencer macro with a larger number of steps than available in a single module.

Ary#: Connect with the Ary# output handle of the source array to be used for sequencer memory.


VirtArray

Virtual read only sequence made from multiple arrays. Stitches any number individual arrays into a single virtual array. Individual arrays can be swapped in and out in real time, so segments of the virtual array can be changed while playing. To change the number of individual source arrays, use the More and Fewer buttons in the Properties pop up.

Outputs:

Out: Value at array virtual address input, Addr.

Max: Max address of combined, virtual array.

Inputs:

Addr: Addr of virtual sequence for output. Range is from 0 to value of Max output.

Ary# n : Ary# of arrays to read as single virtual array. Any number (up to 106) of individual arrays can be used. Arrays are stiched together in order, top to bottom.


ArySnap

Creates a Snapshot table of an array's elements, and automatically processes Snaps for it.  Works for all arrays, including array based widgets such as ASliders and LedGrid.

Arrays and array based widgets are not normally processed by Snapshot because snapshots need to store 128 copies of the value to be saved and restored; since arrays can be any size, automatically saving 128 copies of them would quickly use up the computer's memory resources.

With this module you can connect just the arrays you need to have saved and restored via the Snapshot.  It is a set and forget module; once connected the Snapshot processing is automatic.

Output:

Size: Number of elements in target array, 0 if error.

Input:

Ary#: Target array to Snapshot; 0 to disable.


AryCopy

Copies values from one array to another, or to non overlapping areas in the same array.

Output:

Num: Number of elements actually copied.

Inputs:

Src#: Source Ary# to copy from.

sAdr: Source element address to start copying from.

Dst#: Destination Ary# to copy to.

dAdr: Destination element address to start copying to.

Num: Number of array elements to copy.

Chg: Any change to do the copy.


AryTable - Saves and Switches Multiple Array Sets

Creates a super array composed of multiple sets of the target array. You can quickly switch from one array set to another, such as to change among several pitch maps or several ASliders. Any changes made to the target array are automatically preserved when the Set input is changed, and the target array is instantly updated to the new set. Works with all ArtWonk arrays, including matrix widget arrays.

Note that the AryTable module itself is not an array sequencer; it does not use an array to store its values, rather they are stored within the module, like a Sequencer module.  Although the AryTable module is not used directly as a sequencer, you can access its sequence data with the Properties button, same as a normal sequencer module. This is especially useful for saving, copying and pasting, and for quickly initializing all tables to a value or scale at once.

Use caution with this module because the entire set of arrays will be saved with the patch or macro. This will be the size of the array times the number of sets. For example, if the array is 128 elements, and the number of sets in the AryTable is 128, then the memory used by the module's storage array is 128 x 128 = 16384 elements, at 8 bytes per element for a total of 131,072 bytes. This is not a problem with the megabyte memory most computers have today, and the patch files are compressed so your saved files will not take up nearly that amount of space. But it is a good reason to avoid making the set size larger than you need.

Output:

Status: 1=OK, 0=Stopped. Stops when the target array (Ary# input) or number of sets (#Sets input) is changed, or when the target array itself is resized. To start again, change either of these inputs. When restarting, the target array will be copied into all the tables anew.

Inputs:

Set#: The array set within the AryTable you want to be active. This set will be sent to the target array whenever it changes, and the contents of the current set will be preserved. This value is 1-based, so if you want the 4th set, us the number 4. Set this value to 0 to restore the target array to its previous value, discarding any changes since the last set change; set to -1 to discard changes but not change the target array until it gets the next valid set number.

#Sets: The number of array sets from the target array you want in the AryTable. Changing this value causes the array table to reload.

Ary#: The target array you want to use for the array table. This array is copied into the AryTable module, for the number of Sets specified. Changing this value causes the array table to reload with the new target array; however array 0 is a special case that does not load. So you can restart a stopped table by changing to 0 then back to its original value.


Array - Array Save/Restore & Management

On creation this module fetches the next available array handle and initializes it to the default size of 128 elements, and sets them all to 0. When the patch or macro is saved, the module preserves the array with the patch.  On loading from either a patch or a macro it restores previously saved array contents.

The Properties button is active on this module, acting just as the Properties button of an array sequencer module. This is handy when creating a patch, as you can create the Array module to get an array handle, and right away you can enter its properties and initialize and fill the array.

Outputs:

Ary#: Array number to use as the Ary# input to array sequencer modules. The specific number returned should be treated as a handle. It is subject to changing when the patch is loaded or when a macro is loaded, but the number will be unique and the patch will work as long as array modules obtain it by connecting with the module, and are not manually typed in.

Max: The allocated Max memory address (which is the array size -1, as 127 for a 128 element array).


TempArray - Array Initialization & Management

Fetches the next available array handle and initializes the array to the size requested. The output of this module can be used for the Ary# input of any module that works on arrays, same as with the Array module.  The difference is TmpArray, as its name implies, does not save its contents.  The module updates when a patch or macro file is first loaded, or when the Max input is changed. When initialized upon creation or when loaded, all values are set to 0. When resizing by changing the Max input, previous contents are preserved.

TmpArray takes only one parameter, the maximum address you want the array initialized to. Use this module when you do not want to save the array contents, as for example when using an array for a delay line.

Outputs:

Ary#: Array number to use as the Ary# input to array sequencer modules. The specific number returned should be treated as a handle. It is subject to changing when the patch is loaded or when a macro is loaded, but the number will be unique and the patch will work as long as array modules obtain it by connecting with the module, and are not manually typed in.

Max: The allocated Max memory address (which is the array size -1, as 127 for a 128 element array).

Inputs:

Max: The maximum address you intend to access. Whenever this value is changed, the array is resized.


AryPopUp - Access Property Fill Pop Up

While most array modules can directly access the property fill pop up for initializing array memory, a few modules - the widget modules that use arrays, for example - do not. With this module, you can also directly access the array fill popup. Simply plug the array number (Ary# output) into the Ary# input, and click on the Properties button.

Input:

Ary#: Connect this input to the Ary# output of the module for which you want to access the array fill properties pop up..


Sequencer/Array Property Dialog

Sequencers and Arrays have a Property button, the blue priority label (A., B, C...) in the upper right corner of the module. Click it to pop up the priority dialog.

The main purpose of the sequencer property dialog is to initialize sequencer arrays. You can change the size of an array here, and you can initialize it with various numerical patterns.

The top area of the dialog is a graphical trace of the sequencer values. If it is a new sequencer this area will be blank, as new sequences are initialized to 0 when first created.

You can draw values directly into the array by left click and drag in the graphics area; to freeze the index value so the mouse acts as a slider, right click and drag in the graphics area.

Initializing Sequencer/Array memory

To change the memory size, type in the Max Adr value you want, and click on the "Update the Fill" button. You can choose to initialize memory to specific values or runs of values by selecting the "Fill With" option prior to selecting "Update the Fill" or you can do it anytime later. Just remember to click the update button to make the selection happen. You will see the results of the update in the top graphical display.

At any time, you can also perform several memory options, such as reversing the order, or sorting the values. Just click the appropriate buttons and the results will show up in the graphics display. Each button has a tool tip that specifies what it does and what parameters need to be set, if any.

Sliders

The Sliders button pops up a set of 24 sliders that can access up to the first 128 sequencer values, with an integer range of 0-127. Use the sliders for easy, accurate data entry for typical MIDI range values.

Importing and exporting sequences

You can move sequences around among sequencer and array modules, and import numerical data from other sources.

To move a sequence from one module to another, use the Copy and Paste buttons. Copy stores the current sequence into a sequencer clipboard; Paste copies from the clipboard to the current sequencer. To exactly paste a sequence, which may involve resizing the current sequence to match the sequence that had been pasted to the clipboard, use Paste Resize; to paste only the amount of data that fits into the current sequencer, without resizing the current sequencer, use Paste (you don't need to memorize this, the tool tips on the buttons describe their functions).

The array Copy/Paste clipboard is also used by the PitchMap module, so in addition to moving sequences among sequencer and array modules, you can use Copy and Paste to move them into and out of PitchMap modules.

To import data from other source use the Import button, which pops up a file open dialog. Prior to opening the file for import, specify the numerical format of the data source from the option buttons. Only numerical data is supported, however if you need to import text or data base data, you can first convert it to a numerical format with the DataBin dialog available from the ArtWonk main menu.

You can also save and load ArtWonk array (.awa) files with the Save and Load buttons. The .awa format is compatible with both sequencer and array files and with the array functions in the Function module.

 

ArtWonk is Copyright © 2003-2014 by John Dunn and Algorithmic Arts. All Rights Reserved.