forked from alinebee/Boxer
-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move config of mt32 code to its own function.
Closes #22
- Loading branch information
1 parent
fab032b
commit ea36338
Showing
4 changed files
with
96 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
// | ||
// BXMIDIConfig.cpp | ||
// Boxer | ||
// | ||
// Created by C.W. Betts on 2/10/21. | ||
// Copyright © 2021 Alun Bestor and contributors. All rights reserved. | ||
// | ||
|
||
#include "BXMIDIConfig.hpp" | ||
#include "string_utils.h" | ||
|
||
|
||
static void mt32_init(MAYBE_UNUSED Section *secprop) | ||
{} | ||
|
||
static void init_mt32_dosbox_settings(Section_prop &sec_prop) | ||
{ | ||
const char *mt32ReverseStereo[] = {"off", "on",0}; | ||
Prop_string *Pstring = sec_prop.Add_string("ReverseStereo",Property::Changeable::WhenIdle,"off"); | ||
Pstring->Set_values(mt32ReverseStereo); | ||
Pstring->Set_help("Reverse stereo channels for MT-32 output"); | ||
|
||
const char *mt32DACModes[] = {"0", "1", "2", "3", "auto",0}; | ||
Pstring = sec_prop.Add_string("DAC",Property::Changeable::WhenIdle,"auto"); | ||
Pstring->Set_values(mt32DACModes); | ||
Pstring->Set_help("MT-32 DAC input mode\n" | ||
"Nice = 0 - default\n" | ||
"Produces samples at double the volume, without tricks.\n" | ||
"Higher quality than the real devices\n\n" | ||
|
||
"Pure = 1\n" | ||
"Produces samples that exactly match the bits output from the emulated LA32.\n" | ||
"Nicer overdrive characteristics than the DAC hacks (it simply clips samples within range)\n" | ||
"Much less likely to overdrive than any other mode.\n" | ||
"Half the volume of any of the other modes, meaning its volume relative to the reverb\n" | ||
"output when mixed together directly will sound wrong. So, reverb level must be lowered.\n" | ||
"Perfect for developers while debugging :)\n\n" | ||
|
||
"GENERATION1 = 2\n" | ||
"Re-orders the LA32 output bits as in early generation MT-32s (according to Wikipedia).\n" | ||
"Bit order at DAC (where each number represents the original LA32 output bit number, and XX means the bit is always low):\n" | ||
"15 13 12 11 10 09 08 07 06 05 04 03 02 01 00 XX\n\n" | ||
|
||
"GENERATION2 = 3\n" | ||
"Re-orders the LA32 output bits as in later generations (personally confirmed on my CM-32L - KG).\n" | ||
"Bit order at DAC (where each number represents the original LA32 output bit number):\n" | ||
"15 13 12 11 10 09 08 07 06 05 04 03 02 01 00 14\n\n"); | ||
const char *mt32reverbModes[] = {"0", "1", "2", "3", "auto",0}; | ||
Pstring = sec_prop.Add_string("reverbmode",Property::Changeable::WhenIdle,"auto"); | ||
Pstring->Set_values(mt32reverbModes); | ||
Pstring->Set_help("MT-32 reverb mode"); | ||
|
||
const char *mt32reverbTimes[] = {"0", "1", "2", "3", "4", "5", "6", "7",0}; | ||
Prop_int *Pint = sec_prop.Add_int("reverbtime",Property::Changeable::WhenIdle,5); | ||
Pint->Set_values(mt32reverbTimes); | ||
Pint->Set_help("MT-32 reverb time"); | ||
|
||
const char *mt32reverbLevels[] = {"0", "1", "2", "3", "4", "5", "6", "7",0}; | ||
Pint = sec_prop.Add_int("reverblevel",Property::Changeable::WhenIdle,3); | ||
Pint->Set_values(mt32reverbLevels); | ||
Pint->Set_help("MT-32 reverb level"); | ||
} | ||
|
||
void BXMIDIMT32_AddConfigSection(Config *conf) | ||
{ | ||
assert(conf); | ||
Section_prop *sec_prop = conf->AddSection_prop("mt32", &mt32_init); | ||
assert(sec_prop); | ||
init_mt32_dosbox_settings(*sec_prop); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// | ||
// BXMIDIConfig.hpp | ||
// Boxer | ||
// | ||
// Created by C.W. Betts on 2/10/21. | ||
// Copyright © 2021 Alun Bestor and contributors. All rights reserved. | ||
// | ||
|
||
#ifndef BXMIDIConfig_hpp | ||
#define BXMIDIConfig_hpp | ||
|
||
#include "control.h" | ||
#include "midi.h" | ||
|
||
extern void BXMIDIMT32_AddConfigSection(Config *conf); | ||
|
||
#endif /* BXMIDIConfig_hpp */ |