Csound Csound-dev Csound-tekno Search About

Re: [Cs-dev] Linear algebra and fsigs - attention Victor Lazzarini

Date2008-05-15 23:47
From"Michael Gogins"
SubjectRe: [Cs-dev] Linear algebra and fsigs - attention Victor Lazzarini
Thanks, that is pretty much what I thought.

To summarize:

-- There is 1 f-sig frame per window hop.

-- There is 1 window of data in each f-sig frame.

-- If I don't do any arithmetic on an f-sig unless it is scheduled to change 
during
   the current kperiod, everything should be OK.

Because of the final point, I may add an opcode that an instrument can call 
to find whether or not a particular f-sig is scheduled for the current 
kperiod.

Putting this test inside the linear algebra opcode, as you suggest, wouldn't 
always work, because there may be arithmetic that involves not only f-sigs, 
but also vectors and matrices from other sources. All of this arithmetic has 
to proceed at f-rate, if you will. Therefore, the user will be advised to 
test for f-rate and process all f-sigs and associated arithmetic within 
f-rate blocks in their instrument.

Indeed, perhaps we need a new logic opcode that creates an f-sig block for a 
given input f-sig (just a nonense example):

ivcin        la_i_create_vc windowsize
ivcout       la_i_create_vc windowsize
imatc        la_i_create_mc windowsize, windowsize

frate fsig, label
    ivcin     la_k_assign_f fsig
    ivcout    la_k_dot_mc_vc imatc, ivcin
    fsig      la_k_f_assign vcout
label:

Thanks for your prompt response.

Regards,
Mike

----- Original Message ----- 
From: "victor" 
To: "Michael Gogins" ; "Developer discussions" 

Sent: Thursday, May 15, 2008 5:47 PM
Subject: Re: [Cs-dev] Linear algebra and fsigs - attention Victor Lazzarini


> An fsig always contains one window's worth of data and never more than
> that. If you want to process an input fsig, you check its frame count
> against
> an internal count and see if it is more recent.
>
> if (p->lastframe < p->fin->framecount) {
>     for (i = 0; i < framesize; i += 2) {
>        // process the frame
>        ...
>     }
>     p->fout->framecount = p->lastframe = p->fin->framecount;
>   }
>
> Victor
>
>> It does not make sense to implement this for the linear algebra opcodes,
>> but I need to understand how to make the array operations synchronize 
>> with
>> the f-sig variables. Is it ever the case that the f-sigs change at the
>> same rate as k-rate, or an integral multiple or divisor of k-rate? If so,
>> what is the governing relation so that a user of linear algebra with 
>> f-sig
>> variables can remain synchronized with them?  If there is an integral
>> ratio between the f-sig rate and k-rate, then the user can program linear
>> algebra operations at that ratio, e.g. if an f-sig changes 1/2 as often 
>> as
>> k-rate, then the user can operate on that f-sig only every other k-period
>> (obviously, it has to be just the right period!).
>>
>> Does doing this make sense? Does one fsig ever contain more than one
>> window's worth of data?
>>
>> Thanks,
>> Mike
>>
>>
>>
>> -------------------------------------------------------------------------
>> This SF.net email is sponsored by: Microsoft
>> Defy all challenges. Microsoft(R) Visual Studio 2008.
>> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel 


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net