Browse Source

Extend globals

main
heck 7 months ago
parent
commit
db19e4b847
  1. 42
      src/globals.hh
  2. 2
      src/instr_abstract.hh

42
src/globals.hh

@ -2,7 +2,14 @@
#define HECK_DAISY_GLOBALS_HH
#include <cstdint>
namespace Constants {
#include "daisy_seed.h"
#include "daisysp.h"
namespace Heck {
namespace ld = daisy;
namespace dsp = daisysp;
namespace Constants {
constexpr int BUFFERSIZE = 4;
constexpr int SAMPLERATE = 48000;
constexpr int TRACK_COUNT = 4;
@ -15,20 +22,29 @@ namespace Constants {
constexpr int TRACK_FILTER = 74;
constexpr int TRACK_DRIVE = 75;
constexpr int TRACK_VOLUME = 76;
constexpr int TRACK_MODE1 = 78;
constexpr int TRACK_MODE2 = 79;
constexpr int TRACK_FILTERMODE = 80;
} // namespace MIDI_Mapping
} // namespace Constants
} // namespace Constants
// Types
using u8 = uint8_t;
using u16 = uint16_t;
using u32 = uint32_t;
using u64 = uint64_t;
using i8 = int8_t;
using i16 = int16_t;
using i32 = int32_t;
using i64 = int64_t;
using f32 = float;
using f64 = double;
// Types
using u8 = uint8_t;
using u16 = uint16_t;
using u32 = uint32_t;
using u64 = uint64_t;
//Hardware
extern ld::DaisySeed hw;
} // namespace Heck
using i8 = int8_t;
using i16 = int16_t;
using i32 = int32_t;
using i64 = int64_t;
using f32 = float;
using f64 = double;
#endif

2
src/instr_abstract.hh

@ -5,7 +5,7 @@
namespace Heck {
namespace Instrument {
int samplerate = Constants::SAMPLERATE;
static int samplerate = Constants::SAMPLERATE;
class AbstractInstrument {
public:

Loading…
Cancel
Save