[Csnd] it says html(CsHtml5) and script not available in .csd

classic Classic list List threaded Threaded
3 messages Options
'2+
Reply | Threaded
Open this post in threaded view
|

[Csnd] it says html(CsHtml5) and script not available in .csd

'2+
hi
it's this "want some hotkeys for realtime csound" guy again
am using csound4android

with your help i can finally take advantage of those built in sliders, buttons, and trackpad
so now testing <html> and <script> tags

but running this code tells me that <Cshtml5> and <script> cannot be in the .csd file
it brings out the sine220 but pushing any key doesn't twist it to 330
am i almost there?

thank you


<CsoundSynthesizer>
<CsLicense>
</CsLicense>
<CsOptions>
-odac -dm3
</CsOptions>
<CsInstruments>
sr      =   48000
ksmps   =   48
nchnls  =   2
0dbfs   =   1

giftc  ftgen   0, 0, 131072,   10, 1

gkfreq init 220.0

alwayson    "sa"

instr sa
asigc   oscil   0.75, gkfreq, giftc, 0
outs    asigc,  asigc
endin

</CsInstruments>
<CsHtml5>
<script>
document.addEventListener("keydown", function(e){
    var kd = String.fromCharCode(e.keyCode);
    if (kd == "Z"){ z_thang();
    } else if (kd == "X"){ x_thang();
    } else if (kd == "C"){ c_thang();
    } else if (kd == "V"){ v_thang();
    } else if (kd == "B"){ b_thang();
    } else if (kd == "N"){ n_thang();
    } else if (kd == "M"){ m_thang();
    } else if (kd == "A"){ a_thang();
    } else if (kd == "S"){ s_thang();
    } else if (kd == "D"){ d_thang();
    } else if (kd == "F"){ f_thang();
    } else if (kd == "G"){ g_thang();
    } else if (kd == "H"){ h_thang();
    } else if (kd == "J"){ j_thang();
    } else if (kd == "K"){ k_thang();
    } else if (kd == "L"){ l_thang();
    } else if (kd == "Q"){ q_thang();
    } else if (kd == "W"){ w_thang();
    } else if (kd == "E"){ e_thang();
    } else if (kd == "R"){ r_thang();
    } else if (kd == "T"){ t_thang();
    } else if (kd == "Y"){ y_thang();
    } else if (kd == "U"){ u_thang();
    } else if (kd == "I"){ i_thang();
    } else if (kd == "O"){ o_thang();
    } else if (kd == "P"){ p_thang();
    } else if (kd == "1"){ one_thang();
    } else if (kd == "2"){ two_thang();
    } else if (kd == "3"){ three_thang();
    } else if (kd == "4"){ four_thang();
    } else if (kd == "5"){ five_thang();
    } else if (kd == "6"){ six_thang();
    } else if (kd == "7"){ seven_thang();
    } else if (kd == "8"){ eight_thang();
    } else if (kd == "9"){ nine_thang();
    } else if (kd == "0"){ zero_thang(); }
}, true);

function z_thang() {
    csound.setControlChannel('gkfreq',330);
}

function x_thang() {
    csound.setControlChannel('gkfreq',330);
}

function c_thang() {
    csound.setControlChannel('gkfreq',330);
}

function v_thang() {
    csound.setControlChannel('gkfreq',330);
}

function b_thang() {
    csound.setControlChannel('gkfreq',330);
}

function n_thang() {
    csound.setControlChannel('gkfreq',330);
}

function m_thang() {
    csound.setControlChannel('gkfreq',330);
}

function a_thang() {
    csound.setControlChannel('gkfreq',330);
}

function s_thang() {
    csound.setControlChannel('gkfreq',330);
}

function d_thang() {
    csound.setControlChannel('gkfreq',330);
}

function f_thang() {
    csound.setControlChannel('gkfreq',330);
}

function g_thang() {
    csound.setControlChannel('gkfreq',330);
}

function h_thang() {
    csound.setControlChannel('gkfreq',330);
}

function j_thang() {
    csound.setControlChannel('gkfreq',330);
}

function k_thang() {
    csound.setControlChannel('gkfreq',330);
}

function l_thang() {
    csound.setControlChannel('gkfreq',330);
}

function q_thang() {
    csound.setControlChannel('gkfreq',330);
}

function w_thang() {
    csound.setControlChannel('gkfreq',330);
}

function e_thang() {
    csound.setControlChannel('gkfreq',330);
}

function r_thang() {
    csound.setControlChannel('gkfreq',330);
}

function t_thang() {
    csound.setControlChannel('gkfreq',330);
}

function y_thang() {
    csound.setControlChannel('gkfreq',330);
}

function u_thang() {
    csound.setControlChannel('gkfreq',330);
}

function i_thang() {
    csound.setControlChannel('gkfreq',330);
}

function o_thang() {
    csound.setControlChannel('gkfreq',330);
}

function p_thang() {
    csound.setControlChannel('gkfreq',330);
}

function one_thang() {
    csound.setControlChannel('gkfreq',330);
}

function two_thang() {
    csound.setControlChannel('gkfreq',330);
}

function three_thang() {
    csound.setControlChannel('gkfreq',330);
}

function four_thang() {
    csound.setControlChannel('gkfreq',330);
}

function five_thang() {
    csound.setControlChannel('gkfreq',330);
}

function six_thang() {
    csound.setControlChannel('gkfreq',330);
}

function seven_thang() {
    csound.setControlChannel('gkfreq',330);
}

function eight_thang() {
    csound.setControlChannel('gkfreq',330);
}

function nine_thang() {
    csound.setControlChannel('gkfreq',330);
}

function zero_thang() {
    csound.setControlChannel('gkfreq',330);
}
</script>
</CsHtml5>
<CsScore>
</CsScore>
</CsoundSynthesizer>


--
'2+
http://sarigama.namaste.jp/
es
podcasting sus weird muzik
http://sarigama.namaste.jp/podcast/rss.xml

Csound mailing list
[hidden email]
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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] it says html(CsHtml5) and script not available in .csd

Arthur Hunkins
One observation:
the tag is now <html>, not <CsHtml5>


On Sat, Aug 26, 2017 at 2:52 AM, '2+ <[hidden email]> wrote:
hi
it's this "want some hotkeys for realtime csound" guy again
am using csound4android

with your help i can finally take advantage of those built in sliders, buttons, and trackpad
so now testing <html> and <script> tags

but running this code tells me that <Cshtml5> and <script> cannot be in the .csd file
it brings out the sine220 but pushing any key doesn't twist it to 330
am i almost there?

thank you


<CsoundSynthesizer>
<CsLicense>
</CsLicense>
<CsOptions>
-odac -dm3
</CsOptions>
<CsInstruments>
sr      =   48000
ksmps   =   48
nchnls  =   2
0dbfs   =   1

giftc  ftgen   0, 0, 131072,   10, 1

gkfreq init 220.0

alwayson    "sa"

instr sa
asigc   oscil   0.75, gkfreq, giftc, 0
outs    asigc,  asigc
endin

</CsInstruments>
<CsHtml5>
<script>
document.addEventListener("keydown", function(e){
    var kd = String.fromCharCode(e.keyCode);
    if (kd == "Z"){ z_thang();
    } else if (kd == "X"){ x_thang();
    } else if (kd == "C"){ c_thang();
    } else if (kd == "V"){ v_thang();
    } else if (kd == "B"){ b_thang();
    } else if (kd == "N"){ n_thang();
    } else if (kd == "M"){ m_thang();
    } else if (kd == "A"){ a_thang();
    } else if (kd == "S"){ s_thang();
    } else if (kd == "D"){ d_thang();
    } else if (kd == "F"){ f_thang();
    } else if (kd == "G"){ g_thang();
    } else if (kd == "H"){ h_thang();
    } else if (kd == "J"){ j_thang();
    } else if (kd == "K"){ k_thang();
    } else if (kd == "L"){ l_thang();
    } else if (kd == "Q"){ q_thang();
    } else if (kd == "W"){ w_thang();
    } else if (kd == "E"){ e_thang();
    } else if (kd == "R"){ r_thang();
    } else if (kd == "T"){ t_thang();
    } else if (kd == "Y"){ y_thang();
    } else if (kd == "U"){ u_thang();
    } else if (kd == "I"){ i_thang();
    } else if (kd == "O"){ o_thang();
    } else if (kd == "P"){ p_thang();
    } else if (kd == "1"){ one_thang();
    } else if (kd == "2"){ two_thang();
    } else if (kd == "3"){ three_thang();
    } else if (kd == "4"){ four_thang();
    } else if (kd == "5"){ five_thang();
    } else if (kd == "6"){ six_thang();
    } else if (kd == "7"){ seven_thang();
    } else if (kd == "8"){ eight_thang();
    } else if (kd == "9"){ nine_thang();
    } else if (kd == "0"){ zero_thang(); }
}, true);

function z_thang() {
    csound.setControlChannel('gkfreq',330);
}

function x_thang() {
    csound.setControlChannel('gkfreq',330);
}

function c_thang() {
    csound.setControlChannel('gkfreq',330);
}

function v_thang() {
    csound.setControlChannel('gkfreq',330);
}

function b_thang() {
    csound.setControlChannel('gkfreq',330);
}

function n_thang() {
    csound.setControlChannel('gkfreq',330);
}

function m_thang() {
    csound.setControlChannel('gkfreq',330);
}

function a_thang() {
    csound.setControlChannel('gkfreq',330);
}

function s_thang() {
    csound.setControlChannel('gkfreq',330);
}

function d_thang() {
    csound.setControlChannel('gkfreq',330);
}

function f_thang() {
    csound.setControlChannel('gkfreq',330);
}

function g_thang() {
    csound.setControlChannel('gkfreq',330);
}

function h_thang() {
    csound.setControlChannel('gkfreq',330);
}

function j_thang() {
    csound.setControlChannel('gkfreq',330);
}

function k_thang() {
    csound.setControlChannel('gkfreq',330);
}

function l_thang() {
    csound.setControlChannel('gkfreq',330);
}

function q_thang() {
    csound.setControlChannel('gkfreq',330);
}

function w_thang() {
    csound.setControlChannel('gkfreq',330);
}

function e_thang() {
    csound.setControlChannel('gkfreq',330);
}

function r_thang() {
    csound.setControlChannel('gkfreq',330);
}

function t_thang() {
    csound.setControlChannel('gkfreq',330);
}

function y_thang() {
    csound.setControlChannel('gkfreq',330);
}

function u_thang() {
    csound.setControlChannel('gkfreq',330);
}

function i_thang() {
    csound.setControlChannel('gkfreq',330);
}

function o_thang() {
    csound.setControlChannel('gkfreq',330);
}

function p_thang() {
    csound.setControlChannel('gkfreq',330);
}

function one_thang() {
    csound.setControlChannel('gkfreq',330);
}

function two_thang() {
    csound.setControlChannel('gkfreq',330);
}

function three_thang() {
    csound.setControlChannel('gkfreq',330);
}

function four_thang() {
    csound.setControlChannel('gkfreq',330);
}

function five_thang() {
    csound.setControlChannel('gkfreq',330);
}

function six_thang() {
    csound.setControlChannel('gkfreq',330);
}

function seven_thang() {
    csound.setControlChannel('gkfreq',330);
}

function eight_thang() {
    csound.setControlChannel('gkfreq',330);
}

function nine_thang() {
    csound.setControlChannel('gkfreq',330);
}

function zero_thang() {
    csound.setControlChannel('gkfreq',330);
}
</script>
</CsHtml5>
<CsScore>
</CsScore>
</CsoundSynthesizer>


--
'2+
http://sarigama.namaste.jp/
es
podcasting sus weird muzik
http://sarigama.namaste.jp/podcast/rss.xml

Csound mailing list
[hidden email]
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 [hidden email] 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
'2+
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] it says html(CsHtml5) and script not available in .csd

'2+
thank you
but both <html> and <CsHtml5> didn't make it

mine is csound4android6.09.0beta2
and my YogaBook has android6.0.1 on it

i think i have to look for more examples 

2017/08/27 午前1:41 "Arthur Hunkins" <[hidden email]>:
One observation:
the tag is now <html>, not <CsHtml5>


On Sat, Aug 26, 2017 at 2:52 AM, '2+ <[hidden email]> wrote:
hi
it's this "want some hotkeys for realtime csound" guy again
am using csound4android

with your help i can finally take advantage of those built in sliders, buttons, and trackpad
so now testing <html> and <script> tags

but running this code tells me that <Cshtml5> and <script> cannot be in the .csd file
it brings out the sine220 but pushing any key doesn't twist it to 330
am i almost there?

thank you


<CsoundSynthesizer>
<CsLicense>
</CsLicense>
<CsOptions>
-odac -dm3
</CsOptions>
<CsInstruments>
sr      =   48000
ksmps   =   48
nchnls  =   2
0dbfs   =   1

giftc  ftgen   0, 0, 131072,   10, 1

gkfreq init 220.0

alwayson    "sa"

instr sa
asigc   oscil   0.75, gkfreq, giftc, 0
outs    asigc,  asigc
endin

</CsInstruments>
<CsHtml5>
<script>
document.addEventListener("keydown", function(e){
    var kd = String.fromCharCode(e.keyCode);
    if (kd == "Z"){ z_thang();
    } else if (kd == "X"){ x_thang();
    } else if (kd == "C"){ c_thang();
    } else if (kd == "V"){ v_thang();
    } else if (kd == "B"){ b_thang();
    } else if (kd == "N"){ n_thang();
    } else if (kd == "M"){ m_thang();
    } else if (kd == "A"){ a_thang();
    } else if (kd == "S"){ s_thang();
    } else if (kd == "D"){ d_thang();
    } else if (kd == "F"){ f_thang();
    } else if (kd == "G"){ g_thang();
    } else if (kd == "H"){ h_thang();
    } else if (kd == "J"){ j_thang();
    } else if (kd == "K"){ k_thang();
    } else if (kd == "L"){ l_thang();
    } else if (kd == "Q"){ q_thang();
    } else if (kd == "W"){ w_thang();
    } else if (kd == "E"){ e_thang();
    } else if (kd == "R"){ r_thang();
    } else if (kd == "T"){ t_thang();
    } else if (kd == "Y"){ y_thang();
    } else if (kd == "U"){ u_thang();
    } else if (kd == "I"){ i_thang();
    } else if (kd == "O"){ o_thang();
    } else if (kd == "P"){ p_thang();
    } else if (kd == "1"){ one_thang();
    } else if (kd == "2"){ two_thang();
    } else if (kd == "3"){ three_thang();
    } else if (kd == "4"){ four_thang();
    } else if (kd == "5"){ five_thang();
    } else if (kd == "6"){ six_thang();
    } else if (kd == "7"){ seven_thang();
    } else if (kd == "8"){ eight_thang();
    } else if (kd == "9"){ nine_thang();
    } else if (kd == "0"){ zero_thang(); }
}, true);

function z_thang() {
    csound.setControlChannel('gkfreq',330);
}

function x_thang() {
    csound.setControlChannel('gkfreq',330);
}

function c_thang() {
    csound.setControlChannel('gkfreq',330);
}

function v_thang() {
    csound.setControlChannel('gkfreq',330);
}

function b_thang() {
    csound.setControlChannel('gkfreq',330);
}

function n_thang() {
    csound.setControlChannel('gkfreq',330);
}

function m_thang() {
    csound.setControlChannel('gkfreq',330);
}

function a_thang() {
    csound.setControlChannel('gkfreq',330);
}

function s_thang() {
    csound.setControlChannel('gkfreq',330);
}

function d_thang() {
    csound.setControlChannel('gkfreq',330);
}

function f_thang() {
    csound.setControlChannel('gkfreq',330);
}

function g_thang() {
    csound.setControlChannel('gkfreq',330);
}

function h_thang() {
    csound.setControlChannel('gkfreq',330);
}

function j_thang() {
    csound.setControlChannel('gkfreq',330);
}

function k_thang() {
    csound.setControlChannel('gkfreq',330);
}

function l_thang() {
    csound.setControlChannel('gkfreq',330);
}

function q_thang() {
    csound.setControlChannel('gkfreq',330);
}

function w_thang() {
    csound.setControlChannel('gkfreq',330);
}

function e_thang() {
    csound.setControlChannel('gkfreq',330);
}

function r_thang() {
    csound.setControlChannel('gkfreq',330);
}

function t_thang() {
    csound.setControlChannel('gkfreq',330);
}

function y_thang() {
    csound.setControlChannel('gkfreq',330);
}

function u_thang() {
    csound.setControlChannel('gkfreq',330);
}

function i_thang() {
    csound.setControlChannel('gkfreq',330);
}

function o_thang() {
    csound.setControlChannel('gkfreq',330);
}

function p_thang() {
    csound.setControlChannel('gkfreq',330);
}

function one_thang() {
    csound.setControlChannel('gkfreq',330);
}

function two_thang() {
    csound.setControlChannel('gkfreq',330);
}

function three_thang() {
    csound.setControlChannel('gkfreq',330);
}

function four_thang() {
    csound.setControlChannel('gkfreq',330);
}

function five_thang() {
    csound.setControlChannel('gkfreq',330);
}

function six_thang() {
    csound.setControlChannel('gkfreq',330);
}

function seven_thang() {
    csound.setControlChannel('gkfreq',330);
}

function eight_thang() {
    csound.setControlChannel('gkfreq',330);
}

function nine_thang() {
    csound.setControlChannel('gkfreq',330);
}

function zero_thang() {
    csound.setControlChannel('gkfreq',330);
}
</script>
</CsHtml5>
<CsScore>
</CsScore>
</CsoundSynthesizer>


--
'2+
http://sarigama.namaste.jp/
es
podcasting sus weird muzik
http://sarigama.namaste.jp/podcast/rss.xml

Csound mailing list
[hidden email]
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 [hidden email] 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 [hidden email] 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