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

Add signal comparison/logical operators #2054

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Spacechild1
Copy link
Contributor

@Spacechild1 Spacechild1 commented Jul 7, 2023

Maybe the new multichannel feature is a good excuse to finally(!) add the missing signal comparison/logical operators:

[==~], [!=~], [>~], [<~], [>=~], [<=~], [&&~], [||~]

IMO, it is a bit silly that we currently need externals (zexy, cyclone) or [expr~] for these basic math operations, even more so as the former are (still) single channel.


As a first step, I have added more convenience functions to d_arithmetic.c which remove a lot of the code duplication. In total, this PR only adds 350 lines (700 added, 350 removed).

Side note: it would be possible to further reduce the code size - drastically! - by implementing the perform routines as macros, taking the binary operator as an argument, but this might be a bit controversial, so I haven't done it.

@Spacechild1 Spacechild1 added feature suggestion for an enhancement subject:core things concerning the Pd-core labels Jul 7, 2023
@porres
Copy link
Contributor

porres commented May 10, 2024

If this is taken, I think it would make sense to have this objects call a new help file named binops-other-tilde-help.pd.

For the record, I see most of the objects from binops-other-help.pd are here, all but [&], [|], [<<], [div] and [mod~] and yeah, I don't think they'd be worth including.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature suggestion for an enhancement subject:core things concerning the Pd-core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants