wcnt logo & demo sound

Introduction to groups and copying Top

This section deals with some of the most helpful aspects yet added to wcnt. Since wcnt-1.25 you can now copy individual modules or data objects, or, you can group a number of modules together and copy the group.

The copier Top

The copier data object is used to copy an individual data object (e.g. a riff) or to copy a single module. Here is an example of each:


    copier
    riffcopy1
        from riff1 to riff2
    riffcopy1

    copier
    clockcopy1
        from clock1 to clock2
    clockcopy1
    

As you can see, the copier is like any other data object in that you must name it. The name of the copy, as specified by the to parameter, must not contain a dot . (which signifies a grouped module), and must not already be in use, or, be either of the two reserved words (editlist and off). There is nothing else to it.

The copy will be identical to the original, it will have the same values set in its parameters, and if it is a module, its inputs will be connected to the same outputs as the original. You must use the riff_editor to edit a copied riff. Use the input_editor and param_editor to edit a copied module. See the file inclusion page for information on them.

Grouping Modules Top

You use the group data object to group a number of modules together. Once you have grouped the modules, their names change to begin with the name of the group followed by a dot . with the original module name after that.


    group
    g1
        modules
            synthmod name osc1
            synthmod name sine1
            synthmod name amp1
        modules
    g1
    

The name of the above group is g1, therefor, the names of the modules in the group become g1.osc1, g1.sine1, and g1.amp1 respectively.

When adding modules to the group, you must ensure that they have been defined previously in the .wc file to the group definition.

Copying groups Top

Copying grouped modules is easier and far more efficient than creating a copier for each and every module. The bigger advantage is the modules in the copied group will be connected to each other in exactly the same way as the original group. Use the copier to copy a group:


    copier
    groupcopy1
        from g1 to g2
    groupcopy1
    

The copier will copy the group g1 to g2 and then it's job is finished and it is left to the group g1 to copy the modules it contains to the new group and maintain the input/ouput structure.

From the example of a group in the section above, we will now have six modules named g1.osc1 g1.sine1 g1.amp1 g2.osc1 g2.sine1 g2.amp1.

As with copying a single module, the copied modules in a group will have the parameters set with the same values as the modules in the original group. However, the inputs will not be exactly the same, but their relationship will. For example if g1.sine1 in_phase_trig was connected to g1.clock1 out_phase_trig then g2.sine1 in_phase_trig will connect to g2.clock1 out_phase_trig.

If a module not part of the group has one of its inputs connected to the output of a grouped module, it will not be effected, its input will remain connected to the output of the module in the original group.

Group order Top

Generally you can add modules to a group in any order because they are only related to each other by connections. Some modules though, need to be added to the group in the correct order to get the desired result when you copy the group. These modules contain lists of other modules, such as the combiner spreader switcher mixer and trig_switcher, which contain lists of either wcnt_signal mix_chan or wcnt_trigger modules.

If you add the container module such as a combiner to the group before the wcnt_signals then when you copy the group, the combiner will be copied to the new group before the wcnt_signals and consequently they will not exist yet. When it tries to add them it will add the originals, not the copies. If you use --verbose on the command line when you process a .wc file which does this, then warnings will be issued.

Modules you cannot copy Top

Some modules you cannot copy, but you can add them to a group. However, if you try to copy the group, wcnt will not allow it. Generally you cannot copy a module because it would provide no benefit. This includes the time_map timer and sequencer modules. Each of these modules contain lists of data which you cannot edit afterwards, and therefor there is no purpose to copying them.





Home

Features

Basic usage

Sequencing

Sampling

Trigger modules

File inclusion

Groups and Copying

Miscelleneous

Download

About

Links

SourceForge.net Logo