Csound Csound-dev Csound-tekno Search About

[Csnd-dev] CPOF - Array of ftables

Date2024-06-23 16:01
FromPierre Clisson
Subject[Csnd-dev] CPOF - Array of ftables
Attachmentssmime.p7s  
Hi again :)

I'm trying to design an opcode that accepts an array of ftables, access 
these tables individually, and iterate over them. But it seems that I 
can't use FTFind().

My code looks like this:

csnd::Vector &arr = inargs.vector_data(1);
FUNC *ftp = csound->FTFind(csound, &arr[0]);

And the error I get is:

error: 'FTFind' is a private member of 'CSOUND_'

What would be the correct way to achieve that? Sorry if this is a dumb 
question, I'm just starting looking into plugin development, and I'm 
unsure about the best practices.



Date2024-06-23 16:58
FromVictor Lazzarini <000010b17ddd988e-dmarc-request@LISTSERV.HEANET.IE>
SubjectRe: [Csnd-dev] [EXTERNAL] [Csnd-dev] CPOF - Array of ftables
To access members of the CSOUND struct, use

/** Access to the base CSOUND object
   */
  CSOUND *get_csound() {
    return this;
  }


Prof. Victor Lazzarini
Maynooth University
Ireland

> On 23 Jun 2024, at 16:02, Pierre Clisson  wrote:
> 
> Hi again :)
> 
> I'm trying to design an opcode that accepts an array of ftables, access these tables individually, and iterate over them. But it seems that I can't use FTFind().
> 
> My code looks like this:
> 
> csnd::Vector &arr = inargs.vector_data(1);
> FUNC *ftp = csound->FTFind(csound, &arr[0]);
> 
> And the error I get is:
> 
> error: 'FTFind' is a private member of 'CSOUND_'
> 
> What would be the correct way to achieve that? Sorry if this is a dumb question, I'm just starting looking into plugin development, and I'm unsure about the best practices.
> 
> 

Date2024-06-23 20:24
FromPierre Clisson
SubjectRe: [Csnd-dev] [EXTERNAL] [Csnd-dev] CPOF - Array of ftables
Attachmentssmime.p7s  
Got it, thanks!

Victor Lazzarini wrote on 23/06/2024 21:28:
> To access members of the CSOUND struct, use
>
> /** Access to the base CSOUND object
>     */
>    CSOUND *get_csound() {
>      return this;
>    }
>
>
> Prof. Victor Lazzarini
> Maynooth University
> Ireland
>
>> On 23 Jun 2024, at 16:02, Pierre Clisson  wrote:
>>
>> Hi again :)
>>
>> I'm trying to design an opcode that accepts an array of ftables, access these tables individually, and iterate over them. But it seems that I can't use FTFind().
>>
>> My code looks like this:
>>
>> csnd::Vector &arr = inargs.vector_data(1);
>> FUNC *ftp = csound->FTFind(csound, &arr[0]);
>>
>> And the error I get is:
>>
>> error: 'FTFind' is a private member of 'CSOUND_'
>>
>> What would be the correct way to achieve that? Sorry if this is a dumb question, I'm just starting looking into plugin development, and I'm unsure about the best practices.
>>
>>