1#ifndef YAZE_APP_EDITOR_MUSIC_EDITOR_H
2#define YAZE_APP_EDITOR_MUSIC_EDITOR_H
7#include <unordered_map>
9#include "absl/status/statusor.h"
15#include "imgui/imgui.h"
45static const char* kGameSongs[] = {
"Title",
62 "Cave (Same as Secret Way)",
63 "Clear (Dungeon end)",
68 "Secret Way (Same as Cave)",
77static constexpr absl::string_view kSongNotes[] = {
78 "C",
"C#",
"D",
"D#",
"E",
"F",
"F#",
"G",
"G#",
"A",
"A#",
"B",
"C",
79 "C#",
"D",
"D#",
"E",
"F",
"F#",
"G",
"G#",
"A",
"A#",
"B",
"C"};
83 ImGuiTableFlags_Resizable |
84 ImGuiTableFlags_Reorderable;
96 absl::Status
Load()
override;
97 absl::Status
Save()
override;
98 absl::Status
Update()
override;
99 absl::Status
Cut()
override;
100 absl::Status
Copy()
override;
101 absl::Status
Paste()
override;
102 absl::Status
Undo()
override;
103 absl::Status
Redo()
override;
104 absl::Status
Find()
override {
return absl::UnimplementedError(
"Find"); }
121 void SpeedUp(
float delta = 0.1f);
188 ImGuiTableFlags_Resizable | ImGuiTableFlags_BordersOuter |
189 ImGuiTableFlags_BordersV | ImGuiTableFlags_SizingFixedFit;
192 ImGuiTableFlags_SizingFixedFit | ImGuiTableFlags_BordersOuter |
193 ImGuiTableFlags_BordersV | ImGuiTableFlags_PadOuterX;
211 std::unordered_map<int, std::shared_ptr<gui::PanelWindow>>
song_cards_;
212 std::unordered_map<int, std::unique_ptr<editor::music::TrackerView>>
215 std::shared_ptr<gui::PanelWindow>
card;
216 std::unique_ptr<editor::music::PianoRollView>
view;
The Rom class is used to load, save, and modify Rom data. This is a generic SNES ROM container and do...
Text editor for modifying assembly code.
Interface for editor classes.
A class for editing music data in a Rom.
absl::Status Find() override
void DrawInstrumentEditor()
std::unordered_map< int, std::unique_ptr< editor::music::TrackerView > > song_trackers_
void FocusSong(int song_index)
std::unique_ptr< emu::audio::IAudioBackend > audio_backend_
bool persist_custom_music_
ImVector< int > active_songs_
std::vector< bool > channel_soloed_
int current_segment_index_
void SlowDown(float delta=0.1f)
std::string music_storage_key_
void DrawSongTrackerWindow(int song_index)
emu::Emulator * emulator_
std::unordered_map< int, std::shared_ptr< gui::PanelWindow > > song_cards_
void DrawChannelOverview()
absl::Status Paste() override
int current_channel() const
std::vector< bool > channel_muted_
zelda3::music::MusicBank music_bank_
std::unordered_map< int, SongPianoRollWindow > song_piano_rolls_
void SetProject(project::YazeProject *project)
void Initialize() override
bool show_asm_export_popup_
std::vector< UndoState > undo_stack_
void OpenSong(int song_index)
emu::Emulator * emulator() const
void ExportSongToAsm(int song_index)
editor::music::SampleEditorView sample_editor_view_
absl::Status Save() override
absl::Status Cut() override
int current_channel_index_
void OpenSongPianoRoll(int song_index)
int current_pattern_index_
absl::Status Load() override
void RestoreState(const UndoState &state)
void ImportSongFromAsm(int song_index)
absl::StatusOr< bool > RestoreMusicState()
absl::Status Copy() override
std::vector< UndoState > redo_stack_
void SpeedUp(float delta=0.1f)
absl::Status PersistMusicState(const char *reason=nullptr)
absl::Status Update() override
void DrawPlaybackControl()
editor::music::InstrumentEditorView instrument_editor_view_
bool song_browser_auto_shown_
std::unique_ptr< editor::music::MusicPlayer > music_player_
void set_emulator(emu::Emulator *emulator)
ImGuiTableFlags music_editor_flags_
absl::Status Undo() override
absl::Status Redo() override
ImGuiTableFlags toolset_table_flags_
std::vector< std::string > song_names_
int asm_import_target_index_
bool show_asm_import_popup_
std::chrono::steady_clock::time_point last_music_persist_
std::string asm_import_error_
void set_current_channel(int channel)
AssemblyEditor assembly_editor_
bool ImportAsmBufferToSong(int song_index)
project::YazeProject * project_
MusicEditor(Rom *rom=nullptr)
void SeekToSegment(int segment_index)
editor::music::TrackerView tracker_view_
editor::music::SongBrowserView song_browser_view_
editor::music::PianoRollView piano_roll_view_
ImGuiWindowClass song_window_class_
Editor for SNES instruments (ADSR, Gain, Samples).
UI component for displaying and editing music tracks as a piano roll.
Editor for SNES BRR samples.
UI component for browsing and managing songs.
UI component for displaying and editing music tracks.
A class for emulating and debugging SNES games.
Abstract audio backend interface.
Manages the collection of songs, instruments, and samples from a ROM.
const ImGuiTableFlags music_editor_flags_
const ImGuiTableFlags toolset_table_flags_
std::unique_ptr< editor::music::PianoRollView > view
std::shared_ptr< gui::PanelWindow > card
zelda3::music::MusicSong song_snapshot
Modern project structure with comprehensive settings consolidation.
A complete song composed of segments.