Csound Csound-dev Csound-tekno Search About

[Csnd-dev] dashow opcode

Date2018-05-15 18:06
FromJohn
Subject[Csnd-dev] dashow opcode
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;

Date2018-05-15 18:20
FromVictor Lazzarini
SubjectRe: [Csnd-dev] dashow opcode
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  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 O

Date2018-05-16 00:24
From"Dr. Richard Boulanger"
SubjectRe: [Csnd-dev] dashow opcode
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: rboulanger@berklee.edu
facebook: https://www.facebook.com/richard.boulanger.58

On Tue, May 15, 2018 at 1:20 PM, Victor Lazzarini <Victor.Lazzarini@mu.ie> 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 <jpff@CODEMIST.CO.UK> 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;
> }