Csound Csound-dev Csound-tekno Search About

[Csnd] Disabling keyboard echo

Date2022-02-28 12:48
FromJana Hübenthal
Subject[Csnd] Disabling keyboard echo
Dear list, 

 is there a way to suppress the echo of typed characters when running csound in "old school" terminal mode? I often use the sensekey opcode, but the keyboard echo mixes up with regular screen output. 
Using the -d and/or -m0 options does not stop it.

Best,
Jana

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-02-28 13:26
Frommskala@ANSUZ.SOOKE.BC.CA
SubjectRe: [Csnd] Disabling keyboard echo
On Mon, 28 Feb 2022, Jana Hübenthal wrote:
>  is there a way to suppress the echo of typed characters when running csound in "old school" terminal mode? I often use the sensekey opcode, but the keyboard echo mixes up with regular screen output.
> Using the -d and/or -m0 options does not stop it.

I don't know about a Csound option, but depending on your operating system
it may be possible to change the echo setting with a separate command
before running Csound.  On my Linux installation,
   stty -echo
turns off echo and
   stty echo
turns it back on.

This might fail if Csound is explicitly turning on the echo setting
itself, but I doubt that it would; it is more likely completely blind to
terminal settings.

If I were doing this a lot, I might write a shell script to automatically
run these commands before and after running Csound.

-- 
Matthew Skala
mskala@ansuz.sooke.bc.ca                 People before tribes.
https://ansuz.sooke.bc.ca/

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-03-01 08:40
FromJana Hübenthal
SubjectRe: [Csnd] Disabling keyboard echo
Hi Matthew,

yes, that did the trick - exactly what I wanted. Thank you so much! Never heard of the stty command, though I'm on Ubuntu.

For more covenience, I put the whole thing into a shell script, to re-enable the echo after csound terminates and stopping the blind flight afterwards. Works like a charm :-)

Best,
Jana


> mskala@ansuz.sooke.bc.ca hat am 28.02.2022 14:26 geschrieben:
> 
>  
> On Mon, 28 Feb 2022, Jana Hübenthal wrote:
> >  is there a way to suppress the echo of typed characters when running csound in "old school" terminal mode? I often use the sensekey opcode, but the keyboard echo mixes up with regular screen output.
> > Using the -d and/or -m0 options does not stop it.
> 
> I don't know about a Csound option, but depending on your operating system
> it may be possible to change the echo setting with a separate command
> before running Csound.  On my Linux installation,
>    stty -echo
> turns off echo and
>    stty echo
> turns it back on.
> 
> This might fail if Csound is explicitly turning on the echo setting
> itself, but I doubt that it would; it is more likely completely blind to
> terminal settings.
> 
> If I were doing this a lot, I might write a shell script to automatically
> run these commands before and after running Csound.
> 
> -- 
> Matthew Skala
> mskala@ansuz.sooke.bc.ca                 People before tribes.
> https://ansuz.sooke.bc.ca/
> 
> 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