Re: [PD] Aciles - the world's worst web server in Pd

2016-11-22 Thread Billy Stiltner
lol

just showed up in my facebook news feed 1 year ago
Billy Stiltner 
November 22, 2015
 ยท


I try to keep from using any toolkits, frameworks, libraries, etc.. that
are not part of a default installation of preferred OS which at the moment
is Linux in the flavor of Ubuntu Studio. Am trying to keep my synth cross
platform. Some parts of the recent developments have been programmed using
javascript and a web browser for the UI. This made rapid development easy.
Some things need redone so that future editing will be easy. Like the mode
display and selection.
It was easy to grab the raw text from the scala mode list then do search
and replace in a text editor to add the html and javascript required for
the user interaction and sending the mode data to the synthesizer. The
problem with this is that there are other parts of the interface that also
send modes and other information to the synthesizer so including a list of
1000s of modes along with their name, etc... kind of makes the source
editing slow and confusing so
The mode data needs to be in a text file and loaded up by javascript then
instead of listing the modes all in a huge list , a smaller subset of the
entire list only need be displayed at one time. A good division of the list
would be grouping by period. It's how the modes are grouped visually in the
big list.
Another problem is the use of JAVA only for creating a TCP or UDP socket in
order to communicate with the synth. JAVA is ok, there have been security
risks with it in the past which is not my concern. The concern is that it's
way too much overhead for adding raw socket capabilities to the browser and
updates often result in an inoperable configuration. I have downloaded
node.js to tinker with but Am having 2nd thoughts about this. I'm not sure
that node will be something that will last. Something that has been working
very good for a really long time without changes that affect old programs
is opengl and xwindows. So what I'm wondering is that if I use node.js to
provide a raw socket between the browser and synthesizer, will it be easy
to include that with the synthesizer and have users easily install the
required parts to make node.js work? So far it seems like a lot of extra
work. Maybe I ought to just make a .ws server patch in puredata and use
html5's websockets. On another note what is this uv_tree thing? looking at
the headers with node I find some similarities in my old dynamic response
loading operating system in that the first things declared are handles, and
a list object (node) of which every other object created inherits
properties from. As the evolution of the objects proceed ...


On Tue, Nov 22, 2016 at 2:07 AM, Billy Stiltner 
wrote:

> the / and ; aRE  being prepended with / so it's a tcl tk thing i guess,
>
>
> On Fri, Nov 18, 2016 at 9:32 PM, Billy Stiltner 
> wrote:
>
>> re: "Yeah it would be but the sticking point is going to be the small
>> amount of crypto stuff that websockets require. Not impossible mayb"
>> it's all in here,
>>
>> https://sourceforge.net/projects/websocketserverinapatch/files/
>>
>> looks like  lots of things could be simplified as well as
>> use of the vanilla netrecieve
>>
>> i don't have tof/toasci or would test it out
>>
>>
>> one thing i dont undrstand about  aciles is why the 2nd netreceive within
>> the server?
>>
>
>
___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list


Re: [PD] Aciles - the world's worst web server in Pd

2016-11-21 Thread Billy Stiltner
the / and ; aRE  being prepended with / so it's a tcl tk thing i guess,


On Fri, Nov 18, 2016 at 9:32 PM, Billy Stiltner 
wrote:

> re: "Yeah it would be but the sticking point is going to be the small
> amount of crypto stuff that websockets require. Not impossible mayb"
> it's all in here,
>
> https://sourceforge.net/projects/websocketserverinapatch/files/
>
> looks like  lots of things could be simplified as well as
> use of the vanilla netrecieve
>
> i don't have tof/toasci or would test it out
>
>
> one thing i dont undrstand about  aciles is why the 2nd netreceive within
> the server?
>
___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list


Re: [PD] Aciles - the world's worst web server in Pd

2016-11-18 Thread Billy Stiltner
re: "Yeah it would be but the sticking point is going to be the small
amount of crypto stuff that websockets require. Not impossible mayb"
it's all in here,

https://sourceforge.net/projects/websocketserverinapatch/files/

looks like  lots of things could be simplified as well as
use of the vanilla netrecieve

i don't have tof/toasci or would test it out


one thing i dont undrstand about  aciles is why the 2nd netreceive within
the server?
___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list


Re: [PD] Aciles - the world's worst web server in Pd

2016-11-18 Thread Chris McCormick

On 18/11/16 18:19, Billy Stiltner wrote:

apparently when i thought it was running from your server it was running
locally,
so I downloaded it,  read your documentation and just changed it so that
the index.html


Awesome!


loads the js from its own folder, it's kinda hard to follow but
looks like there is less overhead than a websocket server in pd

> I say looks like, only from what is seen in the pd patch.

The reason I didn't implement a websocket server is because I'd have to 
figure out how to do sha hashing in pure-Pd and that is more effort 
than I can put in right now.



now how do i get it to speak FUDI?


That's the default mode of operation pretty much. You can send arbitrary 
Pd data back and forth.



the semicolons are preceded by a slash in your messagebox, not sure if
that will work like a semicolon not preceded by a slash.


I will have to double check that. Not sure what is going on there.


I would imagine that this would be ok to send  2d arrays right?
what about sequencing from javascript?


Arrays might work ok if they're not too huge. Basically if all of the 
data crosses from the browser to Pd in one hit and then there is a pause 
while the connection is re-established (it is broken after each send).


For the same reason doing the sequencing from the JS side sounds risky 
and will probably introduce bad latency.


What I would do instead is use it to build lightweight UIs in HTML/JS 
and do all the time/dsp critical stuff on the Pd side. You can send 
tick/position indicator from Pd back to the browser and then it doesn't 
matter if it looks a little out of sync, as long as it doesn't sound out 
of sync.



javascript isn't good enough even for a 90 bpm sequencer sending note
ons and offs monophonically, the play position indicator falls behind
then the messages start lagging, this is with setTimeOut() not the nifty
new
html audio dsp clock,


You can get things pretty tight doing it the latter way. Check out Chris 
Wilson's work with in-browser metronomes. The cljs-bach project looks 
pretty wild as well if you are into LISP. :)



but i reckon you could implement a an edit  view
piano roll  or multiple ones of the step sequencer in the browser and update
a storage object in pd just sending messages about when you add or
delete a note. then when playing the sequence pd can send  a click every
bar or something in case the html view gets behind.


That sounds awesome! Anything where you are doing mostly UI stuff in the 
browser and just sending configuration back to Pd should work ok.



and another thing - do you have to  connect or open the connection
everytime you send a message to the server from a web browser?
> with sockets in JAVA you just open the connection once and it stays 
alive.


Yep that's exactly how it works. Well actually I think keep-alive is on 
so the actual socket stays open but the important thing is there is a 
small delay while the browser prepares another "GET" request and if you 
try to send data back from Pd to the browser while that GET has not yet 
initiated then the browser will ignore it.


If netsend were able to do targeting by ip:port source then it would be 
possible to interleave two connections to make it more robust.



at any rate, nice job making the worst webserver in the world, lol


Thank you, and thank you for your interest!


re: joe
did you see the pd websocket server?
it has some similar parts but looks way more complicated and is not
vanilla plus it uses iemnet tcp server or the onefrom mr peach, would be
nice
to reduce the number of connections and vanilarize it just for a simple
fudi thing


Yeah it would be but the sticking point is going to be the small amount 
of crypto stuff that websockets require. Not impossible maybe but difficult.


I will try to do more testing with this on mobile devices at the 
workshop here at PdCon on Saturday.


Thanks Billy.

Cheers,

Chris.

--
http://mccormick.cx/

___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list


Re: [PD] Aciles - the world's worst web server in Pd

2016-11-18 Thread Chris McCormick

Hi Billy,

On 17/11/16 19:03, Billy Stiltner wrote:

so this could replace the JAVA udp tcp socket overhead  ?


In theory yes but I haven't done extensive testing yet to determine if 
it's robust enough. One thing is for sure - if you send messages too 
quickly in succession they will get dropped. That's basically 
unavoidable due to the hacks it uses.



works from here to your server and back.


Cool! Thanks for trying it out. As you point out in the other email it 
actually doesn't contact my server - only the HTML file is loaded from 
there and then the communication is happening locally.



how did you figure it out?


I guess I just realised that recent features of netsend (bi-directional, 
binary) allow it to work. Also I was visited by a magical binary elf at 
midnight who imparted to me the secrets three.


Cheers,

Chris.

--
http://mccormick.cx/

___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list


Re: [PD] Aciles - the world's worst web server in Pd

2016-11-17 Thread Billy Stiltner
so this could replace the JAVA udp tcp socket overhead  ?
works from here to your server and back.
havent tried it locally yet.
how did you figure it out?

On Thu, Nov 3, 2016 at 10:03 PM, Chris McCormick  wrote:

> Hi all,
>
> Aciles is the world's worst web server, implemented in Pd.
>
> Step 1: Download these two patches and open on your local machine:
>
>  * https://raw.githubusercontent.com/chr15m/aciles/master/web-s
> erver-help.pd
>  * https://raw.githubusercontent.com/chr15m/aciles/master/web-server.pd
>
> Step 2: Browse to http://aciles.mccormick.cx/
>
> Step 3: Send some messages between Pd and your browser.
>
> Some things you could do with this:
>
>  * Send messages from a web-app to Pd patches and visa versa.
>  * Control a headless Rasberry Pi Pd with a web-app on another machine.
>  * Control a libpd patch with a web-app on the same devices's browser.
>
> This software is for Joe's nephew.
>
> Cheers,
>
> Chris.
>
> --
> http://mccormick.cx/
>
> ___
> Pd-list@lists.iem.at mailing list
> UNSUBSCRIBE and account-management -> https://lists.puredata.info/li
> stinfo/pd-list
>
___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list


[PD] Aciles - the world's worst web server in Pd

2016-11-03 Thread Chris McCormick

Hi all,

Aciles is the world's worst web server, implemented in Pd.

Step 1: Download these two patches and open on your local machine:

 * 
https://raw.githubusercontent.com/chr15m/aciles/master/web-server-help.pd

 * https://raw.githubusercontent.com/chr15m/aciles/master/web-server.pd

Step 2: Browse to http://aciles.mccormick.cx/

Step 3: Send some messages between Pd and your browser.

Some things you could do with this:

 * Send messages from a web-app to Pd patches and visa versa.
 * Control a headless Rasberry Pi Pd with a web-app on another machine.
 * Control a libpd patch with a web-app on the same devices's browser.

This software is for Joe's nephew.

Cheers,

Chris.

--
http://mccormick.cx/

___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list