-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathSystem.cpp
More file actions
82 lines (66 loc) · 1.74 KB
/
Copy pathSystem.cpp
File metadata and controls
82 lines (66 loc) · 1.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
// Copyright (C) 2022-2025 Theo Niessink <theo@taletn.com>
// This work is free. You can redistribute it and/or modify it under the
// terms of the Do What The Fuck You Want To Public License, Version 2,
// as published by Sam Hocevar. See http://www.wtfpl.net/ for more details.
#include "System.h"
namespace TG101 {
void System::Init()
{
Reset();
SetDeviceNo(kDeviceNoAll);
SetSoundModuleMode(kModeGeneralMidi);
SetVelocityMeter(kVelocityMeterAuto);
}
void System::Reset()
{
SetMasterTune(128);
SetTranspose(64);
SetEnable(kEnableSysEx, true);
SetEnable(kEnableProgramChange, true);
SetEnable(kEnableControlChange, true);
SetMasterVolume(127);
}
void MultiCommon::Init()
{
Reset();
mBuf[3] = mBuf[4] = mBuf[5] = 0;
}
void MultiCommon::Reset()
{
SetReverbType(kReverbHall1);
SetReverbTime(33); // GetReverbTime(kReverbHall1)
SetReverbOutputLevel(62); // GetReverbOutputLevel(kReverbHall1)
}
int MultiCommon::GetReverbTime(const EReverbType type)
{
assert(type >= 0 && type < kNumReverbTypes);
static const unsigned char tbl[kNumReverbTypes] =
{
33, // kReverbHall1
41, // kReverbHall2
20, // kReverbRoom1
14, // kReverbRoom2
7, // kReverbPlate1
15, // kReverbPlate2
40, // kReverbDelay1
35 // kReverbDelay2
};
return tbl[(unsigned int)type];
}
int MultiCommon::GetReverbOutputLevel(const EReverbType type)
{
assert(type >= 0 && type < kNumReverbTypes);
static const unsigned char tbl[kNumReverbTypes] =
{
62, // kReverbHall1
65, // kReverbHall2
66, // kReverbRoom1
67, // kReverbRoom2
68, // kReverbPlate1
60, // kReverbPlate2
65, // kReverbDelay1
63 // kReverbDelay2
};
return tbl[(unsigned int)type];
}
} // namespace TG101