Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

try disabling denormal numbers for plugins with input #158

Merged
merged 3 commits into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Features:
* Only disable DSP with new `--nodsp` flag
* Use pydantic types to define metadata objects
* DPF: CV flag in portgroups
* DPF: flag to disable scoped denormals

Bugfixes

Expand Down
6 changes: 6 additions & 0 deletions hvcc/generators/c2dpf/templates/HeavyDPF.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
#include "Heavy_{{name}}.h"
#include "{{class_name}}.hpp"
#include <set>
{% if meta.denormals is sameas false %}
#include "extra/ScopedDenormalDisable.hpp"
{% endif %}


#define HV_DPF_NUM_PARAMETER {{receivers|length + senders|length}}
Expand Down Expand Up @@ -203,6 +206,9 @@ void {{class_name}}::run(const float** inputs, float** outputs, uint32_t frames,
void {{class_name}}::run(const float** inputs, float** outputs, uint32_t frames)
{
#endif
{% if meta.denormals is sameas false %}
const ScopedDenormalDisable sdd;
{% endif %}
const TimePosition& timePos(getTimePosition());
if (timePos.playing && timePos.bbt.valid)
_context->sendMessageToReceiverV(HV_HASH_DPF_BPM, 0, "f", timePos.bbt.beatsPerMinute);
Expand Down
1 change: 1 addition & 0 deletions hvcc/generators/types/meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class DPF(BaseModel):
midi_output: bool = False
port_groups: Optional[DPFPortGroups] = None
enumerators: Optional[Dict[str, List[str]]] = None
denormals: bool = True
version: Optional[str] = None
license: Optional[str] = None
maker: Optional[str] = None
Expand Down
Loading