After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 353442 - DavOrgran transpose / fine_tune
DavOrgran transpose / fine_tune
Status: RESOLVED FIXED
Product: beast
Classification: Other
Component: plugins
SVN trunk
Other All
: Normal enhancement
: ---
Assigned To: Beast Maintainers
Beast Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-08-29 17:36 UTC by Stefan Westerfeld
Modified: 2006-08-29 18:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed DavOrgan patch (5.16 KB, patch)
2006-08-29 17:37 UTC, Stefan Westerfeld
none Details | Review

Description Stefan Westerfeld 2006-08-29 17:36:37 UTC
Just like #353135, I propose to add fine tuning and transposing properties to the DavOrgan module. Patch follows.
Comment 1 Stefan Westerfeld 2006-08-29 17:37:48 UTC
Created attachment 71849 [details] [review]
Proposed DavOrgan patch

Tue Aug 29 19:33:50 2006  Stefan Westerfeld  <stefan@space.twc.de>

        * davorgan.[hc]: Add transpose and fine_tune settings, just like they
        can be found in the oscillator code. Fixed a few minor i18n bugs in
        property translation markup.
Comment 2 Tim Janik 2006-08-29 17:47:23 UTC
Comment on attachment 71849 [details] [review]
Proposed DavOrgan patch

>@@ -376,14 +403,16 @@ dav_organ_process (BseModule *module,
>   const gfloat *reed_table = organ->config.reed ? class->pulse_table : sine_table;
>   const gfloat *ifreq = BSE_MODULE_IBUFFER (module, DAV_ORGAN_ICHANNEL_FREQ);
>   gfloat *ovalues = BSE_MODULE_OBUFFER (module, DAV_ORGAN_OCHANNEL_MONO);
>+  const gdouble transpose = bse_transpose_factor (organ->config.transpose);
>+  const gdouble fine_tune = bse_cent_factor (organ->config.fine_tune);
>   guint freq_256, mix_freq_256;
>   guint freq_256_harm0, freq_256_harm1;
>   guint i;
>   
>   if (BSE_MODULE_ISTREAM (module, DAV_ORGAN_ICHANNEL_FREQ).connected)
>-    freq_256 = BSE_FREQ_FROM_VALUE (ifreq[0]) * 256 + 0.5;
>+    freq_256 = (BSE_FREQ_FROM_VALUE (ifreq[0]) * transpose * fine_tune) * 256 + 0.5;

these...

>   else
>-    freq_256 = organ->config.freq * 256 + 0.5;
>+    freq_256 = (organ->config.freq * transpose * fine_tune) * 256 + 0.5;

and these parenthesis are unneccessary, multiplications need to not be priorized against multiplications, and they'll be executed in order anyways.

>   mix_freq_256 = bse_engine_sample_freq() * 256;
>   freq_256_harm0 = freq_256 / 2;
>   freq_256_harm1 = freq_256;

the rest of the patch looks fine, please apply with the parenthesis removed.
Comment 3 Stefan Westerfeld 2006-08-29 18:51:40 UTC
Ok, I committed the patch without parenthesis, as suggested.