-
Notifications
You must be signed in to change notification settings - Fork 185
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
Removed pow of two table size dependency across all opcodes #1848
Conversation
I've added fof,fof2,fog now. Opcodes/Vosim.c Some work ahead! |
I've dealt with some of these now. Outstanding: Opcodes/partikkel.c |
Outstanding: |
Completed adding floating-point phase to all relevant opcodes and releasing them from pow-of-two dependency. As a result I have removed the FTFind() function. These module API functions are candidates for consolidation (we should only need 1 function), but there is another PR taking care of it. There's an outstanding case with vco2init, which generates tables from radix2 FFT processing, thus depending on pow of two size source table. I have an idea on how to modify it to remove that dependency, but I will leave it for a later PR, since this is an edge case. |
@kunstmusik this is the next one. |
@@ -195,11 +251,28 @@ int32_t foscili(CSOUND *csound, FOSC *p) | |||
v1 = *ftab++; | |||
ar[n] = (v1 + (*ftab - v1) * fract) * amp; | |||
cphs += cinc; | |||
} else { | |||
mphsf = PHMOD1(mphsf); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awkward indentation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep, forgot to tidy up formatting. Fixed now.
H/csGblMtx.h
Outdated
void csoundLock() { | ||
} | ||
void | ||
csoundLock () |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Formatting seems to have taken a step backwards for this PR. Both function definitions and structs got converted to having their opening brace on their own lines, which seems a change from our current conventions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we have a script? Otherwise it is hard to fix? I used clang-format with -style=GNU.
If there is a set format that can be applied, it's an easy fix. If not, we're stuck.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jpffitch has had a script to format but I don't think it's in the repo? If we go with clang-format it has options we could configure and standardize upon. As it is now, the code formatting differences in recent PRs has definitely increased the difficulty of code reviews. I like the idea of us getting this standardized.
John, could you point to what settings you have used for code formatting? I think we've been using 2-space indent, no tabs, then rest I'm unsure there's been a mix and I think my own preferences (such as always using braces with conditionals) isn't the norm.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now, I reverted the clang-format commit and just corrected the indent of those four files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we merge this now if it's only an issue of formatting?
I went through as much as I gave up digging into the code, as the formatting has made it near impossible to see actual code changes between develop and this branch. I know we have the code formatting branch to integrate and we should plan to do it carefully; perhaps we should merge all of the other branches we can first, then do the formatting branch and have it be just formatting changes. Some notes from what I could takeaway:
Compilation worked fine here and some small tests also worked. I'm not 100% confident in my review due to the obscurity in formatting but I think we should proceed with merging and address issues if they appear down the line. Going to go ahead and mere now. |
Thanks.
Apologies for the formatting issues. |
This PR does three things:
Now oscil, oscili, and oscil3 can be used with any size tables.