Csound Csound-dev Csound-tekno Search About

[Csnd] can -L stdin recieve an i statement via text file?

Date2019-09-22 17:25
Fromfauveboy
Subject[Csnd] can -L stdin recieve an i statement via text file?
can -L stdin receive an i statement via  text file, instead of having to type
in a whole istatement each time this quickly gets very hard to do as
instruments get more complex?




--
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

Date2019-09-22 17:30
FromVictor Lazzarini
SubjectRe: [Csnd] can -L stdin recieve an i statement via text file?
In unix-like systems, you can redirect stdin. But it defeats the purpose as then may as well have a CSD file.

Prof. Victor Lazzarini
Maynooth University
Ireland

> On 22 Sep 2019, at 17:18, fauveboy  wrote:
> 
> can -L stdin receive an i statement via  text file, instead of having to type
> in a whole istatement each time this quickly gets very hard to do as
> instruments get more complex?
> 
> 
> 
> 
> --
> 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

Date2019-09-22 18:01
Fromfauveboy
SubjectRe: [Csnd] can -L stdin recieve an i statement via text file?
Im running on arch linux. Im trying to use an istatement while my csd file is
running. I can do this after looking into redirection?

My vision is a bunch of txt files with different istatments...I can redirect
them while my csd file runs?

may I ask you to explain further how this might be done? would I in a way
running a text file to the stdin, replacing the keyboard?

I would have to do this from a different terminal window, i think. And
because of that how would csd file waiting for an istatement get reached?



--
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

Date2019-09-22 18:14
FromVictor Lazzarini
SubjectRe: [Csnd] can -L stdin recieve an i statement via text file?
Redirection would be a single file, unless you want to use a pipe. It would have to be straight as you run the csound command.

I think a better solution is to start a UDP server then send score lines to it via UDP.
You can do that by using netcat, and I think redirection would work there too, something like this

netcat -u ... < file.txt

where ... are the other relevant options for netcat (see the man page)

It's possible to integrate this with an editor like vim by configuring a command to do this. I don't have the details but I think either Steven or Hlodver would know more.

Prof. Victor Lazzarini
Maynooth University
Ireland

> On 22 Sep 2019, at 17:55, fauveboy  wrote:
> 
> Im running on arch linux. Im trying to use an istatement while my csd file is
> running. I can do this after looking into redirection?
> 
> My vision is a bunch of txt files with different istatments...I can redirect
> them while my csd file runs?
> 
> may I ask you to explain further how this might be done? would I in a way
> running a text file to the stdin, replacing the keyboard?
> 
> I would have to do this from a different terminal window, i think. And
> because of that how would csd file waiting for an istatement get reached?
> 
> 
> 
> --
> 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

Date2019-09-22 20:22
Fromfauveboy
SubjectRe: [Csnd] can -L stdin recieve an i statement via text file?
Ah i think this is as far as I can go with this idea. UDP is a protocol that
requires the internet?...Where I need a program to run just on a single
system :/ 



--
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

Date2019-09-22 21:27
Fromjohn
SubjectRe: [Csnd] can -L stdin recieve an i statement via text file?
If you are sending to 127.0.0.1 then the size of a UDP packet is almost 
certainly large (mtu 65536 on linux), but if you are sending to another 
computer on a LAN or WAN then more likely 1500 or 1492 or similar.

==John ff


On Sun, 22 Sep 2019, fauveboy wrote:

> Ah i think this is as far as I can go with this idea. UDP is a protocol that
> requires the internet?...Where I need a program to run just on a single
> system :/
>
>
>
> --
> 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

Date2019-09-22 21:37
FromPete Goodeve
SubjectRe: [Csnd] can -L stdin recieve an i statement via text file?
AttachmentsNone  

Date2019-09-22 21:41
FromPete Goodeve
SubjectRe: [Csnd] can -L stdin recieve an i statement via text file?
AttachmentsNone  

Date2019-09-22 21:47
FromPete Goodeve
SubjectRe: [Csnd] can -L stdin recieve an i statement via text file?
AttachmentsNone  

Date2019-09-22 22:00
FromVictor Lazzarini
SubjectRe: [Csnd] can -L stdin recieve an i statement via text file?
yes, you can have several senders, because UDP does not need a one-to-one connection like tcp, it's just data packets.


Prof. Victor Lazzarini
Maynooth University
Ireland

> On 22 Sep 2019, at 21:38, Pete Goodeve  wrote:
> 
>> On Sun, Sep 22, 2019 at 05:14:52PM +0000, Victor Lazzarini wrote:
>> I think a better solution is to start a UDP server then send score lines to it via UDP.
>> You can do that by using netcat, and I think redirection would work there too, something like this
>> 
>> netcat -u ... < file.txt
>> 
>> where ... are the other relevant options for netcat (see the man page)
> 
> Coincidentally, I was experimenting with similar things yesterday.
> It seems to work well.  I'm a little surprised that I can have multiple
> netcats pointing to the same UDP port, but I can.  Meaning that
> I can, say, have one terminal running "nc -u localhost 10000",
> where I can type in  events, and others with commands like
> "nc -u -w 1 localhost 10000 that will send a whole file.  The '-w 1' is needed to make netcat
> quit when done; otherwise you have to interrupt it.
> 
> 
>> 
>> It's possible to integrate this with an editor like vim by configuring a command to do this. I don't have the details but I think either Steven or Hlodver would know more.
> 
> Yes, please!  Details! (:-))  I've been wondering how one would get vim
> to send UDP...
> 
> Thanks,
>    -- Pete --
> 
> 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

Date2019-09-22 22:02
FromVictor Lazzarini
SubjectRe: [Csnd] can -L stdin recieve an i statement via text file?
If you use the superior Emacs, then Hlodver's csound-mode should do the trick
for you.

https://github.com/hlolli/csound-mode

Prof. Victor Lazzarini
Maynooth University
Ireland

On 22 Sep 2019, at 21:38, Pete Goodeve <pete.goodeve@computer.org>ck  wrote:

On Sun, Sep 22, 2019 at 05:14:52PM +0000, Victor Lazzarini wrote:
I think a better solution is to start a UDP server then send score lines to it via UDP.
You can do that by using netcat, and I think redirection would work there too, something like this

netcat -u ... < file.txt

where ... are the other relevant options for netcat (see the man page)

Coincidentally, I was experimenting with similar things yesterday.
It seems to work well.  I'm a little surprised that I can have multiple
netcats pointing to the same UDP port, but I can.  Meaning that
I can, say, have one terminal running "nc -u localhost 10000",
where I can type in  events, and others with commands like
"nc -u -w 1 localhost 10000<score"
that will send a whole file.  The '-w 1' is needed to make netcat
quit when done; otherwise you have to interrupt it.



It's possible to integrate this with an editor like vim by configuring a command to do this. I don't have the details but I think either Steven or Hlodver would know more.

Yes, please!  Details! (:-))  I've been wondering how one would get vim
to send UDP...

Thanks,
   -- Pete --

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

Date2019-09-22 23:10
Frompete.goodeve@COMPUTER.ORG
SubjectRe: [Csnd] can -L stdin recieve an i statement via text file?
AttachmentsNone  

Date2019-09-22 23:24
FromVictor Lazzarini
SubjectRe: [Csnd] can -L stdin recieve an i statement via text file?
as usual, Google is your friend

https://csound.com/site/news/2016/07/17/csound-vim

Prof. Victor Lazzarini
Maynooth University
Ireland

On 22 Sep 2019, at 23:10, pete.goodeve@COMPUTER.ORG <pete.goodeve@computer.org> wrote:

On Sun, Sep 22, 2019 at 09:02:43PM +0000, Victor Lazzarini wrote:
If you use the superior Emacs, then Hlodver's csound-mode should do the trick
for you.
(::-/)  I'm afraid I never cottoned on to emacs.  I've been familiar with vi since
prehistoric days, so vim is a good fit.  Though I don't actually use it that often.;
too many good WYSIWYG editors around.

I'm actually thinking if I see how vim does it, it might give me some ideas.

Thanks anyway.

   -- Pete

[BTW, is there any reason I'm not seeing my own posts in the mail?  I think
I was up until yesterday.]




https://github.com/hlolli/csound-mode


On 22 Sep 2019, at 21:38, Pete Goodeve <pete.goodeve@computer.org<mailto:pete.goodeve@computer.org>>ck  wrote:


It's possible to integrate this with an editor like vim by configuring a command to do this. I don't have the details but I think either Steven or Hlodver would know more.

Yes, please!  Details! (:-))  I've been wondering how one would get vim
to send UDP...


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

Date2019-09-27 19:13
Frompete.goodeve@COMPUTER.ORG
SubjectRe: [Csnd] can -L stdin recieve an i statement via text file?
AttachmentsNone