Add more V2 models to test. Add control of bright switch

This commit is contained in:
hirsch 2016-09-03 09:04:31 -04:00
parent b221c2fdce
commit b7ab9d0c46
3 changed files with 40 additions and 7 deletions

30
amp.h
View file

@ -11,7 +11,6 @@ class Mustang;
// F57 Champ // F57 Champ
// F65 Deluxe // F65 Deluxe
// F65 Princeton // F65 Princeton
// F65 Twin
// 60s Thrift // 60s Thrift
// //
class AmpCC { class AmpCC {
@ -76,6 +75,8 @@ private:
} }
// Noise Gate Custom Depth // Noise Gate Custom Depth
virtual int cc91( int value, unsigned char *cmd ) { return continuous_control( 0x09, 0x09, 0x0c, value, cmd );} virtual int cc91( int value, unsigned char *cmd ) { return continuous_control( 0x09, 0x09, 0x0c, value, cmd );}
// Dummy in base class
virtual int cc92( int value, unsigned char *cmd ) { return -1;}
}; };
@ -116,6 +117,15 @@ private:
virtual int cc78( int value, unsigned char *cmd ) { return continuous_control( 0x07, 0x07, 0x0c, value, cmd );} virtual int cc78( int value, unsigned char *cmd ) { return continuous_control( 0x07, 0x07, 0x0c, value, cmd );}
// Master Volume // Master Volume
virtual int cc79( int value, unsigned char *cmd ) { return continuous_control( 0x03, 0x03, 0x0c, value, cmd );} virtual int cc79( int value, unsigned char *cmd ) { return continuous_control( 0x03, 0x03, 0x0c, value, cmd );}
// Bright Switch
virtual int cc92( int value, unsigned char *cmd ) {
// Inverted logic
unsigned char flag;
// 0 --> Bright On
if ( value>63 && value <=127 ) flag = 0;
else flag = 1;
return discrete_control( 0x14, 0x14, 0x8d, value, cmd );
}
}; };
@ -172,6 +182,24 @@ private:
}; };
// F65 Twin
//
class AmpCC8 : public AmpCC {
public:
AmpCC8( Mustang * theAmp, const unsigned char *model, const unsigned char theSlot ) : AmpCC(theAmp,model,theSlot) {}
private:
// Bright Switch
virtual int cc92( int value, unsigned char *cmd ) {
// Inverted logic
unsigned char flag;
// 0 --> Bright On
if ( value>63 && value <=127 ) flag = 0;
else flag = 1;
return discrete_control( 0x14, 0x14, 0x8d, value, cmd );
}
};
// Null Amp // Null Amp
// //
class NullAmpCC : public AmpCC { class NullAmpCC : public AmpCC {

View file

@ -527,7 +527,6 @@ Mustang::updateAmpObj( const unsigned char *data ) {
match16(f57_champ_id,model) || match16(f57_champ_id,model) ||
match16(f65_deluxe_id,model) || match16(f65_deluxe_id,model) ||
match16(f65_princeton_id,model) || match16(f65_princeton_id,model) ||
match16(f65_twin_id,model) ||
match16(s60s_thrift_id,model) ) { match16(s60s_thrift_id,model) ) {
new_amp = new AmpCC( this, model, 0 ); new_amp = new AmpCC( this, model, 0 );
} }
@ -556,6 +555,9 @@ Mustang::updateAmpObj( const unsigned char *data ) {
else if ( match16(f57_twin_id,model) ) { else if ( match16(f57_twin_id,model) ) {
new_amp = new AmpCC7( this, model, 0 ); new_amp = new AmpCC7( this, model, 0 );
} }
else if ( match16(f65_twin_id,model) ) {
new_amp = new AmpCC8( this, model, 0 );
}
else if ( match16(null_amp_id,model) ) { else if ( match16(null_amp_id,model) ) {
new_amp = new NullAmpCC( this, model, 0 ); new_amp = new NullAmpCC( this, model, 0 );
} }

View file

@ -346,8 +346,11 @@ if single == "all" or single == "delay":
# Model Ctrl v2only # Model Ctrl v2only
delay_test = ( delay_test = (
( "Mono Delay", 1, "AAAAA", False ), ( "Mono Delay", 1, "AAAAA", False ),
( "Mono Echo Filter", 2, "AAAAAA", False ),
( "Stereo Echo Filter", 3, "AAAAAA", False ),
( "Multitap", 4, "AAAAD03", False ), ( "Multitap", 4, "AAAAD03", False ),
( "Tape Delay", 8, "AAAAA", False ) ( "Tape Delay", 8, "AAAAAA", False ),
( "Stereo Tape Delay", 9, "AAAAAA", False )
) )
run_delay_test( delay_test, outport ) run_delay_test( delay_test, outport )
@ -355,8 +358,8 @@ if single == "all" or single == "amp":
# Model, Ctrl v2only # Model, Ctrl v2only
amp_test = ( amp_test = (
( "Studio Preamp", 13, "AAAAA--D04D12", True ), ( "Studio Preamp", 13, "AAAAA--D04D12", True ),
# Test custom noise gate and bright switch
( "Fender 65 Twin", 6, "AAAAAD02AD04D12", False ), ( "Fender 65 Twin", 6, "AAAAAD02AD04D12--D09AD01", False ),
( "Fender SuperSonic", 7, "AAAAAD02AD04D12AA", False ), ( "Fender SuperSonic", 7, "AAAAAD02AD04D12AA", False ),
( "British 60s", 8, "AAAAAD02AD04D12AA", False ), ( "British 60s", 8, "AAAAAD02AD04D12AA", False ),
( "British 70s", 9, "AAAAAD02AD04D12AA", False ), ( "British 70s", 9, "AAAAAD02AD04D12AA", False ),