diff --git a/src/sfizz.h b/src/sfizz.h index 933ca722..50202255 100644 --- a/src/sfizz.h +++ b/src/sfizz.h @@ -339,7 +339,7 @@ SFIZZ_EXPORTED_API void sfizz_set_sample_rate(sfizz_synth_t* synth, float sample * @par Thread-safety constraints * - @b RT: the function must be invoked from the Real-time thread */ -SFIZZ_EXPORTED_API void sfizz_send_note_on(sfizz_synth_t* synth, int delay, int note_number, char velocity); +SFIZZ_EXPORTED_API void sfizz_send_note_on(sfizz_synth_t* synth, int delay, int note_number, int velocity); /** * @brief Send a high-precision on event to the synth. @@ -378,7 +378,7 @@ SFIZZ_EXPORTED_API void sfizz_send_hd_note_on(sfizz_synth_t* synth, int delay, i * @par Thread-safety constraints * - @b RT: the function must be invoked from the Real-time thread */ -SFIZZ_EXPORTED_API void sfizz_send_note_off(sfizz_synth_t* synth, int delay, int note_number, char velocity); +SFIZZ_EXPORTED_API void sfizz_send_note_off(sfizz_synth_t* synth, int delay, int note_number, int velocity); /** * @brief Send a high-precision note off event to the synth. @@ -417,7 +417,7 @@ SFIZZ_EXPORTED_API void sfizz_send_hd_note_off(sfizz_synth_t* synth, int delay, * @par Thread-safety constraints * - @b RT: the function must be invoked from the Real-time thread */ -SFIZZ_EXPORTED_API void sfizz_send_cc(sfizz_synth_t* synth, int delay, int cc_number, char cc_value); +SFIZZ_EXPORTED_API void sfizz_send_cc(sfizz_synth_t* synth, int delay, int cc_number, int cc_value); /** * @brief Send a high precision CC event to the synth. @@ -508,7 +508,7 @@ SFIZZ_EXPORTED_API void sfizz_send_hd_pitch_wheel(sfizz_synth_t* synth, int dela * @par Thread-safety constraints * - @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, char aftertouch); +SFIZZ_EXPORTED_API void sfizz_send_aftertouch(sfizz_synth_t* synth, int delay, int aftertouch); /** * @brief Send a high-precision aftertouch event. @@ -546,7 +546,7 @@ SFIZZ_EXPORTED_API void sfizz_send_hd_aftertouch(sfizz_synth_t* synth, int delay * @par Thread-safety constraints * - @b RT: the function must be invoked from the Real-time thread */ -SFIZZ_EXPORTED_API void sfizz_send_poly_aftertouch(sfizz_synth_t* synth, int delay, int note_number, char aftertouch); +SFIZZ_EXPORTED_API void sfizz_send_poly_aftertouch(sfizz_synth_t* synth, int delay, int note_number, int aftertouch); /** * @brief Send a high-precision polyphonic aftertouch event. diff --git a/src/sfizz.hpp b/src/sfizz.hpp index d17ad902..b96c9555 100644 --- a/src/sfizz.hpp +++ b/src/sfizz.hpp @@ -381,7 +381,7 @@ public: * @par Thread-safety constraints * - @b RT: the function must be invoked from the Real-time thread */ - void noteOn(int delay, int noteNumber, uint8_t velocity) noexcept; + void noteOn(int delay, int noteNumber, int velocity) noexcept; /** * @brief Send a high-precision note on event to the synth. @@ -417,7 +417,7 @@ public: * @par Thread-safety constraints * - @b RT: the function must be invoked from the Real-time thread */ - void noteOff(int delay, int noteNumber, uint8_t velocity) noexcept; + void noteOff(int delay, int noteNumber, int velocity) noexcept; /** * @brief Send a note off event to the synth. @@ -453,7 +453,7 @@ public: * @par Thread-safety constraints * - @b RT: the function must be invoked from the Real-time thread */ - void cc(int delay, int ccNumber, uint8_t ccValue) noexcept; + void cc(int delay, int ccNumber, int ccValue) noexcept; /** * @brief Send a high precision CC event to the synth @@ -547,7 +547,7 @@ public: * @par Thread-safety constraints * - @b RT: the function must be invoked from the Real-time thread */ - void aftertouch(int delay, uint8_t aftertouch) noexcept; + void aftertouch(int delay, int aftertouch) noexcept; /** * @brief Send a high-precision aftertouch event to the synth. @@ -585,7 +585,7 @@ public: * @par Thread-safety constraints * - @b RT: the function must be invoked from the Real-time thread */ - void polyAftertouch(int delay, int noteNumber, uint8_t aftertouch) noexcept; + void polyAftertouch(int delay, int noteNumber, int aftertouch) noexcept; /** * @brief Send a high-precision polyphonic aftertouch event to the synth. diff --git a/src/sfizz/Synth.cpp b/src/sfizz/Synth.cpp index 684662ca..9bdeb4a8 100644 --- a/src/sfizz/Synth.cpp +++ b/src/sfizz/Synth.cpp @@ -1061,7 +1061,7 @@ void Synth::renderBlock(AudioSpan buffer) noexcept SFIZZ_CHECK(isReasonableAudio(buffer.getConstSpan(1))); } -void Synth::noteOn(int delay, int noteNumber, uint8_t velocity) noexcept +void Synth::noteOn(int delay, int noteNumber, int velocity) noexcept { const float normalizedVelocity = normalizeVelocity(velocity); hdNoteOn(delay, noteNumber, normalizedVelocity); @@ -1077,7 +1077,7 @@ void Synth::hdNoteOn(int delay, int noteNumber, float normalizedVelocity) noexce impl.resources_.midiState.noteOnEvent(delay, noteNumber, normalizedVelocity); } -void Synth::noteOff(int delay, int noteNumber, uint8_t velocity) noexcept +void Synth::noteOff(int delay, int noteNumber, int velocity) noexcept { const float normalizedVelocity = normalizeVelocity(velocity); hdNoteOff(delay, noteNumber, normalizedVelocity); @@ -1221,7 +1221,7 @@ void Synth::Impl::startDelayedSostenutoReleases(Layer* layer, int delay, SisterV layer->delayedSostenutoReleases_.clear(); } -void Synth::cc(int delay, int ccNumber, uint8_t ccValue) noexcept +void Synth::cc(int delay, int ccNumber, int ccValue) noexcept { const auto normalizedCC = normalizeCC(ccValue); hdcc(delay, ccNumber, normalizedCC); @@ -1345,7 +1345,7 @@ void Synth::hdPitchWheel(int delay, float normalizedPitch) noexcept impl.performHdcc(delay, ExtendedCCs::pitchBend, normalizedPitch, false); } -void Synth::aftertouch(int delay, uint8_t aftertouch) noexcept +void Synth::aftertouch(int delay, int aftertouch) noexcept { const float normalizedAftertouch = normalize7Bits(aftertouch); hdAftertouch(delay, normalizedAftertouch); @@ -1369,7 +1369,7 @@ void Synth::hdAftertouch(int delay, float normAftertouch) noexcept impl.performHdcc(delay, ExtendedCCs::channelAftertouch, normAftertouch, false); } -void Synth::polyAftertouch(int delay, int noteNumber, uint8_t aftertouch) noexcept +void Synth::polyAftertouch(int delay, int noteNumber, int aftertouch) noexcept { const float normalizedAftertouch = normalize7Bits(aftertouch); hdPolyAftertouch(delay, noteNumber, normalizedAftertouch); diff --git a/src/sfizz/Synth.h b/src/sfizz/Synth.h index d44e3812..2c97effe 100644 --- a/src/sfizz/Synth.h +++ b/src/sfizz/Synth.h @@ -352,7 +352,7 @@ public: * @param noteNumber the midi note number * @param velocity the midi note velocity */ - void noteOn(int delay, int noteNumber, uint8_t velocity) noexcept; + void noteOn(int delay, int noteNumber, int velocity) noexcept; /** * @brief Send a high-precision note on event to the synth * @@ -370,7 +370,7 @@ public: * @param noteNumber the midi note number * @param velocity the midi note velocity */ - void noteOff(int delay, int noteNumber, uint8_t velocity) noexcept; + void noteOff(int delay, int noteNumber, int velocity) noexcept; /** * @brief Send a high-precision note off event to the synth * @@ -388,7 +388,7 @@ public: * @param ccNumber the cc number * @param ccValue the cc value */ - void cc(int delay, int ccNumber, uint8_t ccValue) noexcept; + void cc(int delay, int ccNumber, int ccValue) noexcept; /** * @brief Send a high precision CC event to the synth * @@ -446,7 +446,7 @@ public: * the block in the next call to renderBlock(). * @param aftertouch the aftertouch value */ - void aftertouch(int delay, uint8_t aftertouch) noexcept; + void aftertouch(int delay, int aftertouch) noexcept; /** * @brief Send a high precision aftertouch event to the synth * @@ -471,7 +471,7 @@ public: * @param noteNumber * @param normAftertouch */ - void polyAftertouch(int delay, int noteNumber, uint8_t aftertouch) noexcept; + void polyAftertouch(int delay, int noteNumber, int aftertouch) noexcept; /** * @brief Send a polyphonic aftertouch event to the synth * diff --git a/src/sfizz/sfizz.cpp b/src/sfizz/sfizz.cpp index 62f9bb3a..29f9303a 100644 --- a/src/sfizz/sfizz.cpp +++ b/src/sfizz/sfizz.cpp @@ -160,7 +160,7 @@ void sfz::Sfizz::setVolume(float volume) noexcept synth->synth.setVolume(volume); } -void sfz::Sfizz::noteOn(int delay, int noteNumber, uint8_t velocity) noexcept +void sfz::Sfizz::noteOn(int delay, int noteNumber, int velocity) noexcept { synth->synth.noteOn(delay, noteNumber, velocity); } @@ -170,7 +170,7 @@ void sfz::Sfizz::hdNoteOn(int delay, int noteNumber, float velocity) noexcept synth->synth.hdNoteOn(delay, noteNumber, velocity); } -void sfz::Sfizz::noteOff(int delay, int noteNumber, uint8_t velocity) noexcept +void sfz::Sfizz::noteOff(int delay, int noteNumber, int velocity) noexcept { synth->synth.noteOff(delay, noteNumber, velocity); } @@ -180,7 +180,7 @@ void sfz::Sfizz::hdNoteOff(int delay, int noteNumber, float velocity) noexcept synth->synth.hdNoteOff(delay, noteNumber, velocity); } -void sfz::Sfizz::cc(int delay, int ccNumber, uint8_t ccValue) noexcept +void sfz::Sfizz::cc(int delay, int ccNumber, int ccValue) noexcept { synth->synth.cc(delay, ccNumber, ccValue); } @@ -205,7 +205,7 @@ void sfz::Sfizz::hdPitchWheel(int delay, float pitch) noexcept synth->synth.hdPitchWheel(delay, pitch); } -void sfz::Sfizz::aftertouch(int delay, uint8_t aftertouch) noexcept +void sfz::Sfizz::aftertouch(int delay, int aftertouch) noexcept { synth->synth.aftertouch(delay, aftertouch); } @@ -215,7 +215,7 @@ void sfz::Sfizz::hdAftertouch(int delay, float aftertouch) noexcept synth->synth.hdAftertouch(delay, aftertouch); } -void sfz::Sfizz::polyAftertouch(int delay, int noteNumber, uint8_t aftertouch) noexcept +void sfz::Sfizz::polyAftertouch(int delay, int noteNumber, int aftertouch) noexcept { synth->synth.polyAftertouch(delay, noteNumber, aftertouch); } diff --git a/src/sfizz/sfizz_wrapper.cpp b/src/sfizz/sfizz_wrapper.cpp index c431dd5d..76400227 100644 --- a/src/sfizz/sfizz_wrapper.cpp +++ b/src/sfizz/sfizz_wrapper.cpp @@ -114,7 +114,7 @@ void sfizz_set_sample_rate(sfizz_synth_t* synth, float sample_rate) synth->synth.setSampleRate(sample_rate); } -void sfizz_send_note_on(sfizz_synth_t* synth, int delay, int note_number, char velocity) +void sfizz_send_note_on(sfizz_synth_t* synth, int delay, int note_number, int velocity) { synth->synth.noteOn(delay, note_number, velocity); } @@ -122,7 +122,7 @@ void sfizz_send_hd_note_on(sfizz_synth_t* synth, int delay, int note_number, flo { synth->synth.hdNoteOn(delay, note_number, velocity); } -void sfizz_send_note_off(sfizz_synth_t* synth, int delay, int note_number, char velocity) +void sfizz_send_note_off(sfizz_synth_t* synth, int delay, int note_number, int velocity) { synth->synth.noteOff(delay, note_number, velocity); } @@ -130,7 +130,7 @@ void sfizz_send_hd_note_off(sfizz_synth_t* synth, int delay, int note_number, fl { synth->synth.hdNoteOff(delay, note_number, velocity); } -void sfizz_send_cc(sfizz_synth_t* synth, int delay, int cc_number, char cc_value) +void sfizz_send_cc(sfizz_synth_t* synth, int delay, int cc_number, int cc_value) { synth->synth.cc(delay, cc_number, cc_value); } @@ -150,7 +150,7 @@ void sfizz_send_hd_pitch_wheel(sfizz_synth_t* synth, int delay, float pitch) { synth->synth.hdPitchWheel(delay, pitch); } -void sfizz_send_aftertouch(sfizz_synth_t* synth, int delay, char aftertouch) +void sfizz_send_aftertouch(sfizz_synth_t* synth, int delay, int aftertouch) { synth->synth.aftertouch(delay, aftertouch); } @@ -158,7 +158,7 @@ void sfizz_send_hd_aftertouch(sfizz_synth_t* synth, int delay, float aftertouch) { synth->synth.hdAftertouch(delay, aftertouch); } -void sfizz_send_poly_aftertouch(sfizz_synth_t* synth, int delay, int note_number, char aftertouch) +void sfizz_send_poly_aftertouch(sfizz_synth_t* synth, int delay, int note_number, int aftertouch) { synth->synth.polyAftertouch(delay, note_number, aftertouch); }