[Csnd] hotkey brainstorming for csound4android

classic Classic list List threaded Threaded
7 messages Options
'2+
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Csnd] hotkey brainstorming for csound4android

'2+
since i was trying to build hotkey instuments with WebAudioApi
learning that csound4android can handle javascript
is bringing me big hope
am now about to turn myself realtime-oriented taking advantage of this app on yogabook(lenovo,android6)
which looks like a notepc but is equipped with a wacom tablet that lights up a virtual-keyboard

my plan on this machine is to
1) use the default gui
2) make this virtual-keyboard hot and twist the running oscillators
3) use wacom-pen to control play music if thats possible

went roughly through the examples but it seems there are very few info related to the usage of javascript
followings are the script am using for WebAudioApi
can i simply copy n paste it to somewhere in the .scd file?
well yes i should replace the function_thangs with something suitable for the app

btw.
related to 1) .. what does those buttons do?
i learned that the value each of those guis returns somewhere between 0.0-1.0
but it's a button .. value is fixed?


---8<---

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

--
'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
|  
Report Content as Inappropriate

Re: [Csnd] hotkey brainstorming for csound4android

Steven Yi
I'm not sure I understand the question exactly, but any JS code would
not go into a CSD file.  Instead, a web page would typically include
the Javascript Csound engine and control it through the API.  You
would write your sound-related code in Csound CSD, then load with the
JS Csound engine and run it. Then, use the API from your JS code to do
things like send values over channels, execute events, read new
orchestra code, or evaluate text as score.

On Fri, Jul 21, 2017 at 8:15 PM, '2+ <[hidden email]> wrote:

> since i was trying to build hotkey instuments with WebAudioApi
> learning that csound4android can handle javascript
> is bringing me big hope
> am now about to turn myself realtime-oriented taking advantage of this app on yogabook(lenovo,android6)
> which looks like a notepc but is equipped with a wacom tablet that lights up a virtual-keyboard
>
> my plan on this machine is to
> 1) use the default gui
> 2) make this virtual-keyboard hot and twist the running oscillators
> 3) use wacom-pen to control play music if thats possible
>
> went roughly through the examples but it seems there are very few info related to the usage of javascript
> followings are the script am using for WebAudioApi
> can i simply copy n paste it to somewhere in the .scd file?
> well yes i should replace the function_thangs with something suitable for the app
>
> btw.
> related to 1) .. what does those buttons do?
> i learned that the value each of those guis returns somewhere between 0.0-1.0
> but it's a button .. value is fixed?
>
>
> ---8<---
>
> 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);
>
> --
> '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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Csnd] hotkey brainstorming for csound4android

Michael Gogins-2
JavaScript code can go into an <html> element in a CSD file. This will
work in the Csound for Android app and in the development version,
soon to be released, of CsoundQt.

What Steven is describing will work in Csound for Emscripten, Csound
for PNaCl, Csound for WebAssembly, and the development version of
CsoundQt, so this is probably a better way to go.

Regards,
Mike

-----------------------------------------------------
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Sun, Jul 23, 2017 at 5:32 PM, Steven Yi <[hidden email]> wrote:

> I'm not sure I understand the question exactly, but any JS code would
> not go into a CSD file.  Instead, a web page would typically include
> the Javascript Csound engine and control it through the API.  You
> would write your sound-related code in Csound CSD, then load with the
> JS Csound engine and run it. Then, use the API from your JS code to do
> things like send values over channels, execute events, read new
> orchestra code, or evaluate text as score.
>
> On Fri, Jul 21, 2017 at 8:15 PM, '2+ <[hidden email]> wrote:
>> since i was trying to build hotkey instuments with WebAudioApi
>> learning that csound4android can handle javascript
>> is bringing me big hope
>> am now about to turn myself realtime-oriented taking advantage of this app on yogabook(lenovo,android6)
>> which looks like a notepc but is equipped with a wacom tablet that lights up a virtual-keyboard
>>
>> my plan on this machine is to
>> 1) use the default gui
>> 2) make this virtual-keyboard hot and twist the running oscillators
>> 3) use wacom-pen to control play music if thats possible
>>
>> went roughly through the examples but it seems there are very few info related to the usage of javascript
>> followings are the script am using for WebAudioApi
>> can i simply copy n paste it to somewhere in the .scd file?
>> well yes i should replace the function_thangs with something suitable for the app
>>
>> btw.
>> related to 1) .. what does those buttons do?
>> i learned that the value each of those guis returns somewhere between 0.0-1.0
>> but it's a button .. value is fixed?
>>
>>
>> ---8<---
>>
>> 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);
>>
>> --
>> '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
'2+
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Csnd] hotkey brainstorming for csound4android

'2+
hi! thanks for the replies
is Michael saying that i should wait for the update of CsoundQt(4android) and control it from Chrome?
csound4android is already there and i know almost nothing about server related things .. am a local end-user .. so if it does the js thing it looks perfect for my plan.. no?

On Sun, Jul 23, 2017 at 05:46:05PM -0400, Michael Gogins wrote:
> JavaScript code can go into an <html> element in a CSD file. This will
> work in the Csound for Android app and in the development version,
> soon to be released, of CsoundQt.
>
> What Steven is describing will work in Csound for Emscripten, Csound
> for PNaCl, Csound for WebAssembly, and the development version of
> CsoundQt, so this is probably a better way to go.
>

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
|  
Report Content as Inappropriate

[Csnd] does CsoundQt work in VT? was hotkey brainstorming for csound4android

'2+
In reply to this post by Michael Gogins-2
then
in order to get prepared to take advantage of that hotkey.js aspect of CsoundQt
and since for that my platform will be chromeos+crouton-debian-unstable
wondering if CsoundQt will also work in VT
i mean "no GUI but hot Keyboard"

thinking about this cuz
am about to upgrade my crouton-cli-xtra-jessie to crouton-cli-sid
but if having a desktop is a MUST for my way of using CsoundQt
i'd rather keep jessie-CUI there and do another install of crouton with unstable-desktop mainly only for CsoundQt

thanks in advance ;)

On Sun, Jul 23, 2017 at 05:46:05PM -0400, Michael Gogins wrote:
> JavaScript code can go into an <html> element in a CSD file. This will
> work in the Csound for Android app and in the development version,
> soon to be released, of CsoundQt.
>

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
|  
Report Content as Inappropriate

Re: [Csnd] hotkey brainstorming for csound4android

Tarmo Johannes-3
In reply to this post by '2+
Hi,

I saw your other email but I try to answer here as it is probably a bit more
of the kern problem.

If your device runs Android, you can use Csound for Android already
https://play.google.com/store/apps/details?id=com.csounds.Csound6&hl=en

and it supports UI-s written in html -  you need to select html based UI
instead of builtin UI somewhere in settings (sorry, I don't have it bow by
hand). You can add the html part directly to your csd
see more http://write.flossmanuals.net/csound/h-csound-and-html/

So yo can use write a completey custom GUI using javascript etc for your
application.

Soon you can use CsoundQt to prepare and run such csd  (or run just html files
that use csound object), but you don't need it per se.

CsoundQt is meant primarly for desktop environments and would not build easily
on Android, I am afraid. I don't know much about ChoromeOS and would be very
itneresting to find out if CsoundQt can be built on it.

On the other hand you can bypass them both and use Csound for WebaAsembly that
runs directly in your browser (this is quite new thing and I have not tried
using it yet)
https://michaelgogins.tumblr.com/post/152579055048/webassembly
Examples on:
https://csound.github.io/wasm/




On laupäev, 22. juuli 2017 9:15.57 EEST you wrote:

> since i was trying to build hotkey instuments with WebAudioApi
> learning that csound4android can handle javascript
> is bringing me big hope
> am now about to turn myself realtime-oriented taking advantage of this app
> on yogabook(lenovo,android6) which looks like a notepc but is equipped with
> a wacom tablet that lights up a virtual-keyboard
>
> my plan on this machine is to
> 1) use the default gui
> 2) make this virtual-keyboard hot and twist the running oscillators
> 3) use wacom-pen to control play music if thats possible
>
> went roughly through the examples but it seems there are very few info
> related to the usage of javascript followings are the script am using for
> WebAudioApi
> can i simply copy n paste it to somewhere in the .scd file?
> well yes i should replace the function_thangs with something suitable for
> the app
>
> btw.
> related to 1) .. what does those buttons do?
> i learned that the value each of those guis returns somewhere between
> 0.0-1.0 but it's a button .. value is fixed?
>
>
> ---8<---
>
> 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);

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
|  
Report Content as Inappropriate

Re: [Csnd] hotkey brainstorming for csound4android

'2+
thanks for lots of pointers
it seems am very bad at finding examples :(
yes i already have csound4android installed so maybe its just how much harder i can try and error..

on the other hand crouton is a very strong tool for chromeos which makes it so easy to bring us chrooted linux environment on chromebook..
so if CsoundQt(the one with js) is coming to sid's repo i can simply apt install it..

well i'll stick to both anyways ;)

On Jul 28, 2017 3:01 PM, "Tarmo Johannes" <[hidden email]> wrote:
Hi,

I saw your other email but I try to answer here as it is probably a bit more
of the kern problem.

If your device runs Android, you can use Csound for Android already
https://play.google.com/store/apps/details?id=com.csounds.Csound6&hl=en

and it supports UI-s written in html -  you need to select html based UI
instead of builtin UI somewhere in settings (sorry, I don't have it bow by
hand). You can add the html part directly to your csd
see more http://write.flossmanuals.net/csound/h-csound-and-html/

So yo can use write a completey custom GUI using javascript etc for your
application.

Soon you can use CsoundQt to prepare and run such csd  (or run just html files
that use csound object), but you don't need it per se.

CsoundQt is meant primarly for desktop environments and would not build easily
on Android, I am afraid. I don't know much about ChoromeOS and would be very
itneresting to find out if CsoundQt can be built on it.

On the other hand you can bypass them both and use Csound for WebaAsembly that
runs directly in your browser (this is quite new thing and I have not tried
using it yet)
https://michaelgogins.tumblr.com/post/152579055048/webassembly
Examples on:
https://csound.github.io/wasm/




On laupäev, 22. juuli 2017 9:15.57 EEST you wrote:
> since i was trying to build hotkey instuments with WebAudioApi
> learning that csound4android can handle javascript
> is bringing me big hope
> am now about to turn myself realtime-oriented taking advantage of this app
> on yogabook(lenovo,android6) which looks like a notepc but is equipped with
> a wacom tablet that lights up a virtual-keyboard
>
> my plan on this machine is to
> 1) use the default gui
> 2) make this virtual-keyboard hot and twist the running oscillators
> 3) use wacom-pen to control play music if thats possible
>
> went roughly through the examples but it seems there are very few info
> related to the usage of javascript followings are the script am using for
> WebAudioApi
> can i simply copy n paste it to somewhere in the .scd file?
> well yes i should replace the function_thangs with something suitable for
> the app
>
> btw.
> related to 1) .. what does those buttons do?
> i learned that the value each of those guis returns somewhere between
> 0.0-1.0 but it's a button .. value is fixed?
>
>
> ---8<---
>
> 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);

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