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

A single event in a music track (note, command, or control). More...

#include <song_data.h>

Collaboration diagram for yaze::zelda3::music::TrackEvent:

Public Types

enum class  Type { Note , Command , SubroutineCall , End }
 

Static Public Member Functions

static TrackEvent MakeNote (uint16_t tick, uint8_t pitch, uint8_t duration, uint8_t velocity=0)
 
static TrackEvent MakeCommand (uint16_t tick, uint8_t opcode, uint8_t p1=0, uint8_t p2=0, uint8_t p3=0)
 
static TrackEvent MakeEnd (uint16_t tick)
 

Public Attributes

Type type = Type::End
 
uint16_t tick = 0
 
uint16_t rom_offset = 0
 
Note note
 
MusicCommand command
 

Detailed Description

A single event in a music track (note, command, or control).

Definition at line 247 of file song_data.h.

Member Enumeration Documentation

◆ Type

Enumerator
Note 
Command 
SubroutineCall 
End 

Definition at line 248 of file song_data.h.

Member Function Documentation

◆ MakeNote()

static TrackEvent yaze::zelda3::music::TrackEvent::MakeNote ( uint16_t tick,
uint8_t pitch,
uint8_t duration,
uint8_t velocity = 0 )
inlinestatic

◆ MakeCommand()

static TrackEvent yaze::zelda3::music::TrackEvent::MakeCommand ( uint16_t tick,
uint8_t opcode,
uint8_t p1 = 0,
uint8_t p2 = 0,
uint8_t p3 = 0 )
inlinestatic

Definition at line 270 of file song_data.h.

References Command, tick, and type.

Referenced by yaze::editor::music::TrackerView::HandleEditShortcuts().

◆ MakeEnd()

Member Data Documentation

◆ type

◆ tick

◆ rom_offset

uint16_t yaze::zelda3::music::TrackEvent::rom_offset = 0

Definition at line 252 of file song_data.h.

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

◆ note

◆ command

MusicCommand yaze::zelda3::music::TrackEvent::command

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