-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
49 additions
and
15 deletions.
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 |
---|---|---|
@@ -1,45 +1,54 @@ | ||
#pragma once | ||
|
||
#include <Arduino.h> | ||
|
||
#include "AxeEffectEnum.h" | ||
|
||
typedef byte Channel; | ||
typedef unsigned EffectId; | ||
|
||
class AxeSystem; | ||
class AxeEffect { | ||
|
||
public: | ||
friend class AxeSystem; | ||
|
||
void setEffectId(EffectId effectId) { _effectId = effectId; } | ||
public: | ||
|
||
EffectId getEffectId() { return _effectId; } | ||
|
||
void copyEffectName(char *buffer, size_t max); | ||
void copyEffectTag(char *buffer, size_t max); | ||
|
||
void setChannel(Channel channel) { _channel = channel; } | ||
byte getChannelCount() { return _numChannels; } | ||
Channel getChannel() { return _channel; } | ||
|
||
char getChannelChar(); | ||
|
||
void setChannelCount(byte count) { _numChannels = count; } | ||
byte getChannelCount() { return _numChannels; } | ||
|
||
bool isBypassed() { return _bypassed; } | ||
void setBypassed(bool bypassed) { _bypassed = bypassed; } | ||
bool isSwitchable(); | ||
|
||
bool isDrive(); | ||
bool isDelay(); | ||
bool isReverb(); | ||
|
||
private: | ||
void bypass(); | ||
void enable(); | ||
void switchChannel(Channel channel); | ||
|
||
protected: | ||
|
||
void setAxeSystem(AxeSystem *axe) { _axe = axe; } | ||
void setBypassed(bool bypassed) { _bypassed = bypassed; } | ||
void setChannelCount(byte count) { _numChannels = count; } | ||
void setChannel(Channel channel) { _channel = channel; } | ||
void setEffectId(EffectId effectId) { _effectId = effectId; } | ||
void copyEffectNameAndTag(EffectId effectId, char *name, byte szName, char *tag, byte szTag); | ||
|
||
private: | ||
|
||
EffectId _effectId; | ||
Channel _channel; | ||
byte _numChannels; | ||
bool _bypassed; | ||
|
||
AxeSystem *_axe = nullptr; | ||
|
||
}; |
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
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