yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::zelda3::music::MusicInstrument Struct Reference

An instrument definition with ADSR envelope. More...

#include <song_data.h>

Public Member Functions

uint8_t GetADByte () const
 
uint8_t GetSRByte () const
 
void SetFromBytes (uint8_t ad, uint8_t sr)
 

Public Attributes

uint8_t sample_index = 0
 
uint8_t attack = 0
 
uint8_t decay = 0
 
uint8_t sustain_level = 0
 
uint8_t sustain_rate = 0
 
uint8_t gain = 0
 
uint16_t pitch_mult = 0
 
std::string name
 

Detailed Description

An instrument definition with ADSR envelope.

Definition at line 358 of file song_data.h.

Member Function Documentation

◆ GetADByte()

uint8_t yaze::zelda3::music::MusicInstrument::GetADByte ( ) const
inline

Definition at line 369 of file song_data.h.

References attack, and decay.

◆ GetSRByte()

uint8_t yaze::zelda3::music::MusicInstrument::GetSRByte ( ) const
inline

Definition at line 372 of file song_data.h.

References sustain_level, and sustain_rate.

◆ SetFromBytes()

void yaze::zelda3::music::MusicInstrument::SetFromBytes ( uint8_t ad,
uint8_t sr )
inline

Definition at line 377 of file song_data.h.

References attack, decay, sustain_level, and sustain_rate.

Referenced by yaze::zelda3::music::MusicBank::LoadInstruments().

Member Data Documentation

◆ sample_index

◆ attack

◆ decay

◆ sustain_level

◆ sustain_rate

◆ gain

uint8_t yaze::zelda3::music::MusicInstrument::gain = 0

◆ pitch_mult

◆ name


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