midi播放测试
This commit is contained in:
parent
a48e8adf10
commit
14b571e6d0
@ -3,9 +3,9 @@
|
||||
#include "window/window_manager.h"
|
||||
#include "imgui.h"
|
||||
#include "imgui_main.h"
|
||||
#include "audio/midi_sequencer/midi_sequencer.h"
|
||||
#include "widget/widgets.h"
|
||||
#include "audio/plugin_host/plugin_host_manager.h"
|
||||
#include "audio/plugin_host/plugin_host.h"
|
||||
|
||||
application* g_application = nullptr;
|
||||
|
||||
@ -51,6 +51,7 @@ void configure_imgui(ImGuiIO& io) {
|
||||
void draw_imgui(float delta_time) {
|
||||
// 全局dockspace
|
||||
ImGui::DockSpaceOverViewport();
|
||||
draw_header();
|
||||
draw_instrument_track();
|
||||
draw_mixer();
|
||||
draw_selected_mixer_track_effect_list();
|
||||
@ -73,11 +74,9 @@ void arona_application::shutdown() {
|
||||
}
|
||||
|
||||
void arona_application::test() {
|
||||
const char* path = R"(F:\VST\VST64\Serum_x64.dll)";
|
||||
plugin_host* host = get_plugin_host_manager()->create_instrument_plugin_host(path);
|
||||
host->try_open_editor();
|
||||
get_midi_sequencer()->test();
|
||||
}
|
||||
|
||||
arona_application* get_arona_application() {
|
||||
auto get_arona_application() -> arona_application* {
|
||||
return static_cast<arona_application*>(g_application);
|
||||
}
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include "imgui_internal.h"
|
||||
#include "audio/device/audio_device_manager.h"
|
||||
#include "imgui-knobs.h"
|
||||
#include "audio/midi_sequencer/midi_sequencer.h"
|
||||
|
||||
struct volume_bar_peak_info {
|
||||
sample_t peak;
|
||||
@ -16,8 +17,18 @@ struct volume_bar_peak_info {
|
||||
|
||||
bool show_instrument_track = true;
|
||||
bool show_mixer = true;
|
||||
bool play = false;
|
||||
std::unordered_map<uint64_t, std::vector<volume_bar_peak_info>> volume_bar_peak_map;
|
||||
|
||||
void draw_header() {
|
||||
ImGui::Begin("Header");
|
||||
const char* button_label = play ? "Pause" : "Play";
|
||||
if (ImGui::Button(button_label)) {
|
||||
play = get_midi_sequencer()->toggle_play();
|
||||
}
|
||||
ImGui::End();
|
||||
}
|
||||
|
||||
void draw_instrument_track() {
|
||||
ImGui::Begin("Instrument", &show_instrument_track);
|
||||
auto instruments = get_plugin_host_manager()->get_instrument_hosts();
|
||||
|
@ -53,6 +53,8 @@ inline float percentage_to_db(float percentage, float min_db = -60.0f, float max
|
||||
|
||||
bool vertical_volume_slider(const char* id, ImVec2 size, float* volume, float min_volume = 0.0f, float max_volume = 1.0f);
|
||||
|
||||
void draw_header();
|
||||
|
||||
void draw_instrument_track();
|
||||
void draw_mixer();
|
||||
void draw_mixer_track(mixer_track* track);
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit e74ecd2250472be323c0f3f6724c54981adc65a8
|
||||
Subproject commit e77638960cb7714544854e954d3b6f4e99432801
|
Loading…
x
Reference in New Issue
Block a user