2022-10-09 05:13:17 +00:00
|
|
|
#ifndef _MUSYX_SYNTH
|
|
|
|
#define _MUSYX_SYNTH
|
2022-08-11 08:12:35 +00:00
|
|
|
|
|
|
|
#include "musyx/musyx_priv.h"
|
2022-10-10 09:46:24 +00:00
|
|
|
#ifdef __cplusplus
|
2022-08-11 08:12:35 +00:00
|
|
|
extern "C" {
|
2022-09-18 06:05:46 +00:00
|
|
|
#endif
|
|
|
|
|
2022-08-11 08:12:35 +00:00
|
|
|
extern SND_AUX_CALLBACK synthAuxACallback[8];
|
|
|
|
extern u8 synthAuxAMIDI[8];
|
|
|
|
extern u8 synthAuxAMIDISet[8];
|
|
|
|
extern void* synthAuxAUser[8];
|
|
|
|
extern SND_AUX_CALLBACK synthAuxBCallback[8];
|
|
|
|
extern u8 synthAuxBMIDI[8];
|
|
|
|
extern u8 synthAuxBMIDISet[8];
|
|
|
|
extern void* synthAuxBUser[8];
|
|
|
|
|
2023-02-28 18:19:12 +00:00
|
|
|
extern synthITDInfo synthITDDefault[8];
|
2022-12-18 02:31:07 +00:00
|
|
|
extern u32 synthFlags;
|
|
|
|
|
2023-02-27 14:14:29 +00:00
|
|
|
u32 vidGetInternalId(SND_VOICEID id);
|
2023-10-19 17:10:36 +00:00
|
|
|
void synthKeyStateUpdate(SYNTH_VOICE* svoice);
|
2022-08-11 08:12:35 +00:00
|
|
|
bool synthFXSetCtrl(SND_VOICEID vid, u8 ctrl, u8 value);
|
|
|
|
bool synthFXSetCtrl14(SND_VOICEID vid, u8 ctrl, u16 value);
|
|
|
|
bool synthSendKeyOff(SND_VOICEID vid);
|
2023-06-23 07:31:12 +00:00
|
|
|
SND_VOICEID synthFXStart(u16 fid, u8 vol, u8 pan, u8 studio, u32 itd);
|
2023-07-01 02:05:40 +00:00
|
|
|
void synthVolume(u8 volume, u16 time, u8 vGroup, u8 seqMode, u32 seqId);
|
2023-07-04 14:39:03 +00:00
|
|
|
u32 synthStartSound(u16 id, u8 prio, u8 max,
|
2023-10-21 07:40:09 +00:00
|
|
|
#if MUSY_VERSION >= MUSY_VERSION_CHECK(2, 0, 1)
|
2023-07-05 21:57:50 +00:00
|
|
|
u32 sourceID,
|
2023-07-04 14:39:03 +00:00
|
|
|
#endif
|
|
|
|
u8 key, u8 vol, u8 panning, u8 midi, u8 midiSet, u8 section, u16 step,
|
|
|
|
u16 trackid, u8 vGroup, s16 prioOffset, u8 studio, u32 itd);
|
2023-07-01 02:05:40 +00:00
|
|
|
bool synthIsFadeOutActive(u8 vGroup);
|
2022-08-11 08:12:35 +00:00
|
|
|
|
|
|
|
/* TODO: Move this where it belongs */
|
2022-09-18 06:05:46 +00:00
|
|
|
void hwSetAUXProcessingCallbacks(u8 studio, SND_AUX_CALLBACK auxA, void* userA,
|
|
|
|
SND_AUX_CALLBACK auxB, void* userB);
|
2023-10-21 17:48:50 +00:00
|
|
|
u32 voiceBlock(u8 prio);
|
2023-10-19 17:10:36 +00:00
|
|
|
MSTEP* dataGetMacro(u16 mid);
|
|
|
|
|
|
|
|
u32 voiceAllocate(u8 priority, u8 maxVoices, u16 allocId, u8 fxFlag);
|
2023-10-21 17:29:58 +00:00
|
|
|
|
|
|
|
#if MUSY_VERSION >= MUSY_VERSION_CHECK(2, 0, 3)
|
|
|
|
int voiceAllocatePeek(u8 priority, u8 maxVoices, u32 allocId, u8 fxFlag, u32 * currentAllocId);
|
|
|
|
#endif
|
|
|
|
|
2023-10-19 17:10:36 +00:00
|
|
|
void voiceFree(SYNTH_VOICE* svoice);
|
2023-10-21 07:40:09 +00:00
|
|
|
void synthActivateStudio(u8 studio, u32 isMaster, SND_STUDIO_TYPE type);
|
|
|
|
void synthDeactivateStudio(u8 studio);
|
|
|
|
u8 synthFXGetMaxVoices(u16 fid);
|
|
|
|
void synthPauseVolume(u8 volume, u16 time, u8 vGroup);
|
|
|
|
bool dataRemoveFX(u16 gid);
|
2023-10-21 23:00:13 +00:00
|
|
|
void voiceUnblock(u32 voice);
|
2023-10-27 02:55:01 +00:00
|
|
|
void voiceRemovePriority(SYNTH_VOICE* svoice);
|
2022-10-10 09:46:24 +00:00
|
|
|
#ifdef __cplusplus
|
2022-08-11 08:12:35 +00:00
|
|
|
}
|
2022-09-18 06:05:46 +00:00
|
|
|
#endif
|
|
|
|
|
2022-10-09 05:13:17 +00:00
|
|
|
#endif // _MUSYX_SYNTH
|