Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Bronco 40 amps, cabinets and effects #21

Open
wants to merge 2 commits into
base: 20-bronco
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"configurations": [
{
"name": "Linux",
"includePath": [
"${workspaceFolder}/**"
],
"defines": [],
"compilerPath": "/usr/bin/clang-14",
"cStandard": "c17",
"cppStandard": "c++14",
"intelliSenseMode": "linux-clang-x64"
}
],
"version": 4
}
9 changes: 9 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"files.associations": {
"*.embeddedhtml": "html",
"*.moc": "cpp",
"array": "cpp",
"string": "cpp",
"string_view": "cpp"
}
}
40 changes: 27 additions & 13 deletions include/com/IdLookup.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ namespace plug
case 0x6d:
return amps::METAL_2000;

// Bronco amps
// Bronco 40 amps
case 0x96:
return amps::RUMBLE;
case 0x97:
Expand Down Expand Up @@ -159,6 +159,17 @@ namespace plug
return effects::FENDER_63_SPRING_REVERB;
case 0x0b:
return effects::FENDER_65_SPRING_REVERB;

// Bronco 40 effects
case 0xc6:
return effects::MODERN_BASS_OVERDRIVE;
case 0xc3:
return effects::OVERDRIVE_BASS;
case 0xc7:
return effects::FUZZ_BASS;
case 0xba:
return effects::GREENBOX;

default:
throw std::invalid_argument{"Invalid effect id: " + std::to_string(id)};
}
Expand All @@ -167,34 +178,37 @@ namespace plug

constexpr cabinets lookupCabinetById(std::uint8_t id)
{
// Bronco 40 cabinets
switch (id)
{
case 0x00:
return cabinets::OFF;
case 0x01:
return cabinets::cab57DLX;
return cabinets::cab1x10M;
case 0x02:
return cabinets::cabBSSMN;
return cabinets::cab2x10M;
case 0x03:
return cabinets::cab65DLX;
return cabinets::cab4x10M;
case 0x04:
return cabinets::cab65PRN;
return cabinets::cab4x10H;
case 0x05:
return cabinets::cabCHAMP;
return cabinets::cab8x10M;
case 0x06:
return cabinets::cab4x12M;
return cabinets::cab8x10V;
case 0x07:
return cabinets::cab2x12C;
return cabinets::cab1x12M;
case 0x08:
return cabinets::cab4x12G;
return cabinets::cab2x15V;
case 0x09:
return cabinets::cab65TWN;
return cabinets::cab4x12M;
case 0x0a:
return cabinets::cab4x12V;
return cabinets::cab1x15V;
case 0x0b:
return cabinets::cabSS212;
return cabinets::cab1x15M;
case 0x0c:
return cabinets::cabSS112;
return cabinets::cab1x18V;
case 0x0d:
return cabinets::cab4x10V;
default:
throw std::invalid_argument{"Invalid cabinet id: " + std::to_string(id)};
}
Expand Down
27 changes: 24 additions & 3 deletions include/effects_enum.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ namespace plug
// list of all amplifiers
enum class amps
{
// Mustang amps
FENDER_57_DELUXE,
FENDER_59_BASSMAN,
FENDER_57_CHAMP,
Expand All @@ -42,7 +43,7 @@ namespace plug
AMERICAN_90S,
METAL_2000,

// Bronco amps
// Bronco 40 amps
RUMBLE,
BASSMAN_TV,
BASSMAN_300,
Expand Down Expand Up @@ -96,7 +97,13 @@ namespace plug
AMBIENT_REVERB,
ARENA_REVERB,
FENDER_63_SPRING_REVERB,
FENDER_65_SPRING_REVERB
FENDER_65_SPRING_REVERB,

// Bronco 40 effects
MODERN_BASS_OVERDRIVE,
OVERDRIVE_BASS,
FUZZ_BASS,
GREENBOX
};

// list of all cabinets
Expand All @@ -114,7 +121,21 @@ namespace plug
cab65TWN,
cab4x12V,
cabSS212,
cabSS112
cabSS112,

// Bronco 40 cabinets
cab1x10M,
cab2x10M,
cab4x10M,
cab4x10H,
cab4x10V,
cab8x10M,
cab8x10V,
cab1x12M,
cab1x15V,
cab1x15M,
cab2x15V,
cab1x18V
};


Expand Down
Binary file added plug
Binary file not shown.
34 changes: 17 additions & 17 deletions src/ui/amplifier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ namespace plug
: QMainWindow(parent),
ui(std::make_unique<Ui::Amplifier>()),
advanced(std::make_unique<Amp_Advanced>(this)),
amp_num(amps::FENDER_57_DELUXE),
amp_num(amps::FENDER_59_BASSMAN),
gain(0),
volume(0),
treble(0),
Expand Down Expand Up @@ -267,48 +267,48 @@ namespace plug
setAccessibleName("Amplifier: Metal 2000");
break;

// TODO: Bronco amps
// TODO: Bronco 40 amps
case amps::RUMBLE:
advanced->change_cabinet(value(cabinets::cab65PRN));
advanced->change_cabinet(value(cabinets::OFF));
advanced->change_noise_gate(0);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Btw. do we have to figure out this noise gate setting?

setWindowTitle("Amplifier: Fender Rumble");
setAccessibleName("Amplifier: Fender Rumble");
break;
case amps::BASSMAN_TV:
advanced->change_cabinet(value(cabinets::cab65PRN));
advanced->change_cabinet(value(cabinets::OFF));
advanced->change_noise_gate(0);
setWindowTitle("Amplifier: Fender Bassman TV");
setAccessibleName("Amplifier: Fender Bassman TV");
break;
case amps::BASSMAN_300:
advanced->change_cabinet(value(cabinets::cab65PRN));
advanced->change_cabinet(value(cabinets::OFF));
advanced->change_noise_gate(0);
setWindowTitle("Amplifier: Fender Bassman 300");
setAccessibleName("Amplifier: Fender Bassman 300");
break;
case amps::KGB_800:
advanced->change_cabinet(value(cabinets::cab65PRN));
advanced->change_cabinet(value(cabinets::OFF));
advanced->change_noise_gate(0);
setWindowTitle("Amplifier: Fender KGB 800");
setAccessibleName("Amplifier: Fender KGB 800");
setWindowTitle("Amplifier: KGB 800");
setAccessibleName("Amplifier: KGB 800");
break;
case amps::ROCKIN_PEG:
advanced->change_cabinet(value(cabinets::cab65PRN));
advanced->change_cabinet(value(cabinets::OFF));
advanced->change_noise_gate(0);
setWindowTitle("Amplifier: Fender Rockin' PEG");
setAccessibleName("Amplifier: Fender Rockin' PEG");
setWindowTitle("Amplifier: Rockin' PEG");
setAccessibleName("Amplifier: Rockin' PEG");
break;
case amps::SWR_REDHEAD:
advanced->change_cabinet(value(cabinets::cab65PRN));
advanced->change_cabinet(value(cabinets::OFF));
advanced->change_noise_gate(0);
setWindowTitle("Amplifier: Fender SWR Redhead");
setAccessibleName("Amplifier: Fender SWR Redhead");
setWindowTitle("Amplifier: SWR Redhead");
setAccessibleName("Amplifier: SWR Redhead");
break;
case amps::MONSTER:
advanced->change_cabinet(value(cabinets::cab65PRN));
advanced->change_cabinet(value(cabinets::OFF));
advanced->change_noise_gate(0);
setWindowTitle("Amplifier: Fender Monster");
setAccessibleName("Amplifier: Fender Monster");
setWindowTitle("Amplifier: Monster");
setAccessibleName("Amplifier: Monster");
break;
default:
break;
Expand Down
37 changes: 36 additions & 1 deletion src/ui/amplifier.ui
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
<string>Allows you to choose amplifier to emulate</string>
</property>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As above.

<property name="maxVisibleItems">
<number>12</number>
<number>19</number>
</property>
<item>
<property name="text">
Expand Down Expand Up @@ -116,6 +116,41 @@
<string>Metal 2000</string>
</property>
</item>
<item>
<property name="text">
<string>Rumble</string>
</property>
</item>
<item>
<property name="text">
<string>Bassman TV</string>
</property>
</item>
<item>
<property name="text">
<string>Bassman 300</string>
</property>
</item>
<item>
<property name="text">
<string>KGB 800</string>
</property>
</item>
<item>
<property name="text">
<string>Rockin' Peg</string>
</property>
</item>
<item>
<property name="text">
<string>SWR Redhead</string>
</property>
</item>
<item>
<property name="text">
<string>Monster</string>
</property>
</item>
</widget>
</item>
<item>
Expand Down
4 changes: 4 additions & 0 deletions src/ui/defaulteffects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,10 @@ namespace plug
tr("When you choose an effect you can set precise value of a parameter here")});
break;
case effects::OVERDRIVE:
case effects::MODERN_BASS_OVERDRIVE:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a Bronce comment to those so we can determine later.

case effects::OVERDRIVE_BASS:
case effects::FUZZ_BASS:
case effects::GREENBOX:
setTexts(ui.get(),
UIText{
tr("&Level"),
Expand Down
32 changes: 31 additions & 1 deletion src/ui/defaulteffects.ui
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,40 @@
<string>None</string>
</property>
</item>

<!-- Bronco 40 effects -->
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remark: The .ui files are created by Qt Designer (usually) , so comments wont last long here. Having the comments in the source files is enough.

<item>
<property name="text">
<string>[1] Modern Bass Overdrive</string>
</property>
</item>
<item>
<property name="text">
<string>[1] Overdrive</string>
</property>
</item>
<item>
<property name="text">
<string>[1] Fuzz</string>
</property>
</item>
<item>
<property name="text">
<string>[1] Greenbox</string>
</property>
</item>
<item>
<property name="text">
<string>[1] Simple Compressor</string>
</property>
</item>

<!--
<item>
<property name="text">
<string>[1] Overdrive</string>
</property>
</item>
<item>
<property name="text">
<string>[1] Fixed Wah</string>
Expand Down Expand Up @@ -86,7 +115,8 @@
<string>[1] Compressor</string>
</property>
</item>
<item>
-->
<item>
<property name="text">
<string>[2] Sine Chorus</string>
</property>
Expand Down
Loading