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

Represents a single musical note. More...

#include <song_data.h>

Public Member Functions

bool IsNote () const
 
bool IsTie () const
 
bool IsRest () const
 
std::string GetNoteName () const
 
int GetOctave () const
 
int GetSemitone () const
 

Public Attributes

uint8_t pitch = kNoteRest
 
uint8_t duration = 0
 
uint8_t velocity = 0
 
bool has_duration_prefix = false
 

Detailed Description

Represents a single musical note.

Notes have a pitch (C1-B6), duration in ticks, and optional velocity. Special pitch values: 0xC8 = tie (extend previous), 0xC9 = rest.

Definition at line 192 of file song_data.h.

Member Function Documentation

◆ IsNote()

bool yaze::zelda3::music::Note::IsNote ( ) const
inline

◆ IsTie()

bool yaze::zelda3::music::Note::IsTie ( ) const
inline

Definition at line 200 of file song_data.h.

References yaze::zelda3::music::kNoteTie, and pitch.

Referenced by GetNoteName().

◆ IsRest()

bool yaze::zelda3::music::Note::IsRest ( ) const
inline

Definition at line 201 of file song_data.h.

References yaze::zelda3::music::kNoteRest, and pitch.

Referenced by GetNoteName().

◆ GetNoteName()

◆ GetOctave()

int yaze::zelda3::music::Note::GetOctave ( ) const
inline

Definition at line 207 of file song_data.h.

References IsNote(), yaze::zelda3::music::kNoteMinPitch, and pitch.

Referenced by GetNoteName().

Here is the call graph for this function:

◆ GetSemitone()

int yaze::zelda3::music::Note::GetSemitone ( ) const
inline

Definition at line 213 of file song_data.h.

References IsNote(), yaze::zelda3::music::kNoteMinPitch, and pitch.

Referenced by GetNoteName().

Here is the call graph for this function:

Member Data Documentation

◆ pitch

◆ duration

◆ velocity

◆ has_duration_prefix

bool yaze::zelda3::music::Note::has_duration_prefix = false

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