Csound Csound-dev Csound-tekno Search About

[Csnd] PD event message send filelen input

Date2018-10-19 16:21
Fromfauveboy
Subject[Csnd] PD event message send filelen input
running a program with the orc here:

instr 1
ilen filelen p4
      outvalue "filelen", ilen
print ilen

endin

and score:
i 1 0 10000 "filewav"

runs fine. ilen prints the file length in seconds to the console.
But If i remove the i statement and make it an event in pure data 

the compiler says 
ilen = na

why is this?
Many thanks

J



--
Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html

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

Date2018-10-20 11:29
Fromfauveboy
SubjectRe: [Csnd] PD event message send filelen input
I've now attached the pd patch and csound file im using... c_pd.csd
   PdToC.pd
  



--
Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html

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

Date2018-10-21 20:46
Fromjoachim heintz
SubjectRe: [Csnd] PD event message send filelen input
i tried your patch, and i think the problem is to send a string to 
csound via pd.

when i have a pd message box with
	event i 1 0 1 "bla"

and in csound:

instr 1
print p4
endin

i get
p4 = 0.00


i am not sure it is possible to transfer strings from pd to csound.
did you ever try this?

	joachim



On 20/10/18 12:29, fauveboy wrote:
> I've now attached the pd patch and csound file im using... c_pd.csd
>    PdToC.pd
> 
>
>
>
> --
> Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html
>
> 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

Date2018-10-22 06:17
Fromfauveboy
SubjectRe: [Csnd] PD event message send filelen input
Okay, arrange the patch and .csd without the string coming fro pd has worked,
thank you ! 



--
Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html

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

Date2018-10-22 06:35
Fromfauveboy
SubjectRe: [Csnd] PD event message send filelen input
I now can't send the "file" as event to csound which mean its needs to be
written into the csound instrument not as a p-field parameter. is there away
to get a file length without using a string?



--
Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html

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

Date2018-10-22 12:14
Fromjoachim heintz
SubjectRe: [Csnd] PD event message send filelen input
the old way to do this is to name your soundfile soundin.N (where N is 
an integer).  going back to this old feature you could for instance send 
the number (not string) 1 as p4, and csound will look for soundin.1.

but this is of course not very nice ...

slightly better would be to make a list with streset, like
strset 1, "bla.wav"
(and then you can send 1 and it will get "bla.wav")

the best way would be to send the string with an event message box from 
pd, and then receive it in csound with chnget.  i just tried this and it 
did not work, so i am afraid it is not possible.  if true, we can ask 
victor whether it would be possible to implement it.

ciao -
	joachim




On 22/10/18 07:35, fauveboy wrote:
> I now can't send the "file" as event to csound which mean its needs to be
> written into the csound instrument not as a p-field parameter. is there away
> to get a file length without using a string?
>
>
>
> --
> Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html
>
> 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