GUI: prepare for FM preview

This commit is contained in:
tildearrow 2023-03-17 19:12:09 -05:00
parent d58270efed
commit 57f4cc8561
4 changed files with 101 additions and 0 deletions

View file

@ -68,6 +68,8 @@
#define BIND_FOR(x) getKeyName(actionKeys[x],true).c_str()
#define FM_PREVIEW_SIZE 1024
// TODO:
// - add colors for FM envelope and waveform
// - maybe add "alternate" color for FM modulators/carriers (a bit difficult)
@ -1192,6 +1194,7 @@ class FurnaceGUI {
ImVec2 mobileEditButtonPos, mobileEditButtonSize;
const int* curSysSection;
DivInstrumentFM opllPreview;
short fmPreview[FM_PREVIEW_SIZE];
String pendingRawSample;
int pendingRawSampleDepth, pendingRawSampleChannels;
@ -1887,6 +1890,7 @@ class FurnaceGUI {
void drawGBEnv(unsigned char vol, unsigned char len, unsigned char sLen, bool dir, const ImVec2& size);
bool drawSysConf(int chan, DivSystem type, DivConfig& flags, bool modifyOnChange);
void kvsConfig(DivInstrument* ins);
void renderFMPreview(const DivInstrumentFM& params, int pos=0);
// these ones offer ctrl-wheel fine value changes.
bool CWSliderScalar(const char* label, ImGuiDataType data_type, void* p_data, const void* p_min, const void* p_max, const char* format=NULL, ImGuiSliderFlags flags=0);