Csound Csound-dev Csound-tekno Search About

[Csnd] trying to understand complex numbers in csound

Date2022-10-04 14:32
FromHlöðver Sigurðsson
Subject[Csnd] trying to understand complex numbers in csound
I've never used these opcodes, the error message I get running:

instr 1
  kIn line 0, p3, 1
  kCmplx[] r2c kIn
endin

gives me a type error message

error:  Unable to find opcode entry for 'r2c' with matching argument types:
Found: k[] r2c k
       kCmplx r2c kIn ...
Line: 11
 from file *string* (1),Parsing failed due to syntax errors

my best guess is that it only works in combination with fft opcodes. But if that's the case, then the error message is bit misleading?

The manual example (besides ifft not being an opcode but that's easy to fix)
http://www.csounds.com/manual/html/c2r.html
does work.
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2022-10-04 15:04
FromVictor Lazzarini
SubjectRe: [Csnd] [EXTERNAL] [Csnd] trying to understand complex numbers in csound
You need an array as input. The reference manual is your friend

https://csound.com/manual/r2c.html
========================
Prof. Victor Lazzarini
Maynooth University
Ireland

> On 4 Oct 2022, at 14:32, Hlöðver Sigurðsson  wrote:
> 
> WARNINGThis email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
> I've never used these opcodes, the error message I get running:
> 
> instr 1
>   kIn line 0, p3, 1
>   kCmplx[] r2c kIn
> endin 
> 
> gives me a type error message
> 
> error:  Unable to find opcode entry for 'r2c' with matching argument types:
> Found: k[] r2c k
>        kCmplx r2c kIn ...
> Line: 11
>  from file *string* (1),Parsing failed due to syntax errors
> 
> my best guess is that it only works in combination with fft opcodes. But if that's the case, then the error message is bit misleading?
> 
> The manual example (besides ifft not being an opcode but that's easy to fix)
> http://www.csounds.com/manual/html/c2r.html
> does work.
> Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here


Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2022-10-04 15:07
FromHlöðver Sigurðsson
SubjectRe: [Csnd] [EXTERNAL] [Csnd] trying to understand complex numbers in csound
facepalm :) 

thanks!

On Tue, 4 Oct 2022 at 16:04, Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
You need an array as input. The reference manual is your friend

https://csound.com/manual/r2c.html
========================
Prof. Victor Lazzarini
Maynooth University
Ireland

> On 4 Oct 2022, at 14:32, Hlöðver Sigurðsson <hlolli@GMAIL.COM> wrote:
>
> WARNINGThis email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
> I've never used these opcodes, the error message I get running:
>
> instr 1
>   kIn line 0, p3, 1
>   kCmplx[] r2c kIn
> endin
>
> gives me a type error message
>
> error:  Unable to find opcode entry for 'r2c' with matching argument types:
> Found: k[] r2c k
>        kCmplx r2c kIn ...
> Line: 11
>  from file *string* (1),Parsing failed due to syntax errors
>
> my best guess is that it only works in combination with fft opcodes. But if that's the case, then the error message is bit misleading?
>
> The manual example (besides ifft not being an opcode but that's easy to fix)
> http://www.csounds.com/manual/html/c2r.html
> does work.
> Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here


Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2022-10-04 15:22
FromEduardo Moguillansky
SubjectRe: [Csnd] trying to understand complex numbers in csound
» csound -z1 2>&1 | grep r2c
r2c         i[]         i[]
r2c         k[]         k[]
On 04.10.22 15:32, Hlöðver Sigurðsson wrote:
I've never used these opcodes, the error message I get running:

instr 1
  kIn line 0, p3, 1
  kCmplx[] r2c kIn
endin

gives me a type error message

error:  Unable to find opcode entry for 'r2c' with matching argument types:
Found: k[] r2c k
       kCmplx r2c kIn ...
Line: 11
 from file *string* (1),Parsing failed due to syntax errors

my best guess is that it only works in combination with fft opcodes. But if that's the case, then the error message is bit misleading?

The manual example (besides ifft not being an opcode but that's easy to fix)
http://www.csounds.com/manual/html/c2r.html
does work.
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2022-10-05 02:32
FromPartev Sarkissian <0000060b2ef1338e-dmarc-request@LISTSERV.HEANET.IE>
SubjectRe: [Csnd] [EXTERNAL] [Csnd] trying to understand complex numbers in csound

Complex numbers? OH THANK YOU VICTOR. 
Didn't know there was such an opcode in there. 
Love it. 


-PBS 



-----Original Message-----
From: Victor Lazzarini <Victor.Lazzarini@MU.IE>
To: CSOUND@LISTSERV.HEANET.IE
Sent: Tue, Oct 4, 2022 3:04 pm
Subject: Re: [Csnd] [EXTERNAL] [Csnd] trying to understand complex numbers in csound

You need an array as input. The reference manual is your friend

https://csound.com/manual/r2c.html
========================
Prof. Victor Lazzarini
Maynooth University
Ireland

> On 4 Oct 2022, at 14:32, Hlöðver Sigurðsson <hlolli@GMAIL.COM> wrote:
>
> WARNINGThis email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
> I've never used these opcodes, the error message I get running:
>
> instr 1
>  kIn line 0, p3, 1
>  kCmplx[] r2c kIn
> endin
>
> gives me a type error message
>
> error:  Unable to find opcode entry for 'r2c' with matching argument types:
> Found: k[] r2c k
>        kCmplx r2c kIn ...
> Line: 11
>  from file *string* (1),Parsing failed due to syntax errors
>
> my best guess is that it only works in combination with fft opcodes. But if that's the case, then the error message is bit misleading?
>
> The manual example (besides ifft not being an opcode but that's easy to fix)
> http://www.csounds.com/manual/html/c2r.html
> does work.
> Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here



Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here