Csound Csound-dev Csound-tekno Search About

[Csnd] sensekey in csound 6.13

Date2019-09-23 10:40
Fromluis antunes pena
Subject[Csnd] sensekey in csound 6.13
Dear developers,

the sensekey opcode has now a different behaviour since 6.13. Pressing a key, it returns not only the ASCII number but also -1. I know there was some changes made in the code. Is it the expected behaviour? Bellow you'll find an example.

I'm using csound 6.13 on mac osx 10.12.6 running csound on the terminal.

Best,

Luís

new alloc for instr 1:
 i1    -1.00000
a i1    97.00000
 i1    -1.00000
a i1    97.00000
 i1    -1.00000

Here's the code:

<CsoundSynthesizer>
<CsOptions>
-d -odac
</CsOptions>
<CsInstruments>

sr = 44100
ksmps = 128
nchnls = 2
0dbfs = 1.0

;-----------------------------------------------------------
instr 1
kres, kkey sensekey
printk2 kres
; printk2 kkey, 10
endin
;-----------------------------------------------------------

</CsInstruments>
<CsScore>
i1 0 36000
</CsScore>
</CsoundSynthesizer>



http://luisantunespena.eu
http://sumtone.com

Date2019-09-23 10:59
FromJohn ff
SubjectRe: [Csnd] sensekey in csound 6.13
Looks what I expect.  Minus 1 means no key pressed.

⁣Sent from TypeApp ​

On Sep 23, 2019, 10:41, at 10:41, luis antunes pena  wrote:
>Dear developers,
>
>the sensekey opcode has now a different behaviour
>since 6.13. Pressing a key, it returns not only
>the ASCII number but also -1. I know there was
>some changes made in the code. Is it the expected
>behaviour? Bellow you'll find an example.
>
>I'm using csound 6.13 on mac osx 10.12.6 running
>csound on the terminal.
>
>Best,
>
>Luís
>
>new alloc for instr 1:
>  i1    -1.00000
>a i1    97.00000
>  i1    -1.00000
>a i1    97.00000
>  i1    -1.00000
>
>Here's the code:
>
>
>
>-d -odac
>
>
>
>sr = 44100
>ksmps = 128
>nchnls = 2
>0dbfs = 1.0
>
>;-----------------------------------------------------------
>instr 1
>kres, kkey sensekey
>printk2 kres
>; printk2 kkey, 10
>endin
>;-----------------------------------------------------------
>
>
>
>i1 0 36000
>
>
>
>
>--------------------------------------------------
>http://luisantunespena.eu
>http://sumtone.com
>
>
>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