Skip to content

Commit

Permalink
naming conventions changes and working on surge-synthesizer#12
Browse files Browse the repository at this point in the history
  • Loading branch information
kurasu committed Sep 26, 2018
1 parent f3ff691 commit a20381d
Show file tree
Hide file tree
Showing 11 changed files with 2,603 additions and 2,690 deletions.
28 changes: 14 additions & 14 deletions src/common/AbstractSynthesizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@ void initDllGlobals();
class AbstractSynthesizer
{
public:
virtual void play_note(char channel, char key, char velocity, char detune) = 0;
virtual void pitch_bend(char channel, int value) = 0;
virtual void channel_aftertouch(char channel, int value)
virtual void playNote(char channel, char key, char velocity, char detune) = 0;
virtual void pitchBend(char channel, int value) = 0;
virtual void channelAftertouch(char channel, int value)
{}
virtual void program_change(char channel, int value)
virtual void programChange(char channel, int value)
{}
virtual void poly_aftertouch(char channel, int key, int value)
virtual void polyAftertouch(char channel, int key, int value)
{}
virtual void channel_controller(char channel, int cc, int value)
virtual void channelController(char channel, int cc, int value)
{}
virtual void release_note(char channel, char key, char velocity)
virtual void releaseNote(char channel, char key, char velocity)
{}
virtual bool
setParameter01(long index, float value, bool external = false, bool force_integer = false) = 0;
Expand All @@ -47,23 +47,23 @@ class AbstractSynthesizer
virtual void getParameterDisplay(long index, char* text, float x) = 0;
virtual void getParameterName(long index, char* text) = 0;
virtual void getParameterMeta(long index, parametermeta& pm) = 0;
virtual void all_notes_off() = 0;
virtual void set_samplerate(float sr) = 0;
virtual int get_n_inputs()
virtual void allNotesOff() = 0;
virtual void setSamplerate(float sr) = 0;
virtual int getNumInputs()
{
return n_inputs;
}
virtual int get_n_outputs()
virtual int getNumOutputs()
{
return n_outputs;
}
virtual int get_block_size()
virtual int getBlockSize()
{
return block_size;
}
virtual void process() = 0;
virtual void load_raw(const void* data, int size, bool preset = false) = 0;
virtual unsigned int save_raw(void** data) = 0;
virtual void loadRaw(const void* data, int size, bool preset = false) = 0;
virtual unsigned int saveRaw(void** data) = 0;

public:
_MM_ALIGN16 float output[n_outputs][block_size];
Expand Down
12 changes: 6 additions & 6 deletions src/common/ModulationSource.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,19 +108,19 @@ const int modsource_grid_xy[n_modsources][2] = {
{6, 4} // Timbre
};

inline bool is_scenelevel(int ms)
inline bool isScenelevel(int ms)
{
return ((ms <= ms_ctrl8) || ((ms >= ms_slfo1) && (ms <= ms_slfo6))) && (ms != ms_velocity) &&
(ms != ms_keytrack) && (ms != ms_polyaftertouch) && (ms != ms_timbre) &&
(ms != ms_aftertouch);
}

inline bool is_customcontroller(int ms)
inline bool isCustomController(int ms)
{
return (ms >= ms_ctrl1) && (ms <= ms_ctrl8);
}

inline bool is_envelope(int ms)
inline bool isEnvelope(int ms)
{
return (ms == ms_ampeg) || (ms == ms_filtereg);
}
Expand All @@ -130,18 +130,18 @@ inline bool isLFO(int ms)
return (ms >= ms_lfo1) && (ms <= ms_slfo6);
}

inline bool can_modulate_modulators(int ms)
inline bool canModulateModulators(int ms)
{
return /*(ms <= ms_ctrl8)&&*/ (ms != ms_ampeg) &&
(ms != ms_filtereg); //&&(ms!=ms_velocity)&&(ms!=ms_keytrack)&&(ms!=ms_polyaftertouch);
}

inline bool is_voice_modulator(int ms)
inline bool isVoiceModulator(int ms)
{
return !((ms >= ms_slfo1) && (ms <= ms_slfo6));
}

inline bool can_modulate_voice_modulators(int ms)
inline bool canModulateVoiceModulators(int ms)
{
return (ms <= ms_ctrl8) || ms == ms_timbre;
}
Expand Down
5 changes: 2 additions & 3 deletions src/common/SurgePatch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -986,15 +986,14 @@ void SurgePatch::load_xml(const void* data, int datasize, bool is_preset)

if (sceneId != 0)
{
if (is_scenelevel(modsource))
if (isScenelevel(modsource))
modlist = &scene[sceneId - 1].modulation_scene;
else
modlist = &scene[sceneId - 1].modulation_voice;
}
else
{
if (is_scenelevel(modsource))
modlist = &modulation_global;
modlist = &modulation_global;
}

ModulationRouting t;
Expand Down
Loading

0 comments on commit a20381d

Please sign in to comment.