Contents



File Navigation Modules

Next

These modules provide a way to add custom file navigation and selection features to your GUI. For example, you can display the .wav files in a directory, and play a preview when the user clicks the file name. (See the included demo file WavefileAuditioner2.se1 for an example.) You can lock the user into one or more pre-selected directories by using DH_FileList with specific directory names, or allow the user to navigate throughout the file system by using DH_FileList2.

Inputs & Outputs:
DH_FileList creates a selection list of the files in a specified directory.

The Selection pin can be connected to any list selection sub-control.

The Directory pin is used to specify the directory, and could be connected to a text input such as a DH_TextIO for a single directory, or to the output of a DH_TextArray, or DH_TextSwitch1toMany to permit choice from a fixed set of directories.

Notes about the Directory pin:
1. If you use a DH_TextIO to specify the directory, either type the directory path in before you connect the DH_TextIO to the Directory pin, or paste in the entire directory path at once. If you try to type a directory into a DH_TextIO while it is connected to the Directory pin, DH_FileList will fight you, because it is programmed to default to the module's directory if the input on the Directory pin is not a valid directory.

2. If you use a DH_TextSwitch1toMany to switch between inputs to the Directory pin, be sure to set Right to Left to TRUE.

The File Extension pin can be used to display only files with a specific extension, such as wav.

The Scroll pin provides a way to view the entire contents of directories that contain too many files to be displayed in a list at one time. A value of 0 starts the list at the beginning of the directory, and increasing values cause the list to start at a corresponding offset from the beginning, i.e., a value of 50 will produce a list that begins with the 50th file (provided, of course, that the directory contains at least 50 files).

The Path\Filename pins (left and right) output the full path to the selected file.

The Index pin outputs the relative position of the selected file in the list.

The Scroll Max pin can be connected to the Max Value pin of a knob or other control to scale the control's range to the number of files automatically.

Parameters: (right-click Properties)
Hide File Ext - Suppresses the file extensions in the Selection pin's list of files.

 

DH_FileList2 works in a similar way to DH_FileList, but includes directories and drive letters as well as file names in its selection list. Clicking on a file name selects the file, while clicking on a sub-directory or a drive letter repopulates the selection list with the contents of the selected directory or the selected drive's root directory. The selected directory is output at the left and right Directory pins. Directories can be recognized in the list because they always end with a backslash (\). Double dots (..\) can be used to navigate up to the current directory's parent directory.

 

Note: DH_Sub-ControlPak3 formerly included a module named DH_FolderBrowser that was intended to add file system navigation capability when used together with DH_FileList. It turned out that interaction between the two modules interfered with the ability to save both the directory and the selected file with a patch. Therefore, DH_FolderBrowser has been superceded by DH_FileList2, which provides a better solution by handling the directory navigation and file selection in a single module.

top

Next