Update channel aftertouch API

and version numbers in new APIs
This commit is contained in:
Paul Fd 2021-04-15 23:14:55 +02:00
parent 45f1ebff9b
commit 93f907f0ca
10 changed files with 100 additions and 55 deletions

View file

@ -95,7 +95,7 @@ int process(jack_nframes_t numFrames, void* arg)
// Not implemented // Not implemented
break; break;
case midi::channelPressure: case midi::channelPressure:
synth->aftertouch(event.time, event.buffer[1]); synth->channelAftertouch(event.time, event.buffer[1]);
break; break;
case midi::pitchBend: case midi::pitchBend:
synth->pitchWheel(event.time, midi::buildAndCenterPitch(event.buffer[1], event.buffer[2])); synth->pitchWheel(event.time, midi::buildAndCenterPitch(event.buffer[1], event.buffer[2]));

View file

@ -695,7 +695,7 @@ sfizz_lv2_process_midi_event(sfizz_plugin_t *self, const LV2_Atom_Event *ev)
break; break;
#endif #endif
case LV2_MIDI_MSG_CHANNEL_PRESSURE: case LV2_MIDI_MSG_CHANNEL_PRESSURE:
sfizz_send_aftertouch(self->synth, sfizz_send_channel_aftertouch(self->synth,
(int)ev->time.frames, (int)ev->time.frames,
msg[1]); msg[1]);
break; break;

View file

@ -383,7 +383,7 @@ void SfizzVstProcessor::playOrderedParameter(int32 sampleOffset, Vst::ParamID id
_state.oscillatorQuality = static_cast<int32>(range.denormalize(value)); _state.oscillatorQuality = static_cast<int32>(range.denormalize(value));
break; break;
case kPidAftertouch: case kPidAftertouch:
synth.hdAftertouch(sampleOffset, value); synth.hdChannelAftertouch(sampleOffset, value);
break; break;
case kPidPitchBend: case kPidPitchBend:
synth.hdPitchWheel(sampleOffset, range.denormalize(value)); synth.hdPitchWheel(sampleOffset, range.denormalize(value));

View file

@ -99,7 +99,7 @@ SFIZZ_EXPORTED_API void sfizz_free(sfizz_synth_t* synth);
/** /**
* @brief Adds a reference to an existing sfizz synth. * @brief Adds a reference to an existing sfizz synth.
* @since 0.6.0 * @since 1.0.0
* *
* @param synth The synth to reference. * @param synth The synth to reference.
*/ */
@ -349,7 +349,7 @@ SFIZZ_EXPORTED_API void sfizz_send_note_on(sfizz_synth_t* synth, int delay, int
/** /**
* @brief Send a high-precision on event to the synth. * @brief Send a high-precision on event to the synth.
* @since 0.6.0 * @since 1.0.0
* *
* This command should be delay-ordered with all other midi-type events * This command should be delay-ordered with all other midi-type events
* (notes, CCs, aftertouch and pitch-wheel), otherwise the behavior of the * (notes, CCs, aftertouch and pitch-wheel), otherwise the behavior of the
@ -388,7 +388,7 @@ SFIZZ_EXPORTED_API void sfizz_send_note_off(sfizz_synth_t* synth, int delay, int
/** /**
* @brief Send a high-precision note off event to the synth. * @brief Send a high-precision note off event to the synth.
* @since 0.6.0 * @since 1.0.0
* *
* This command should be delay-ordered with all other midi-type events * This command should be delay-ordered with all other midi-type events
* (notes, CCs, aftertouch and pitch-wheel), otherwise the behavior of the * (notes, CCs, aftertouch and pitch-wheel), otherwise the behavior of the
@ -445,7 +445,7 @@ SFIZZ_EXPORTED_API void sfizz_send_hdcc(sfizz_synth_t* synth, int delay, int cc_
/** /**
* @brief Send a high precision CC automation to the synth. * @brief Send a high precision CC automation to the synth.
* @since 0.6.0 * @since 1.0.0
* *
* This updates the CC value known to the synth, but without performing * This updates the CC value known to the synth, but without performing
* additional MIDI-specific interpretations. (eg. the CC 120 and up) * additional MIDI-specific interpretations. (eg. the CC 120 and up)
@ -483,7 +483,7 @@ SFIZZ_EXPORTED_API void sfizz_send_pitch_wheel(sfizz_synth_t* synth, int delay,
/** /**
* @brief Send a high-precision pitch wheel event. * @brief Send a high-precision pitch wheel event.
* @since 0.6.0 * @since 1.0.0
* *
* This command should be delay-ordered with all other midi-type events * This command should be delay-ordered with all other midi-type events
* (notes, CCs, aftertouch and pitch-wheel), otherwise the behavior of the * (notes, CCs, aftertouch and pitch-wheel), otherwise the behavior of the
@ -514,11 +514,29 @@ SFIZZ_EXPORTED_API void sfizz_send_hd_pitch_wheel(sfizz_synth_t* synth, int dela
* @par Thread-safety constraints * @par Thread-safety constraints
* - @b RT: the function must be invoked from the Real-time thread * - @b RT: the function must be invoked from the Real-time thread
*/ */
SFIZZ_EXPORTED_API void sfizz_send_aftertouch(sfizz_synth_t* synth, int delay, int aftertouch); SFIZZ_EXPORTED_API SFIZZ_DEPRECATED_API void sfizz_send_aftertouch(sfizz_synth_t* synth, int delay, int aftertouch);
/**
* @brief Send a channel aftertouch (channel pressure) event.
* @since 1.0.0
*
* This command should be delay-ordered with all other midi-type events
* (notes, CCs, aftertouch and pitch-wheel), otherwise the behavior of the
* synth is undefined.
*
* @param synth The synth.
* @param delay The delay at which the event occurs; this should be lower
* than the size of the block in the next call to renderBlock().
* @param aftertouch The aftertouch value, in domain 0 to 127.
*
* @par Thread-safety constraints
* - @b RT: the function must be invoked from the Real-time thread
*/
SFIZZ_EXPORTED_API void sfizz_send_channel_aftertouch(sfizz_synth_t* synth, int delay, int aftertouch);
/** /**
* @brief Send a high-precision aftertouch event. * @brief Send a high-precision aftertouch event.
* @since 0.6.0 * @since 1.0.0
* *
* This command should be delay-ordered with all other midi-type events * This command should be delay-ordered with all other midi-type events
* (notes, CCs, aftertouch and pitch-wheel), otherwise the behavior of the * (notes, CCs, aftertouch and pitch-wheel), otherwise the behavior of the
@ -532,12 +550,12 @@ SFIZZ_EXPORTED_API void sfizz_send_aftertouch(sfizz_synth_t* synth, int delay, i
* @par Thread-safety constraints * @par Thread-safety constraints
* - @b RT: the function must be invoked from the Real-time thread * - @b RT: the function must be invoked from the Real-time thread
*/ */
SFIZZ_EXPORTED_API void sfizz_send_hd_aftertouch(sfizz_synth_t* synth, int delay, float aftertouch); SFIZZ_EXPORTED_API void sfizz_send_hd_channel_aftertouch(sfizz_synth_t* synth, int delay, float aftertouch);
/** /**
* @brief Send a polyphonic aftertouch event. * @brief Send a polyphonic aftertouch event.
* This feature is experimental and needs more testing in the internal engine. * This feature is experimental and needs more testing in the internal engine.
* @since 0.6.0 * @since 1.0.0
* *
* This command should be delay-ordered with all other midi-type events * This command should be delay-ordered with all other midi-type events
* (notes, CCs, aftertouch and pitch-wheel), otherwise the behavior of the * (notes, CCs, aftertouch and pitch-wheel), otherwise the behavior of the
@ -557,7 +575,7 @@ SFIZZ_EXPORTED_API void sfizz_send_poly_aftertouch(sfizz_synth_t* synth, int del
/** /**
* @brief Send a high-precision polyphonic aftertouch event. * @brief Send a high-precision polyphonic aftertouch event.
* This feature is experimental and needs more testing in the internal engine. * This feature is experimental and needs more testing in the internal engine.
* @since 0.6.0 * @since 1.0.0
* *
* This command should be delay-ordered with all other midi-type events * This command should be delay-ordered with all other midi-type events
* (notes, CCs, aftertouch and pitch-wheel), otherwise the behavior of the * (notes, CCs, aftertouch and pitch-wheel), otherwise the behavior of the
@ -599,7 +617,7 @@ SFIZZ_EXPORTED_API SFIZZ_DEPRECATED_API void sfizz_send_tempo(sfizz_synth_t* syn
* tempo(), timeSignature(), timePosition(), and playbackState(), otherwise the behavior * tempo(), timeSignature(), timePosition(), and playbackState(), otherwise the behavior
* of the synth is undefined. * of the synth is undefined.
* *
* @since 0.6.0 * @since 1.0.0
* *
* @param synth The synth. * @param synth The synth.
* @param delay The delay. * @param delay The delay.
@ -785,7 +803,7 @@ SFIZZ_EXPORTED_API void sfizz_set_sample_quality(sfizz_synth_t* synth, sfizz_pro
* does not use the opcode `oscillator_quality`. The engine uses distinct * does not use the opcode `oscillator_quality`. The engine uses distinct
* default quality settings for live mode and freewheeling mode, * default quality settings for live mode and freewheeling mode,
* which both can be accessed by the means of this function. * which both can be accessed by the means of this function.
* @since 0.6.0 * @since 1.0.0
* *
* @param synth The synth. * @param synth The synth.
* @param[in] mode The processing mode. * @param[in] mode The processing mode.
@ -801,7 +819,7 @@ SFIZZ_EXPORTED_API int sfizz_get_oscillator_quality(sfizz_synth_t* synth, sfizz_
* does not use the opcode `oscillator_quality`. The engine uses distinct * does not use the opcode `oscillator_quality`. The engine uses distinct
* default quality settings for live mode and freewheeling mode, * default quality settings for live mode and freewheeling mode,
* which both can be accessed by the means of this function. * which both can be accessed by the means of this function.
* @since 0.6.0 * @since 1.0.0
* *
* @param synth The synth. * @param synth The synth.
* @param[in] mode The processing mode. * @param[in] mode The processing mode.
@ -1086,13 +1104,13 @@ SFIZZ_EXPORTED_API const char * sfizz_get_cc_label_text(sfizz_synth_t* synth, in
/** /**
* @brief Client for communicating with the synth engine in either direction * @brief Client for communicating with the synth engine in either direction
* @since 0.6.0 * @since 1.0.0
*/ */
typedef struct sfizz_client_t sfizz_client_t; typedef struct sfizz_client_t sfizz_client_t;
/** /**
* @brief Create a new messaging client * @brief Create a new messaging client
* @since 0.6.0 * @since 1.0.0
* *
* @param data The opaque data pointer which is passed to the receiver. * @param data The opaque data pointer which is passed to the receiver.
* @return The new client. * @return The new client.
@ -1101,7 +1119,7 @@ SFIZZ_EXPORTED_API sfizz_client_t* sfizz_create_client(void* data);
/** /**
* @brief Destroy a messaging client * @brief Destroy a messaging client
* @since 0.6.0 * @since 1.0.0
* *
* @param client The client. * @param client The client.
*/ */
@ -1109,7 +1127,7 @@ SFIZZ_EXPORTED_API void sfizz_delete_client(sfizz_client_t* client);
/** /**
* @brief Get the client data * @brief Get the client data
* @since 0.6.0 * @since 1.0.0
* *
* @param client The client. * @param client The client.
* @return The client data. * @return The client data.
@ -1118,7 +1136,7 @@ SFIZZ_EXPORTED_API void* sfizz_get_client_data(sfizz_client_t* client);
/** /**
* @brief Set the function which receives reply messages from the synth engine. * @brief Set the function which receives reply messages from the synth engine.
* @since 0.6.0 * @since 1.0.0
* *
* @param client The client. * @param client The client.
* @param receive The pointer to the receiving function. * @param receive The pointer to the receiving function.
@ -1127,7 +1145,7 @@ SFIZZ_EXPORTED_API void sfizz_set_receive_callback(sfizz_client_t* client, sfizz
/** /**
* @brief Send a message to the synth engine * @brief Send a message to the synth engine
* @since 0.6.0 * @since 1.0.0
* *
* @param synth The synth. * @param synth The synth.
* @param client The client sending the message. * @param client The client sending the message.
@ -1143,7 +1161,7 @@ SFIZZ_EXPORTED_API void sfizz_send_message(sfizz_synth_t* synth, sfizz_client_t*
/** /**
* @brief Set the function which receives broadcast messages from the synth engine. * @brief Set the function which receives broadcast messages from the synth engine.
* @since 0.6.0 * @since 1.0.0
* *
* @param synth The synth. * @param synth The synth.
* @param broadcast The pointer to the receiving function. * @param broadcast The pointer to the receiving function.

View file

@ -325,7 +325,7 @@ public:
* does not use the opcode `oscillator_quality`. The engine uses distinct * does not use the opcode `oscillator_quality`. The engine uses distinct
* default quality settings for live mode and freewheeling mode, * default quality settings for live mode and freewheeling mode,
* which both can be accessed by the means of this function. * which both can be accessed by the means of this function.
* @since 0.6.0 * @since 1.0.0
* *
* @param[in] mode The processing mode. * @param[in] mode The processing mode.
* *
@ -341,7 +341,7 @@ public:
* default quality settings for live mode and freewheeling mode, * default quality settings for live mode and freewheeling mode,
* which both can be accessed by the means of this function. * which both can be accessed by the means of this function.
* *
* @since 0.6.0 * @since 1.0.0
* *
* @param[in] mode The processing mode. * @param[in] mode The processing mode.
* @param[in] quality The desired oscillator quality, in the range 0 to 3. * @param[in] quality The desired oscillator quality, in the range 0 to 3.
@ -391,7 +391,7 @@ public:
/** /**
* @brief Send a high-precision note on event to the synth. * @brief Send a high-precision note on event to the synth.
* @since 0.6.0 * @since 1.0.0
* *
* This command should be delay-ordered with all other midi-type events * This command should be delay-ordered with all other midi-type events
* (notes, CCs, aftertouch and pitch-wheel), otherwise the behavior of the * (notes, CCs, aftertouch and pitch-wheel), otherwise the behavior of the
@ -427,7 +427,7 @@ public:
/** /**
* @brief Send a note off event to the synth. * @brief Send a note off event to the synth.
* @since 0.6.0 * @since 1.0.0
* *
* This command should be delay-ordered with all other midi-type events * This command should be delay-ordered with all other midi-type events
* (notes, CCs, aftertouch and pitch-wheel), otherwise the behavior of the * (notes, CCs, aftertouch and pitch-wheel), otherwise the behavior of the
@ -489,7 +489,7 @@ public:
* (notes, CCs, aftertouch and pitch-wheel), otherwise the behavior of the * (notes, CCs, aftertouch and pitch-wheel), otherwise the behavior of the
* synth is undefined. * synth is undefined.
* *
* @since 0.6.0 * @since 1.0.0
* *
* @param delay the delay at which the event occurs; this should be lower * @param delay the delay at which the event occurs; this should be lower
* than the size of the block in the next call to renderBlock(). * than the size of the block in the next call to renderBlock().
@ -526,7 +526,7 @@ public:
* (notes, CCs, aftertouch and pitch-wheel), otherwise the behavior of the * (notes, CCs, aftertouch and pitch-wheel), otherwise the behavior of the
* synth is undefined. * synth is undefined.
* *
* @since 0.6.0 * @since 1.0.0
* *
* @param delay the delay at which the event occurs; this should be lower * @param delay the delay at which the event occurs; this should be lower
* than the size of the block in the next call to renderBlock(). * than the size of the block in the next call to renderBlock().
@ -553,7 +553,25 @@ public:
* @par Thread-safety constraints * @par Thread-safety constraints
* - @b RT: the function must be invoked from the Real-time thread * - @b RT: the function must be invoked from the Real-time thread
*/ */
void aftertouch(int delay, int aftertouch) noexcept; SFIZZ_DEPRECATED_API void aftertouch(int delay, int aftertouch) noexcept;
/**
* @brief Send a channel aftertouch (channel pressure) event to the synth.
*
* This command should be delay-ordered with all other midi-type events
* (notes, CCs, aftertouch and pitch-wheel), otherwise the behavior of the
* synth is undefined.
*
* @since 0.2.0
*
* @param delay the delay at which the event occurs; this should be lower
* than the size of the block in the next call to renderBlock().
* @param aftertouch the aftertouch value, in domain 0 to 127.
*
* @par Thread-safety constraints
* - @b RT: the function must be invoked from the Real-time thread
*/
void channelAftertouch(int delay, int aftertouch) noexcept;
/** /**
* @brief Send a high-precision aftertouch event to the synth. * @brief Send a high-precision aftertouch event to the synth.
@ -562,7 +580,7 @@ public:
* (notes, CCs, aftertouch and pitch-wheel), otherwise the behavior of the * (notes, CCs, aftertouch and pitch-wheel), otherwise the behavior of the
* synth is undefined. * synth is undefined.
* *
* @since 0.6.0 * @since 1.0.0
* *
* @param delay the delay at which the event occurs; this should be lower * @param delay the delay at which the event occurs; this should be lower
* than the size of the block in the next call to renderBlock(). * than the size of the block in the next call to renderBlock().
@ -571,7 +589,7 @@ public:
* @par Thread-safety constraints * @par Thread-safety constraints
* - @b RT: the function must be invoked from the Real-time thread * - @b RT: the function must be invoked from the Real-time thread
*/ */
void hdAftertouch(int delay, float aftertouch) noexcept; void hdChannelAftertouch(int delay, float aftertouch) noexcept;
/** /**
* @brief Send a polyphonic aftertouch event to the synth. * @brief Send a polyphonic aftertouch event to the synth.
@ -581,7 +599,7 @@ public:
* (notes, CCs, aftertouch and pitch-wheel), otherwise the behavior of the * (notes, CCs, aftertouch and pitch-wheel), otherwise the behavior of the
* synth is undefined. * synth is undefined.
* *
* @since 0.6.0 * @since 1.0.0
* *
* @param delay the delay at which the event occurs; this should be lower * @param delay the delay at which the event occurs; this should be lower
* than the size of the block in the next call to renderBlock(). * than the size of the block in the next call to renderBlock().
@ -601,7 +619,7 @@ public:
* (notes, CCs, aftertouch and pitch-wheel), otherwise the behavior of the * (notes, CCs, aftertouch and pitch-wheel), otherwise the behavior of the
* synth is undefined. * synth is undefined.
* *
* @since 0.6.0 * @since 1.0.0
* *
* @param delay the delay at which the event occurs; this should be lower * @param delay the delay at which the event occurs; this should be lower
* than the size of the block in the next call to renderBlock(). * than the size of the block in the next call to renderBlock().
@ -638,7 +656,7 @@ public:
* tempo(), timeSignature(), timePosition(), and playbackState(), otherwise the behavior * tempo(), timeSignature(), timePosition(), and playbackState(), otherwise the behavior
* of the synth is undefined. * of the synth is undefined.
* *
* @since 0.6.0 * @since 1.0.0
* *
* @param delay the delay at which the event occurs; this should be lower * @param delay the delay at which the event occurs; this should be lower
* than the size of the block in the next call to renderBlock(). * than the size of the block in the next call to renderBlock().
@ -956,7 +974,7 @@ public:
/** /**
* @brief Export a MIDI Name document describing the currently loaded SFZ file. * @brief Export a MIDI Name document describing the currently loaded SFZ file.
* @since 0.6.0 * @since 1.0.0
* *
* @param model The model name used if a non-empty string, otherwise generated. * @param model The model name used if a non-empty string, otherwise generated.
* *
@ -979,7 +997,7 @@ public:
/** /**
* @brief Create a new messaging client * @brief Create a new messaging client
* @since 0.6.0 * @since 1.0.0
* *
* @param data The opaque data pointer which is passed to the receiver. * @param data The opaque data pointer which is passed to the receiver.
* @return The new client. * @return The new client.
@ -988,7 +1006,7 @@ public:
/** /**
* @brief Get the client data * @brief Get the client data
* @since 0.6.0 * @since 1.0.0
* *
* @param client The client. * @param client The client.
* @return The client data. * @return The client data.
@ -997,7 +1015,7 @@ public:
/** /**
* @brief Set the function which receives reply messages from the synth engine. * @brief Set the function which receives reply messages from the synth engine.
* @since 0.6.0 * @since 1.0.0
* *
* @param client The client. * @param client The client.
* @param receive The pointer to the receiving function. * @param receive The pointer to the receiving function.
@ -1007,7 +1025,7 @@ public:
/** /**
* @brief Send a message to the synth engine * @brief Send a message to the synth engine
* *
* @since 0.6.0 * @since 1.0.0
* *
* @param client The client sending the message. * @param client The client sending the message.
* @param delay The delay of the message in the block, in samples. * @param delay The delay of the message in the block, in samples.
@ -1023,7 +1041,7 @@ public:
/** /**
* @brief Set the function which receives broadcast messages from the synth engine. * @brief Set the function which receives broadcast messages from the synth engine.
* *
* @since 0.6.0 * @since 1.0.0
* *
* @param broadcast The pointer to the receiving function. * @param broadcast The pointer to the receiving function.
* @param data The opaque data pointer which is passed to the receiver. * @param data The opaque data pointer which is passed to the receiver.

View file

@ -1345,13 +1345,13 @@ void Synth::hdPitchWheel(int delay, float normalizedPitch) noexcept
impl.performHdcc(delay, ExtendedCCs::pitchBend, normalizedPitch, false); impl.performHdcc(delay, ExtendedCCs::pitchBend, normalizedPitch, false);
} }
void Synth::aftertouch(int delay, int aftertouch) noexcept void Synth::channelAftertouch(int delay, int aftertouch) noexcept
{ {
const float normalizedAftertouch = normalize7Bits(aftertouch); const float normalizedAftertouch = normalize7Bits(aftertouch);
hdAftertouch(delay, normalizedAftertouch); hdChannelAftertouch(delay, normalizedAftertouch);
} }
void Synth::hdAftertouch(int delay, float normAftertouch) noexcept void Synth::hdChannelAftertouch(int delay, float normAftertouch) noexcept
{ {
Impl& impl = *impl_; Impl& impl = *impl_;
ScopedTiming logger { impl.dispatchDuration_, ScopedTiming::Operation::addToDuration }; ScopedTiming logger { impl.dispatchDuration_, ScopedTiming::Operation::addToDuration };

View file

@ -446,7 +446,7 @@ public:
* the block in the next call to renderBlock(). * the block in the next call to renderBlock().
* @param aftertouch the aftertouch value * @param aftertouch the aftertouch value
*/ */
void aftertouch(int delay, int aftertouch) noexcept; void channelAftertouch(int delay, int aftertouch) noexcept;
/** /**
* @brief Send a high precision aftertouch event to the synth * @brief Send a high precision aftertouch event to the synth
* *
@ -454,7 +454,7 @@ public:
* the block in the next call to renderBlock(). * the block in the next call to renderBlock().
* @param normAftertouch the normalized aftertouch value, in domain 0 to 1 * @param normAftertouch the normalized aftertouch value, in domain 0 to 1
*/ */
void hdAftertouch(int delay, float normAftertouch) noexcept; void hdChannelAftertouch(int delay, float normAftertouch) noexcept;
/** /**
* @brief Send a tempo event to the synth * @brief Send a tempo event to the synth
* *

View file

@ -207,12 +207,17 @@ void sfz::Sfizz::hdPitchWheel(int delay, float pitch) noexcept
void sfz::Sfizz::aftertouch(int delay, int aftertouch) noexcept void sfz::Sfizz::aftertouch(int delay, int aftertouch) noexcept
{ {
synth->synth.aftertouch(delay, aftertouch); synth->synth.channelAftertouch(delay, aftertouch);
} }
void sfz::Sfizz::hdAftertouch(int delay, float aftertouch) noexcept void sfz::Sfizz::channelAftertouch(int delay, int aftertouch) noexcept
{ {
synth->synth.hdAftertouch(delay, aftertouch); synth->synth.channelAftertouch(delay, aftertouch);
}
void sfz::Sfizz::hdChannelAftertouch(int delay, float aftertouch) noexcept
{
synth->synth.hdChannelAftertouch(delay, aftertouch);
} }
void sfz::Sfizz::polyAftertouch(int delay, int noteNumber, int aftertouch) noexcept void sfz::Sfizz::polyAftertouch(int delay, int noteNumber, int aftertouch) noexcept

View file

@ -152,11 +152,15 @@ void sfizz_send_hd_pitch_wheel(sfizz_synth_t* synth, int delay, float pitch)
} }
void sfizz_send_aftertouch(sfizz_synth_t* synth, int delay, int aftertouch) void sfizz_send_aftertouch(sfizz_synth_t* synth, int delay, int aftertouch)
{ {
synth->synth.aftertouch(delay, aftertouch); synth->synth.channelAftertouch(delay, aftertouch);
} }
void sfizz_send_hd_aftertouch(sfizz_synth_t* synth, int delay, float aftertouch) void sfizz_send_channel_aftertouch(sfizz_synth_t* synth, int delay, int aftertouch)
{ {
synth->synth.hdAftertouch(delay, aftertouch); synth->synth.channelAftertouch(delay, aftertouch);
}
void sfizz_send_hd_channel_aftertouch(sfizz_synth_t* synth, int delay, float aftertouch)
{
synth->synth.hdChannelAftertouch(delay, aftertouch);
} }
void sfizz_send_poly_aftertouch(sfizz_synth_t* synth, int delay, int note_number, int aftertouch) void sfizz_send_poly_aftertouch(sfizz_synth_t* synth, int delay, int note_number, int aftertouch)
{ {

View file

@ -1801,13 +1801,13 @@ TEST_CASE("[Keyswitches] Trigger from aftertouch extended CC")
)"); )");
synth.renderBlock(buffer); synth.renderBlock(buffer);
REQUIRE(synth.getNumActiveVoices() == 0); REQUIRE(synth.getNumActiveVoices() == 0);
synth.aftertouch(0, 90); synth.channelAftertouch(0, 90);
synth.renderBlock(buffer); synth.renderBlock(buffer);
REQUIRE(synth.getNumActiveVoices() == 0); REQUIRE(synth.getNumActiveVoices() == 0);
synth.aftertouch(0, 110); synth.channelAftertouch(0, 110);
synth.renderBlock(buffer); synth.renderBlock(buffer);
REQUIRE(synth.getNumActiveVoices() == 1); REQUIRE(synth.getNumActiveVoices() == 1);
synth.aftertouch(0, 120); synth.channelAftertouch(0, 120);
synth.renderBlock(buffer); synth.renderBlock(buffer);
REQUIRE(synth.getNumActiveVoices() == 2); REQUIRE(synth.getNumActiveVoices() == 2);
} }