Swadge 2024 2.0.0
APIs to develop games for the Magfest Swadge
Loading...
Searching...
No Matches
midiData.c File Reference

Variables

const midiTimbre_t acousticGrandPianoTimbre
 
const midiTimbre_t squareWaveTimbre
 
const midiTimbre_t sineWaveTimbre
 
const midiTimbre_t triangleWaveTimbre
 
const midiTimbre_t sawtoothWaveTimbre
 
const midiTimbre_t noiseTimbre
 
const midiTimbre_t magfestWaveTimbre
 
const midiTimbre_t magstockWaveTimbre
 
const midiTimbre_t squareHitWaveTimbre
 
const midiTimbre_t noiseHitTimbre
 
const midiTimbre_t colossusTimbre
 
const midiTimbre_t magTimbre
 
const midiTimbre_t festTimbre
 
const midiTimbre_t wilhelmTimbre
 
const midiTimbre_t noriTimbre
 
const midiTimbre_t *const magfestTimbres []
 
const size_t magfestTimbreCount = ARRAY_SIZE(magfestTimbres)
 
const midiTimbre_t defaultDrumkitTimbre
 
const midiTimbre_t donutDrumkitTimbre
 

Variable Documentation

◆ acousticGrandPianoTimbre

const midiTimbre_t acousticGrandPianoTimbre

◆ squareWaveTimbre

const midiTimbre_t squareWaveTimbre
Initial value:
= {
.type = WAVE_SHAPE,
.flags = TF_NONE,
.shape = SHAPE_SQUARE,
.envelope = {
.sustainVol = 1,
.sustainVolVel = 0x200,
},
.name = "Square Wave",
}
@ WAVE_SHAPE
Definition midiPlayer.h:138
@ TF_NONE
No flags.
Definition midiPlayer.h:147
@ SHAPE_SQUARE
A square wave.
Definition swSynth.h:69

◆ sineWaveTimbre

const midiTimbre_t sineWaveTimbre
Initial value:
= {
.type = WAVE_SHAPE,
.flags = TF_NONE,
.shape = SHAPE_SINE,
.envelope = {
.sustainVol = 1,
.sustainVolVel = 0x200,
},
.name = "Sine Wave",
}
@ SHAPE_SINE
A sine wave.
Definition swSynth.h:66

◆ triangleWaveTimbre

const midiTimbre_t triangleWaveTimbre
Initial value:
= {
.type = WAVE_SHAPE,
.flags = TF_NONE,
.shape = SHAPE_TRIANGLE,
.envelope = {
.sustainVol = 1,
.sustainVolVel = 0x200,
},
.name = "Triangle Wave",
}
@ SHAPE_TRIANGLE
A triangle wave.
Definition swSynth.h:68

◆ sawtoothWaveTimbre

const midiTimbre_t sawtoothWaveTimbre
Initial value:
= {
.type = WAVE_SHAPE,
.flags = TF_NONE,
.shape = SHAPE_SAWTOOTH,
.envelope = {
.sustainVol = 1,
.sustainVolVel = 0x200,
},
.name = "Sawtooth Wave",
}
@ SHAPE_SAWTOOTH
A sawtooth wave.
Definition swSynth.h:67

◆ noiseTimbre

const midiTimbre_t noiseTimbre
Initial value:
= {
.type = NOISE,
.flags = TF_NONE,
.envelope = {
.sustainVol = 1,
.sustainVolVel = 0x200,
},
.name = "Noise",
}
@ NOISE
Definition midiPlayer.h:137

◆ magfestWaveTimbre

const midiTimbre_t magfestWaveTimbre
Initial value:
= {
.type = WAVETABLE,
.flags = TF_NONE,
.waveIndex = 0,
.waveFunc = magfestWaveTableFunc,
.envelope = {
.attackTime = MS_TO_SAMPLES(8),
.attackTimeVel = -0x80,
.decayTime = MS_TO_SAMPLES(16),
.decayTimeVel = 0,
.sustainVol = 1,
.sustainVolVel = 0x200,
.releaseTime = MS_TO_SAMPLES(320),
.releaseTimeVel = 0x800,
},
.effects = {
.chorus = 0,
},
.name = "MAGFest Wave",
}
@ WAVETABLE
Samples are generated by sampling a particular wave shape.
Definition midiPlayer.h:135
#define MS_TO_SAMPLES(ms)
Calculate the number of DAC samples in the given number of milliseconds.
Definition midiPlayer.h:104
int8_t magfestWaveTableFunc(uint16_t idx, void *data)
Definition waveTables.c:1895

◆ magstockWaveTimbre

const midiTimbre_t magstockWaveTimbre
Initial value:
= {
.type = WAVETABLE,
.flags = TF_NONE,
.waveIndex = 1,
.waveFunc = magfestWaveTableFunc,
.envelope = {
.attackTime = MS_TO_SAMPLES(8),
.attackTimeVel = -0x80,
.decayTime = MS_TO_SAMPLES(16),
.decayTimeVel = 0,
.sustainVol = 1,
.sustainVolVel = 0x200,
.releaseTime = MS_TO_SAMPLES(320),
.releaseTimeVel = 0x800,
},
.effects = {
.chorus = 0,
},
.name = "MAGStock Wave",
}

◆ squareHitWaveTimbre

const midiTimbre_t squareHitWaveTimbre
Initial value:
= {
.type = WAVE_SHAPE,
.flags = TF_NONE,
.shape = SHAPE_SQUARE,
.envelope = {
.attackTime = 0,
.attackTimeVel = 0,
.decayTime = MS_TO_SAMPLES(125),
.decayTimeVel = 0,
.sustainVol = 0,
.sustainVolVel = 0,
.releaseTime = 0,
.releaseTimeVel = 0,
},
.name = "Square Hit",
}

◆ noiseHitTimbre

const midiTimbre_t noiseHitTimbre
Initial value:
= {
.type = WAVE_SHAPE,
.flags = TF_NONE,
.shape = SHAPE_NOISE,
.envelope = {
.attackTime = 0,
.attackTimeVel = 0,
.decayTime = MS_TO_SAMPLES(125),
.decayTimeVel = 0,
.sustainVol = 0,
.sustainVolVel = 0,
.releaseTime = 0,
.releaseTimeVel = 0,
},
.name = "Noise Hit",
}
@ SHAPE_NOISE
Random noise from a linear feedback shift register.
Definition swSynth.h:70

◆ colossusTimbre

const midiTimbre_t colossusTimbre
Initial value:
= {
.type = SAMPLE,
.flags = TF_NONE,
.sample = {
.config = {
.sampleName = "colossus.bin",
},
.loop = 1,
.rate = 8192,
.baseNote = FREQ_C_SHARP_5,
},
.name = "Colossus Roar",
}
#define FREQ_C_SHARP_5
Definition midiNoteFreqs.h:91
@ SAMPLE
Definition midiPlayer.h:136

◆ magTimbre

const midiTimbre_t magTimbre
Initial value:
= {
.type = SAMPLE,
.flags = TF_NONE,
.sample = {
.config = {
.sampleName = "donut_mag.bin",
},
.loop = 1,
.rate = 8192,
.baseNote = FREQ_A4,
},
.name = "MAG",
}
#define FREQ_A4
Definition midiNoteFreqs.h:75

◆ festTimbre

const midiTimbre_t festTimbre
Initial value:
= {
.type = SAMPLE,
.flags = TF_NONE,
.sample = {
.config = {
.sampleName = "donut_fest.bin",
},
.loop = 1,
.rate = 8192,
.baseNote = FREQ_A4,
},
.name = "FEST",
}

◆ wilhelmTimbre

const midiTimbre_t wilhelmTimbre
Initial value:
= {
.type = SAMPLE,
.flags = TF_NONE,
.sample = {
.config = {
.sampleName = "wilhelm.bin",
},
.loop = 0,
.rate = 8192,
.baseNote = FREQ_A4,
},
.name = "Wilhelm",
}

◆ noriTimbre

const midiTimbre_t noriTimbre
Initial value:
= {
.type = SAMPLE,
.flags = TF_NONE,
.sample = {
.config = {
.sampleName = "nori2.bin",
},
.loop = 0,
.rate = 8192,
.baseNote = FREQ_A4,
},
.name = "Nori",
}

◆ magfestTimbres

const midiTimbre_t* const magfestTimbres[]
Initial value:
= {
}
const midiTimbre_t magfestWaveTimbre
Definition midiData.c:98
const midiTimbre_t sawtoothWaveTimbre
Definition midiData.c:77
const midiTimbre_t triangleWaveTimbre
Definition midiData.c:66
const midiTimbre_t magTimbre
Definition midiData.c:195
const midiTimbre_t colossusTimbre
Definition midiData.c:178
const midiTimbre_t noiseTimbre
Definition midiData.c:88
const midiTimbre_t noriTimbre
Definition midiData.c:246
const midiTimbre_t squareWaveTimbre
Definition midiData.c:44
const midiTimbre_t squareHitWaveTimbre
Definition midiData.c:144
const midiTimbre_t wilhelmTimbre
Definition midiData.c:229
const midiTimbre_t festTimbre
Definition midiData.c:212
const midiTimbre_t noiseHitTimbre
Definition midiData.c:161
const midiTimbre_t sineWaveTimbre
Definition midiData.c:55
const midiTimbre_t magstockWaveTimbre
Definition midiData.c:121

◆ magfestTimbreCount

const size_t magfestTimbreCount = ARRAY_SIZE(magfestTimbres)

◆ defaultDrumkitTimbre

const midiTimbre_t defaultDrumkitTimbre
Initial value:
= {
.type = NOISE,
.flags = TF_PERCUSSION,
.percussion = {
.playFunc = defaultDrumkitFunc,
.data = NULL,
},
.envelope = { 0 },
.name = "Swadge Drums 0",
}
int8_t defaultDrumkitFunc(percussionNote_t drum, uint32_t idx, bool *done, uint32_t scratch[4], void *data)
Produces sounds for a standard drumkit according to the General MIDI standard.
Definition drums.c:192
@ TF_PERCUSSION
This timbre plays percussion sounds (percussionNote_t) rather than melodic notes.
Definition midiPlayer.h:149

◆ donutDrumkitTimbre

const midiTimbre_t donutDrumkitTimbre
Initial value:
= {
.type = NOISE,
.flags = TF_PERCUSSION,
.percussion = {
.playFunc = donutDrumkitFunc,
.data = NULL,
},
.envelope = { 0 },
.name = "Donut Swadge Drums",
}
int8_t donutDrumkitFunc(percussionNote_t drum, uint32_t idx, bool *done, uint32_t scratch[4], void *data)
Produces sounds for the drumkit that was included on the King Donut synth swadge.
Definition drums.c:513