Swadge ESP32-S2  2.0.0
APIs to develop for the Magfest Swadge
Loading...
Searching...
No Matches
midiTimbre_t Struct Reference

Detailed Description

Defines the sound characteristics of a particular instrument.

#include <midiPlayer.h>

Data Fields

timbreType_t type
 The source of samples for this instrument.
timbreFlags_t flags
 Flags bitfield for this timbre.
union { 
   struct { 
uint16_t waveIndex
 The index of this timbre's wave in the table, when type is WAVETABLE.
waveFunc_t waveFunc
 The function to use to retrieve wavetable samples.
   } 
timbreSample_t sample
   struct { 
const noteSampleMap_tmap
 A map of different samples to use.
size_t count
 The length of the sample map.
   } multiSample
   struct { 
percussionFunc_t func
 A callback to call for drum data.
void * data
 User data to pass to the drumkit.
   } playFunc
oscillatorShape_t shape
 The shape of this wave, when type is RAW_WAVE.
}; 
envelope_t envelope
 The ASDR characteristics of this timbre.
timbreEffects_t effects
 Various effects applied to this timbre. May be ignored by percussion timbres.
const char * name
 The name of this timbre, if any.

Field Documentation

◆ type

The source of samples for this instrument.

◆ flags

Flags bitfield for this timbre.

◆ [union]

union { ... }

◆ envelope

envelope_t envelope

The ASDR characteristics of this timbre.

◆ effects

timbreEffects_t effects

Various effects applied to this timbre. May be ignored by percussion timbres.

◆ name

const char* name

The name of this timbre, if any.


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