## GstBtCombine GstBtCombine — combine/mixing module |

## Functions

GstBtCombine * | gstbt_combine_new ()
void | gstbt_combine_trigger ()
void | gstbt_combine_process ()

## Properties

GstBtCombineType | combine | Read / Write

## Types and Values

enum | GstBtCombineType
struct | GstBtCombine

## Object Hierarchy

        GEnum
        ╰── GstBtCombineType
        GObject
        ╰── GInitiallyUnowned
            ╰── GstObject
                ╰── GstBtCombine

## Includes

    #include <libgstbuzztrax/combine.h>

## Description

A module that combines 2 buffers using different (“combine”) modes.

### Combine modes

Examples of combining a saw-wave with another saw wave of double frequency.

## Functions

### gstbt_combine_new ()

    GstBtCombine *
    gstbt_combine_new (void);

Create a new instance

#### Returns

the new instance or `NULL` in case of an error

### gstbt_combine_trigger ()

    void
    gstbt_combine_trigger (GstBtCombine *self);

Reset state. Typically called for new notes.

#### Parameters

self | the combine module |

### gstbt_combine_process ()

    void
    gstbt_combine_process (GstBtCombine *self,
                           guint size,
                           gint16 *d1,
                           gint16 *d2);

Process `size` samples of audio from `d1` and `d2` . Stores the result into `d1` .

#### Parameters

self | the oscillator |
size | number of sample to filter |
d1 | buffer with the audio |
d2 | buffer with the audio |

## Types and Values

### enum GstBtCombineType

Combine types.

#### Members

GSTBT_COMBINE_MIX | add both signals (A+B) |
GSTBT_COMBINE_MUL | multiply signals (A*B) (amplitude modulation) |
GSTBT_COMBINE_SUB | subtract signals (A-B) |
GSTBT_COMBINE_MAX | max of both signals (max(A,B)) |
GSTBT_COMBINE_MIN | min of both signals (min(A,B)) |
GSTBT_COMBINE_AND | logical and of both signals (A&B) |
GSTBT_COMBINE_OR | logical or of both signals (A|B) |
GSTBT_COMBINE_XOR | logical xor of both signals (A^B) |
GSTBT_COMBINE_COUNT | number of combine modes, this can change with new releases |

### struct GstBtCombine

    struct GstBtCombine {
      /* parameters */
      GstBtCombineType type;
    };

Class instance data.

#### Members

GstBtCombineType `type`; | combine type |

## Property Details

### The `“combine”` property

      “combine”                  GstBtCombineType

Type of combine operation.

Flags: Read / Write

Default value: Mix: A+B