panavrin / live-writing-osc

0 stars 1 forks source link

(1) osc messages for space and enter #1

Closed panavrin closed 7 years ago

panavrin commented 7 years ago

(1) The following keys have no assigned key_stroke: space bar, tab, return, enter. The OSC address space for these keys appears as: </added/line/position/> Is it possible to assign a key_stroke or Javascript event keycode for each. For example, tab would appear as </added/line/position/9> or </added/line/position/tab>. Return, or Enter, would be </added/line/position/13> or </added/line/position/enter>

Very clever naming strategy: /added, /removed. Very clear and intuitive. Thank you.

panavrin commented 7 years ago

I added another osc message when entered key is not alphabet. It will send Messages such as /key/9 /key/13 and so forth.

dandrewstewart commented 7 years ago

Would it be possible to "send" space (space bar) and return/enter values from App to LW? That is to say, the syntax for: /added hello (Add "hello" at current cursor position) and /added hello 0 1 (Add "hello" at line 0, position 1) are working fine. However, these OSC messages will not allow me to start a "new" line. From my App, I would like to be able start a new line. /added hello 0 1 only works "if" I have already started the line and added text.

How about a new OSC address; something like: /added 13 (13 for return) and /added 32 (32 for space bar)? By the way, when sending from App to LW, perhaps the OSC addresses should be: /add and /remove, instead of /added and /removed. Do you see what I mean? Thanks.

panavrin commented 7 years ago

yes it is possible. and it is done!

/add 32 will add a space where the cursor is. /add 13 will add return where the cursor is.

The potential problem on this is that you cannot add "32" or "13" in one shot but I guess that is okay?

Also I changed /added to /add and /removed to /remove

panavrin commented 7 years ago

p.s. I am curious what you are going to make with these. :) p.s. you are enjoying the github issues!

dandrewstewart commented 7 years ago

Bravo. Thanks. In the concert, I'm considering making the 3rd page entirely written by Max, while I manipulate the sound – give my concentration to the audio.

RE: github issues I hope you can follow me. I'm sorry if I seem to be added/deleting/adding, etc. . First time using this method of documenting issues. I just have to remember to "unsubscribe" each time I contribute to a thread.

panavrin commented 7 years ago

awesome. looking forward to it.