libopenmpt: openmpt_module_ext_interface_interactive Struct Reference

libopenmpt 0.9.0-pre.12+r25477 cross-platform C++ and C library to decode tracked music files

Loading...
Searching...
No Matches
openmpt_module_ext_interface_interactive Struct Reference
libopenmpt_ext C

`#include <libopenmpt/libopenmpt_ext.h>`

## Public Attributes
int(* | set_current_speed )(openmpt_module_ext *mod_ext, int32_t speed)
int(* | set_current_tempo )(openmpt_module_ext *mod_ext, int32_t tempo)
int(* | set_tempo_factor )(openmpt_module_ext *mod_ext, double factor)
double(* | get_tempo_factor )(openmpt_module_ext *mod_ext)
int(* | set_pitch_factor )(openmpt_module_ext *mod_ext, double factor)
double(* | get_pitch_factor )(openmpt_module_ext *mod_ext)
int(* | set_global_volume )(openmpt_module_ext *mod_ext, double volume)
double(* | get_global_volume )(openmpt_module_ext *mod_ext)
int(* | set_channel_volume )(openmpt_module_ext *mod_ext, int32_t channel, double volume)
double(* | get_channel_volume )(openmpt_module_ext *mod_ext, int32_t channel)
int(* | set_channel_mute_status )(openmpt_module_ext *mod_ext, int32_t channel, int mute)
int(* | get_channel_mute_status )(openmpt_module_ext *mod_ext, int32_t channel)
int(* | set_instrument_mute_status )(openmpt_module_ext *mod_ext, int32_t instrument, int mute)
int(* | get_instrument_mute_status )(openmpt_module_ext *mod_ext, int32_t instrument)
int32_t(* | play_note )(openmpt_module_ext *mod_ext, int32_t instrument, int32_t note, double volume, double panning)
int(* | stop_note )(openmpt_module_ext *mod_ext, int32_t channel)

## Member Data Documentation

## ◆ get_channel_mute_status

int(* openmpt_module_ext_interface_interactive::get_channel_mute_status) (openmpt_module_ext *mod_ext, int32_t channel)

Get the current mute status for a channel

Parameters

  mod_ext | The module handle to work on.
  channel | The channel whose mute status should be retrieved, in range [0, openmpt_module_get_num_channels()[

Returns
  The current channel mute status. 1 is muted, 0 is unmuted, -1 means the instrument was out of range

See also
  openmpt_module_ext_interface_interactive::set_channel_mute_status

## ◆ get_channel_volume

double(* openmpt_module_ext_interface_interactive::get_channel_volume) (openmpt_module_ext *mod_ext, int32_t channel)

Get the current channel volume for a channel

Parameters

  mod_ext | The module handle to work on.
  channel | The channel whose volume should be retrieved, in range [0, openmpt_module_get_num_channels()[

Returns
  The current channel volume in range [0.0, 1.0]

See also
  openmpt_module_ext_interface_interactive::set_channel_volume

## ◆ get_global_volume

double(* openmpt_module_ext_interface_interactive::get_global_volume) (openmpt_module_ext *mod_ext)

Get the current global volume

Parameters

  mod_ext | The module handle to work on.

Returns
  The current global volume in range [0.0, 1.0]

See also
  openmpt_module_ext_interface_interactive::set_global_volume

## ◆ get_instrument_mute_status

int(* openmpt_module_ext_interface_interactive::get_instrument_mute_status) (openmpt_module_ext *mod_ext, int32_t instrument)

Get the current mute status for an instrument

Parameters

  mod_ext | The module handle to work on.
  instrument | The instrument whose mute status should be retrieved, in range [0, openmpt_module_get_num_instruments()[ if openmpt_module_get_num_instruments is not 0, otherwise in [0, openmpt_module_get_num_samples()[

Returns
  The current instrument mute status. 1 is muted, 0 is unmuted, -1 means the instrument was out of range

See also
  openmpt_module_ext_interface_interactive::set_instrument_mute_status

## ◆ get_pitch_factor

double(* openmpt_module_ext_interface_interactive::get_pitch_factor) (openmpt_module_ext *mod_ext)

Gets the current module pitch factor

Parameters

  mod_ext | The module handle to work on.

Returns
  The current pitch factor.

See also
  openmpt_module_ext_interface_interactive::set_pitch_factor

## ◆ get_tempo_factor

double(* openmpt_module_ext_interface_interactive::get_tempo_factor) (openmpt_module_ext *mod_ext)

Gets the current module tempo factor

Parameters

  mod_ext | The module handle to work on.

Returns
  The current tempo factor.

See also
  openmpt_module_ext_interface_interactive::set_tempo_factor

## ◆ play_note

int32_t(* openmpt_module_ext_interface_interactive::play_note) (openmpt_module_ext *mod_ext, int32_t instrument, int32_t note, double volume, double panning)

Play a note using the specified instrument

Parameters

  mod_ext | The module handle to work on.
  instrument | The instrument that should be played, in range [0, openmpt_module_get_num_instruments()[ if openmpt_module_get_num_instruments is not 0, otherwise in [0, openmpt_module_get_num_samples()[
  note | The note to play, in rage [0, 119]. 60 is the middle C.
  volume | The volume at which the note should be triggered, in range [0.0, 1.0]
  panning | The panning position at which the note should be triggered, in range [-1.0, 1.0], 0.0 is center.

Returns
  The channel on which the note is played. This can pe be passed to openmpt_module_ext_interface_interactive::stop_note to stop the note. -1 means that no channel could be allocated and the note is not played.

See also
  openmpt_module_ext_interface_interactive::stop_note
  openmpt_module_ext_interface_interactive2::note_off
  openmpt_module_ext_interface_interactive2::note_fade

## ◆ set_channel_mute_status

int(* openmpt_module_ext_interface_interactive::set_channel_mute_status) (openmpt_module_ext *mod_ext, int32_t channel, int mute)

Set the current mute status for a channel

Parameters

  mod_ext | The module handle to work on.
  channel | The channel whose mute status should be set, in range [0, openmpt_module_get_num_channels()[
  mute | The new mute status. true is muted, false is unmuted.

Returns
  1 on success, 0 on failure (channel out of range).

See also
  openmpt_module_ext_interface_interactive::get_channel_mute_status

## ◆ set_channel_volume

int(* openmpt_module_ext_interface_interactive::set_channel_volume) (openmpt_module_ext *mod_ext, int32_t channel, double volume)

Set the current channel volume for a channel

Parameters

  mod_ext | The module handle to work on.
  channel | The channel whose volume should be set, in range [0, openmpt_module_get_num_channels()[
  volume | The new channel volume in range [0.0, 1.0]

Returns
  1 on success, 0 on failure (channel out of range).

Remarks
  The channel volume may be reset by pattern commands at any time.

See also
  openmpt_module_ext_interface_interactive::get_channel_volume

## ◆ set_current_speed

int(* openmpt_module_ext_interface_interactive::set_current_speed) (openmpt_module_ext *mod_ext, int32_t speed)

Set the current ticks per row (speed)

Parameters

  mod_ext | The module handle to work on.
  speed | The new tick count in range [1, 65535].

Returns
  1 on success, 0 on failure.

Remarks
  The tick count may be reset by pattern commands at any time.

See also
  openmpt_module_get_current_speed

## ◆ set_current_tempo

int(* openmpt_module_ext_interface_interactive::set_current_tempo) (openmpt_module_ext *mod_ext, int32_t tempo)

Set the current module tempo

Parameters

  mod_ext | The module handle to work on.
  tempo | The new tempo in range [32, 512]. The exact meaning of the value depends on the tempo mode used by the module.

Returns
  1 on success, 0 on failure.

Remarks
  The tempo may be reset by pattern commands at any time. Use openmpt_module_ext_interface_interactive::set_tempo_factor to apply a tempo factor that is independent of pattern commands.

See also
  openmpt_module_get_current_tempo

Deprecated
  Please use openmpt_module_ext_interface_interactive3::set_current_tempo2().

## ◆ set_global_volume

int(* openmpt_module_ext_interface_interactive::set_global_volume) (openmpt_module_ext *mod_ext, double volume)

Set the current global volume

Parameters

  mod_ext | The module handle to work on.
  volume | The new global volume in range [0.0, 1.0]

Returns
  1 on success, 0 on failure.

Remarks
  The global volume may be reset by pattern commands at any time. Use openmpt_module_set_render_param to apply a global overall volume factor that is independent of pattern commands.

See also
  openmpt_module_ext_interface_interactive::get_global_volume

## ◆ set_instrument_mute_status

int(* openmpt_module_ext_interface_interactive::set_instrument_mute_status) (openmpt_module_ext *mod_ext, int32_t instrument, int mute)

Set the current mute status for an instrument

Parameters

  mod_ext | The module handle to work on.
  instrument | The instrument whose mute status should be set, in range [0, openmpt_module_get_num_instruments()[ if openmpt_module_get_num_instruments is not 0, otherwise in [0, openmpt_module_get_num_samples()[
  mute | The new mute status. true is muted, false is unmuted.

Returns
  1 on success, 0 on failure (instrument out of range).

See also
  openmpt_module_ext_interface_interactive::get_instrument_mute_status

## ◆ set_pitch_factor

int(* openmpt_module_ext_interface_interactive::set_pitch_factor) (openmpt_module_ext *mod_ext, double factor)

Set the current module pitch factor without affecting playback speed

Parameters

  mod_ext | The module handle to work on.
  factor | The new pitch factor in range ]0.0, 4.0] - 1.0 means unmodified pitch.

Returns
  1 on success, 0 on failure.

Remarks
  Modifying the pitch without applying the the same tempo factor using openmpt_module_ext_interface_interactive::set_tempo_factor may cause rhythmic samples (e.g. drum loops) to go out of sync.
  To shift the pich by n semitones, the parameter can be calculated as follows: pow( 2.0, n / 12.0 )

See also
  openmpt_module_ext_interface_interactive::get_pitch_factor

## ◆ set_tempo_factor

int(* openmpt_module_ext_interface_interactive::set_tempo_factor) (openmpt_module_ext *mod_ext, double factor)

Set the current module tempo factor without affecting playback pitch

Parameters

  mod_ext | The module handle to work on.
  factor | The new tempo factor in range ]0.0, 4.0] - 1.0 means unmodified tempo.

Returns
  1 on success, 0 on failure.

Remarks
  Modifying the tempo without applying the same pitch factor using openmpt_module_ext_interface_interactive::set_pitch_factor may cause rhythmic samples (e.g. drum loops) to go out of sync.

See also
  openmpt_module_ext_interface_interactive::get_tempo_factor

## ◆ stop_note

int(* openmpt_module_ext_interface_interactive::stop_note) (openmpt_module_ext *mod_ext, int32_t channel)

Stop the note playing on the specified channel

Parameters

  mod_ext | The module handle to work on.
  channel | The channel on which the note should be stopped. This is the value returned by a previous play_note call.

Returns
  1 on success, 0 on failure (channel out of range).

See also
  openmpt_module_ext_interface_interactive::play_note
  openmpt_module_ext_interface_interactive2::note_off
  openmpt_module_ext_interface_interactive2::note_fade

The documentation for this struct was generated from the following file:

- libopenmpt/libopenmpt_ext.h