[Csnd-dev] dashow opcode

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Csnd-dev] dashow opcode

jpff
In the sources but commented out is an opcode called dashow.  This is
undocumented but seems to calculate two k-rate values.  It was written
(apparently) by Gabriel Maldonado in 2007.

Does anyone know its purpose?  Is it useful?  If so anyone willing to
document it?

==John ffitch


static int32_t dashow (CSOUND *csound, DSH *p)
{
    MYFLT range = *p->kband_max - *p->kband_min;
    if (range != FL(0.0))
      *p->rmod = (*p->kfreq_max - *p->kfreq_min) / (*p->kband_max - *p->kband_min);
    else
      *p->rmod = FL(0.0);
    *p->rcar = (*p->kfreq_max - (*p->kband_max * *p->rmod));

    if (*p->rmod <= FL(0.0)) *p->rmod = FABS (*p->rmod);
    if (*p->rcar <= FL(0.0)) *p->rcar = FABS (*p->rcar);
    return OK;
}
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd-dev] dashow opcode

Victor Lazzarini-2
By the variable names,  I’d guess it calculates FM pair frequencies using
some rule.

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

> On 15 May 2018, at 18:07, John <[hidden email]> wrote:
>
> In the sources but commented out is an opcode called dashow.  This is
> undocumented but seems to calculate two k-rate values.  It was written
> (apparently) by Gabriel Maldonado in 2007.
>
> Does anyone know its purpose?  Is it useful?  If so anyone willing to
> document it?
>
> ==John ffitch
>
>
> static int32_t dashow (CSOUND *csound, DSH *p)
> {
>    MYFLT range = *p->kband_max - *p->kband_min;
>    if (range != FL(0.0))
>      *p->rmod = (*p->kfreq_max - *p->kfreq_min) / (*p->kband_max - *p->kband_min);
>    else
>      *p->rmod = FL(0.0);
>    *p->rcar = (*p->kfreq_max - (*p->kband_max * *p->rmod));
>
>    if (*p->rmod <= FL(0.0)) *p->rmod = FABS (*p->rmod);
>    if (*p->rcar <= FL(0.0)) *p->rcar = FABS (*p->rcar);
>    return OK;
> }
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd-dev] dashow opcode

Doctor B
You might look into his famous FM article, in which he uses certain rations to compute spectral "harmonies" and "chroma".
It is the essence of his FM practice.  The chapter can be found in Foundations of Computer Music - MIT Press and also in an early Computer Music Journal.  I think a clue might be found therein.  Hope so.  It would be cool to have and to honor him.  ALSO... Victor and other have done some wonderful research and papers on "advanced" FM and alternative FM - has this work been turned into opcodes already?

Best,


-dB

_____________________________________________
Dr. Richard Boulanger
Professor of Electronic Production and Design
Professional Writing and Music Technology Division
Berklee College of Music
______________________________________________
President of Boulanger Labs - http://boulangerlabs.com
Author & Editor of The Csound Book - http://mitpress.mit.edu/books/csound-book
Author & Editor of The Audio Programming Book - http://mitpress.mit.edu/books/audio-programming-book
______________________________________________
about: 
http://www.boulangerlabs.com/#about
about: http://www.csounds.com/community/developers/dr-richard-boulanger/
music: http://www.csounds.com/community/developers/dr-richard-boulanger/dr-richard-boulanger-music/

______________________________________________
email: [hidden email]
facebook: https://www.facebook.com/richard.boulanger.58

On Tue, May 15, 2018 at 1:20 PM, Victor Lazzarini <[hidden email]> wrote:
By the variable names,  I’d guess it calculates FM pair frequencies using
some rule.

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

> On 15 May 2018, at 18:07, John <[hidden email]> wrote:
>
> In the sources but commented out is an opcode called dashow.  This is
> undocumented but seems to calculate two k-rate values.  It was written
> (apparently) by Gabriel Maldonado in 2007.
>
> Does anyone know its purpose?  Is it useful?  If so anyone willing to
> document it?
>
> ==John ffitch
>
>
> static int32_t dashow (CSOUND *csound, DSH *p)
> {
>    MYFLT range = *p->kband_max - *p->kband_min;
>    if (range != FL(0.0))
>      *p->rmod = (*p->kfreq_max - *p->kfreq_min) / (*p->kband_max - *p->kband_min);
>    else
>      *p->rmod = FL(0.0);
>    *p->rcar = (*p->kfreq_max - (*p->kband_max * *p->rmod));
>
>    if (*p->rmod <= FL(0.0)) *p->rmod = FABS (*p->rmod);
>    if (*p->rcar <= FL(0.0)) *p->rcar = FABS (*p->rcar);
>    return OK;
> }