A few points:
Here's what I want to do (in Debian Wheezy):
pstoedit -f plot-svg test.ps test.svg
But I get this error:
**** Warning: glyf overlaps cmap, truncating.
Anyone know what this means? It ends up cropping the top and bottom of the patch. Google search for the error doesn't help much.
In the future it'd probably be better to parse a *.pd file directly to convert to svg, but if I can convert a ps to svg like this I think I can script it and get some nice looking online searchable documentation with very little work. :)
-Jonathan
Used can2svg from Mats Bengtsson and got a nice result. You can open it in a browser, zoom it, select text. It's about 3x larger than pd file. Probably wouldn't be too difficult to parse and turn most of the pddplinks into real links.
What happened to pdpedia? If it's still around maybe I can script this to do all the pd-ext help files and make a nice online resource. It'd probably be more powerful to parse pd files directly to svg but that's a bigger project.
-Jonathan
----- Original Message -----
From: Jonathan Wilkes jancsika@yahoo.com To: PD List pd-list@iem.at Cc: Sent: Friday, May 3, 2013 1:40 PM Subject: [PD] pd -> svg
A few points:
- you can open svg in a browser
- you can _zoom_ svg in a browser for decent results (it's a vector drawing)
- in safari you can select text in an svg (but not Firefox because of a bug,
although you can stil <ctrl-c> it)
- much (but not all) of tk canvas has corresponding drawing instructions in
svg. unless i'm missing something the subset of tk canvas commands used by Pd all have corresponding instructions in svg
Here's what I want to do (in Debian Wheezy):
- Open pd-extended
- Create new patch
- Create [f]
- Right click to open up float-help.pd (PDDP revised version)
- Click print and save to test.ps
- in cli type:
pstoedit -f plot-svg test.ps test.svg
But I get this error:
**** Warning: glyf overlaps cmap, truncating.
Anyone know what this means? It ends up cropping the top and bottom of the patch. Google search for the error doesn't help much.
In the future it'd probably be better to parse a *.pd file directly to convert to svg, but if I can convert a ps to svg like this I think I can script it and get some nice looking online searchable documentation with very little work. :)
-Jonathan
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Hi
an example to create html/svg from pd
cheers
p Le 5 mai 2013 à 10:53, Jonathan Wilkes a écrit :
Used can2svg from Mats Bengtsson and got a nice result. You can open it in a browser, zoom it, select text. It's about 3x larger than pd file. Probably wouldn't be too difficult to parse and turn most of the pddplinks into real links.
What happened to pdpedia? If it's still around maybe I can script this to do all the pd-ext help files and make a nice online resource. It'd probably be more powerful to parse pd files directly to svg but that's a bigger project.
-Jonathan
----- Original Message -----
From: Jonathan Wilkes jancsika@yahoo.com To: PD List pd-list@iem.at Cc: Sent: Friday, May 3, 2013 1:40 PM Subject: [PD] pd -> svg
A few points:
- you can open svg in a browser
- you can _zoom_ svg in a browser for decent results (it's a vector drawing)
- in safari you can select text in an svg (but not Firefox because of a bug,
although you can stil <ctrl-c> it)
- much (but not all) of tk canvas has corresponding drawing instructions in
svg. unless i'm missing something the subset of tk canvas commands used by Pd all have corresponding instructions in svg
Here's what I want to do (in Debian Wheezy):
- Open pd-extended
- Create new patch
- Create [f]
- Right click to open up float-help.pd (PDDP revised version)
- Click print and save to test.ps
- in cli type:
pstoedit -f plot-svg test.ps test.svg
But I get this error:
**** Warning: glyf overlaps cmap, truncating.
Anyone know what this means? It ends up cropping the top and bottom of the patch. Google search for the error doesn't help much.
In the future it'd probably be better to parse a *.pd file directly to convert to svg, but if I can convert a ps to svg like this I think I can script it and get some nice looking online searchable documentation with very little work. :)
-Jonathan
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
<float-help.svg>_______________________________________________ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Also, I put this library together a little while ago, as a part of WebPd :
https://github.com/sebpiq/pd-fileutils
It should work out of the box, converting pd patch to SVG
2013/5/5 philippe boisnard philemon1@mac.com
Hi
an example to create html/svg from pd
cheers
p Le 5 mai 2013 à 10:53, Jonathan Wilkes a écrit :
Used can2svg from Mats Bengtsson and got a nice result. You can open it
in a browser, zoom it, select text. It's about 3x larger than pd file. Probably wouldn't be too difficult to parse and turn most of the pddplinks into real links.
What happened to pdpedia? If it's still around maybe I can script this
to do all the pd-ext help files and make a nice online resource. It'd probably be more powerful to parse pd files directly to svg but that's a bigger project.
-Jonathan
----- Original Message -----
From: Jonathan Wilkes jancsika@yahoo.com To: PD List pd-list@iem.at Cc: Sent: Friday, May 3, 2013 1:40 PM Subject: [PD] pd -> svg
A few points:
- you can open svg in a browser
- you can _zoom_ svg in a browser for decent results (it's a vector
drawing)
- in safari you can select text in an svg (but not Firefox because of a
bug,
although you can stil <ctrl-c> it)
- much (but not all) of tk canvas has corresponding drawing
instructions in
svg. unless i'm missing something the subset of tk canvas commands
used by
Pd all have corresponding instructions in svg
Here's what I want to do (in Debian Wheezy):
- Open pd-extended
- Create new patch
- Create [f]
- Right click to open up float-help.pd (PDDP revised version)
- Click print and save to test.ps
- in cli type:
pstoedit -f plot-svg test.ps test.svg
But I get this error:
**** Warning: glyf overlaps cmap, truncating.
Anyone know what this means? It ends up cropping the top and bottom of
the
patch. Google search for the error doesn't help much.
In the future it'd probably be better to parse a *.pd file directly to convert to svg, but if I can convert a ps to svg like this I think I
can script
it and get some nice looking online searchable documentation with very
little
work. :)
-Jonathan
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
<float-help.svg>_______________________________________________ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management ->
http://lists.puredata.info/listinfo/pd-list
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
From: s p sebpiq@gmail.com To: Cc: PD List pd-list@iem.at Sent: Sunday, May 5, 2013 10:39 AM Subject: Re: [PD] pd -> svg
Also, I put this library together a little while ago, as a part of WebPd :
https://github.com/sebpiq/pd-fileutils
It should work out of the box, converting pd patch to SVG
Thanks.
The demo below fails to load properly on Firefox and IE (whatever version on windows 7)
http://sebpiq.github.io/pd-fileutils/?gist=5054711
2013/5/5 philippe boisnard philemon1@mac.com
Hi
an example to create html/svg from pd
cheers
p Le 5 mai 2013 à 10:53, Jonathan Wilkes a écrit :
Used can2svg from Mats Bengtsson and got a nice result. You can open it in a browser, zoom it, select text. It's about 3x larger than pd file. Probably wouldn't be too difficult to parse and turn most of the pddplinks into real links.
What happened to pdpedia? If it's still around maybe I can script this to do all the pd-ext help files and make a nice online resource. It'd probably be more powerful to parse pd files directly to svg but that's a bigger project.
-Jonathan
----- Original Message -----
From: Jonathan Wilkes jancsika@yahoo.com To: PD List pd-list@iem.at Cc: Sent: Friday, May 3, 2013 1:40 PM Subject: [PD] pd -> svg
A few points:
- you can open svg in a browser
- you can _zoom_ svg in a browser for decent results (it's a vector drawing)
- in safari you can select text in an svg (but not Firefox because of a bug,
although you can stil <ctrl-c> it)
- much (but not all) of tk canvas has corresponding drawing instructions in
svg. unless i'm missing something the subset of tk canvas commands used by Pd all have corresponding instructions in svg
Here's what I want to do (in Debian Wheezy):
- Open pd-extended
- Create new patch
- Create [f]
- Right click to open up float-help.pd (PDDP revised version)
- Click print and save to test.ps
- in cli type:
pstoedit -f plot-svg test.ps test.svg
But I get this error:
**** Warning: glyf overlaps cmap, truncating.
Anyone know what this means? It ends up cropping the top and bottom of the patch. Google search for the error doesn't help much.
In the future it'd probably be better to parse a *.pd file directly to convert to svg, but if I can convert a ps to svg like this I think I can script it and get some nice looking online searchable documentation with very little work. :)
-Jonathan
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
<float-help.svg>_______________________________________________ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
i.e. is kind of out of my radar ... but for sure I should test with it some day. With my firefox it works fine. What do you mean by "it fails"? Do you get anything at all? Or is the graph cropped or something?
2013/5/5 Jonathan Wilkes jancsika@yahoo.com
From: s p sebpiq@gmail.com To: Cc: PD List pd-list@iem.at Sent: Sunday, May 5, 2013 10:39 AM Subject: Re: [PD] pd -> svg
Also, I put this library together a little while ago, as a part of WebPd
:
https://github.com/sebpiq/pd-fileutils
It should work out of the box, converting pd patch to SVG
Thanks.
The demo below fails to load properly on Firefox and IE (whatever version on windows 7)
http://sebpiq.github.io/pd-fileutils/?gist=5054711
2013/5/5 philippe boisnard philemon1@mac.com
Hi
an example to create html/svg from pd
cheers
p Le 5 mai 2013 à 10:53, Jonathan Wilkes a écrit :
Used can2svg from Mats Bengtsson and got a nice result. You can open
it in a browser, zoom it, select text. It's about 3x larger than pd file. Probably wouldn't be too difficult to parse and turn most of the pddplinks into real links.
What happened to pdpedia? If it's still around maybe I can script
this to do all the pd-ext help files and make a nice online resource. It'd probably be more powerful to parse pd files directly to svg but that's a bigger project.
-Jonathan
----- Original Message -----
From: Jonathan Wilkes jancsika@yahoo.com To: PD List pd-list@iem.at Cc: Sent: Friday, May 3, 2013 1:40 PM Subject: [PD] pd -> svg
A few points:
- you can open svg in a browser
- you can _zoom_ svg in a browser for decent results (it's a vector
drawing)
- in safari you can select text in an svg (but not Firefox because of
a bug,
although you can stil <ctrl-c> it)
- much (but not all) of tk canvas has corresponding drawing
instructions in
svg. unless i'm missing something the subset of tk canvas commands
used by
Pd all have corresponding instructions in svg
Here's what I want to do (in Debian Wheezy):
- Open pd-extended
- Create new patch
- Create [f]
- Right click to open up float-help.pd (PDDP revised version)
- Click print and save to test.ps
- in cli type:
pstoedit -f plot-svg test.ps test.svg
But I get this error:
**** Warning: glyf overlaps cmap, truncating.
Anyone know what this means? It ends up cropping the top and bottom
of the
patch. Google search for the error doesn't help much.
In the future it'd probably be better to parse a *.pd file directly to convert to svg, but if I can convert a ps to svg like this I think I
can script
it and get some nice looking online searchable documentation with
very little
work. :)
-Jonathan
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
<float-help.svg>_______________________________________________ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management ->
http://lists.puredata.info/listinfo/pd-list
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management ->
http://lists.puredata.info/listinfo/pd-list
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management ->
From: s p sebpiq@gmail.com To: Cc: PD List pd-list@iem.at Sent: Sunday, May 5, 2013 5:05 PM Subject: Re: [PD] pd -> svg
i.e. is kind of out of my radar ... but for sure I should test with it some day. With my firefox it works fine. What do you mean by "it fails"? Do you get anything at all? Or is the graph cropped or something?
I get two horizontal dividers and the text "Loading..."
-Jonathan
2013/5/5 Jonathan Wilkes jancsika@yahoo.com
From: s p sebpiq@gmail.com To: Cc: PD List pd-list@iem.at Sent: Sunday, May 5, 2013 10:39 AM Subject: Re: [PD] pd -> svg
Also, I put this library together a little while ago, as a part of WebPd :
https://github.com/sebpiq/pd-fileutils
It should work out of the box, converting pd patch to SVG
Thanks.
The demo below fails to load properly on Firefox and IE (whatever version on windows 7)
http://sebpiq.github.io/pd-fileutils/?gist=5054711
2013/5/5 philippe boisnard philemon1@mac.com
Hi
an example to create html/svg from pd
cheers
p Le 5 mai 2013 à 10:53, Jonathan Wilkes a écrit :
Used can2svg from Mats Bengtsson and got a nice result. You can open it in a browser, zoom it, select text. It's about 3x larger than pd file. Probably wouldn't be too difficult to parse and turn most of the pddplinks into real links.
What happened to pdpedia? If it's still around maybe I can script this to do all the pd-ext help files and make a nice online resource. It'd probably be more powerful to parse pd files directly to svg but that's a bigger project.
-Jonathan
----- Original Message -----
From: Jonathan Wilkes jancsika@yahoo.com To: PD List pd-list@iem.at Cc: Sent: Friday, May 3, 2013 1:40 PM Subject: [PD] pd -> svg
A few points:
- you can open svg in a browser
- you can _zoom_ svg in a browser for decent results (it's a vector drawing)
- in safari you can select text in an svg (but not Firefox because of a bug,
although you can stil <ctrl-c> it)
- much (but not all) of tk canvas has corresponding drawing instructions in
svg. unless i'm missing something the subset of tk canvas commands used by Pd all have corresponding instructions in svg
Here's what I want to do (in Debian Wheezy):
- Open pd-extended
- Create new patch
- Create [f]
- Right click to open up float-help.pd (PDDP revised version)
- Click print and save to test.ps
- in cli type:
pstoedit -f plot-svg test.ps test.svg
But I get this error:
**** Warning: glyf overlaps cmap, truncating.
Anyone know what this means? It ends up cropping the top and bottom of the patch. Google search for the error doesn't help much.
In the future it'd probably be better to parse a *.pd file directly to convert to svg, but if I can convert a ps to svg like this I think I can script it and get some nice looking online searchable documentation with very little work. :)
-Jonathan
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
<float-help.svg>_______________________________________________ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
And what about the console? Any error there?
2013/5/6 Jonathan Wilkes jancsika@yahoo.com
From: s p sebpiq@gmail.com To: Cc: PD List pd-list@iem.at Sent: Sunday, May 5, 2013 5:05 PM Subject: Re: [PD] pd -> svg
i.e. is kind of out of my radar ... but for sure I should test with it
some day.
With my firefox it works fine. What do you mean by "it fails"? Do you get
anything at all? Or is the graph cropped or something?
I get two horizontal dividers and the text "Loading..."
-Jonathan
2013/5/5 Jonathan Wilkes jancsika@yahoo.com
From: s p sebpiq@gmail.com To: Cc: PD List pd-list@iem.at Sent: Sunday, May 5, 2013 10:39 AM Subject: Re: [PD] pd -> svg
Also, I put this library together a little while ago, as a part of
WebPd :
https://github.com/sebpiq/pd-fileutils
It should work out of the box, converting pd patch to SVG
Thanks.
The demo below fails to load properly on Firefox and IE (whatever
version on windows 7)
http://sebpiq.github.io/pd-fileutils/?gist=5054711
2013/5/5 philippe boisnard philemon1@mac.com
Hi
an example to create html/svg from pd
cheers
p Le 5 mai 2013 à 10:53, Jonathan Wilkes a écrit :
Used can2svg from Mats Bengtsson and got a nice result. You can
open it in a browser, zoom it, select text. It's about 3x larger than pd file. Probably wouldn't be too difficult to parse and turn most of the pddplinks into real links.
What happened to pdpedia? If it's still around maybe I can script
this to do all the pd-ext help files and make a nice online resource. It'd probably be more powerful to parse pd files directly to svg but that's a bigger project.
-Jonathan
----- Original Message ----- > From: Jonathan Wilkes jancsika@yahoo.com > To: PD List pd-list@iem.at > Cc: > Sent: Friday, May 3, 2013 1:40 PM > Subject: [PD] pd -> svg > > A few points: > > * you can open svg in a browser > * you can _zoom_ svg in a browser for decent results (it's a vector
drawing)
> * in safari you can select text in an svg (but not Firefox because
of a bug,
> although you can stil <ctrl-c> it) > * much (but not all) of tk canvas has corresponding drawing
instructions in
> svg. unless i'm missing something the subset of tk canvas commands
used by
> Pd all have corresponding instructions in svg > > Here's what I want to do (in Debian Wheezy): > 1) Open pd-extended > 2) Create new patch > 3) Create [f] > 4) Right click to open up float-help.pd (PDDP revised version) > 5) Click print and save to test.ps > 6) in cli type: > pstoedit -f plot-svg test.ps test.svg > > But I get this error: > > **** Warning: glyf overlaps cmap, truncating. > > Anyone know what this means? It ends up cropping the top and
bottom of the
> patch. Google search for the error doesn't help much. > > In the future it'd probably be better to parse a *.pd file directly
to
> convert to svg, but if I can convert a ps to svg like this I think
I can script
> it and get some nice looking online searchable documentation with
very little
> work. :) > > -Jonathan > > > _______________________________________________ > Pd-list@iem.at mailing list > UNSUBSCRIBE and account-management -> > http://lists.puredata.info/listinfo/pd-list <float-help.svg>_______________________________________________ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management ->
http://lists.puredata.info/listinfo/pd-list
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management ->
http://lists.puredata.info/listinfo/pd-list
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management ->
http://lists.puredata.info/listinfo/pd-list
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management ->
From: s p sebpiq@gmail.com To: Cc: PD List pd-list@iem.at Sent: Monday, May 6, 2013 2:26 PM Subject: Re: [PD] pd -> svg
And what about the console? Any error there?
Here's the output:
[16:58:31.356] GET http://sebpiq.github.io/pd-fileutils/?gist=5054711 [HTTP/1.1 304 Not Modified 148ms] [16:58:31.806] GET http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js [HTTP/1.1 304 Not Modified 81ms] [16:58:31.808] GET http://underscorejs.org/underscore-min.js [HTTP/1.1 304 Not Modified 186ms] [16:58:31.810] GET http://d3js.org/d3.v3.min.js [HTTP/1.1 304 Not Modified 173ms] [16:58:31.811] GET https://raw.github.com/sebpiq/pd-fileutils/master/dist/pd-fileutils-latest.j... [HTTP/1.1 200 OK 335ms] [16:58:31.812] GET http://sebpiq.github.io/pd-fileutils/css/code-highlight.css [HTTP/1.1 304 Not Modified 74ms] [16:58:31.813] GET https://raw.github.com/ccampbell/rainbow/master/js/rainbow.min.js [HTTP/1.1 200 OK 542ms] [16:58:31.815] GET https://raw.github.com/ccampbell/rainbow/master/js/language/generic.js [HTTP/1.1 200 OK 548ms] [16:58:31.816] GET https://raw.github.com/ccampbell/rainbow/master/js/language/javascript.js [HTTP/1.1 200 OK 298ms] [16:58:31.933] Unknown property '-moz-border-radius'. Declaration dropped. @ http://sebpiq.github.io/pd-fileutils/css/code-highlight.css:26 [16:58:31.933] Unknown property '-moz-border-radius'. Declaration dropped. @ http://sebpiq.github.io/pd-fileutils/css/code-highlight.css:35 [16:58:32.182] Use of getAttributeNode() is deprecated. Use getAttribute() instead. @ http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js:4 [16:58:32.189] TypeError: resp is undefined @ http://sebpiq.github.io/pd-fileutils/?gist=5054711:33 [16:58:32.261] GET https://api.github.com/gists/5054711?callback=gistLoaded&_=1367873911969 [HTTP/1.1 200 OK 437ms] [16:58:32.591] GET https://raw.github.com/ccampbell/rainbow/master/js/language/generic.js [HTTP/1.1 200 OK 69ms] [16:58:32.682] GET https://raw.github.com/ccampbell/rainbow/master/js/language/javascript.js [HTTP/1.1 200 OK 69ms] [16:58:32.728] The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol. @ http://sebpiq.github.io/pd-fileutils/?gist=5054711 [16:58:32.741] Unknown property 'box-sizing'. Declaration dropped. @ http://sebpiq.github.io/pd-fileutils/?gist=5054711 [16:58:32.752] ReferenceError: pdfu is not defined @ http://sebpiq.github.io/pd-fileutils/?gist=5054711:35 [16:58:32.816] GET http://www.google-analytics.com/ga.js [HTTP/1.1 304 Not Modified 48ms] [16:58:32.936] GET http://www.google-analytics.com/__utm.gif?utmwv=5.4.1&utms=2&utmn=18... 0%3Cbr%3E%20%20Compatible%20&utmdt=Title%20of%20the%20document&utmhid=1042282053&utmr=http%3A%2F%2Fus-mg6.mail.yahoo.com%2Fneo%2Flaunch%3F.rand%3D4045ngpabds70&utmp=%2Fpd-fileutils%2F%3Fgist%3D5054711&utmht=1367873912846&utmac=UA-17637518-3&utmcc=__utma%3D88284441.556814279.1367766157.1367813491.1367873821.3%3B%2B__utmz%3D88284441.1367873821.3.2.utmcsr%3Dus-mg6.mail.yahoo.com%7Cutmccn%3D(referral)%7Cutmcmd%3Dreferral%7Cutmcct%3D%2Fneo%2Flaunch%3B&utmu=q~ [HTTP/1.1 200 OK 76ms]
Thanks Jonathan,
I don't really have the time to take care about this those days, but I'll fix it as soon as possible, and post here when that'll be done.
Cheers,
Sébastien
2013/5/7 Jonathan Wilkes jancsika@yahoo.com
From: s p sebpiq@gmail.com To: Cc: PD List pd-list@iem.at Sent: Monday, May 6, 2013 2:26 PM Subject: Re: [PD] pd -> svg
And what about the console? Any error there?
Here's the output:
[16:58:31.356] GET http://sebpiq.github.io/pd-fileutils/?gist=5054711%5BHTTP/1.1 304 Not Modified 148ms] [16:58:31.806] GET http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js [HTTP/1.1 304 Not Modified 81ms] [16:58:31.808] GET http://underscorejs.org/underscore-min.js [HTTP/1.1 304 Not Modified 186ms] [16:58:31.810] GET http://d3js.org/d3.v3.min.js [HTTP/1.1 304 Not Modified 173ms] [16:58:31.811] GET https://raw.github.com/sebpiq/pd-fileutils/master/dist/pd-fileutils-latest.j... 200 OK 335ms] [16:58:31.812] GET http://sebpiq.github.io/pd-fileutils/css/code-highlight.css [HTTP/1.1 304 Not Modified 74ms] [16:58:31.813] GET https://raw.github.com/ccampbell/rainbow/master/js/rainbow.min.js%5BHTTP/1.1 200 OK 542ms] [16:58:31.815] GET https://raw.github.com/ccampbell/rainbow/master/js/language/generic.js%5BHTT... 200 OK 548ms] [16:58:31.816] GET https://raw.github.com/ccampbell/rainbow/master/js/language/javascript.js%5B... 200 OK 298ms] [16:58:31.933] Unknown property '-moz-border-radius'. Declaration dropped. @ http://sebpiq.github.io/pd-fileutils/css/code-highlight.css:26 [16:58:31.933] Unknown property '-moz-border-radius'. Declaration dropped. @ http://sebpiq.github.io/pd-fileutils/css/code-highlight.css:35 [16:58:32.182] Use of getAttributeNode() is deprecated. Use getAttribute() instead. @ http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js:4 [16:58:32.189] TypeError: resp is undefined @ http://sebpiq.github.io/pd-fileutils/?gist=5054711:33 [16:58:32.261] GET https://api.github.com/gists/5054711?callback=gistLoaded&_=1367873911969... 200 OK 437ms] [16:58:32.591] GET https://raw.github.com/ccampbell/rainbow/master/js/language/generic.js%5BHTT... 200 OK 69ms] [16:58:32.682] GET https://raw.github.com/ccampbell/rainbow/master/js/language/javascript.js%5B... 200 OK 69ms] [16:58:32.728] The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol. @ http://sebpiq.github.io/pd-fileutils/?gist=5054711 [16:58:32.741] Unknown property 'box-sizing'. Declaration dropped. @ http://sebpiq.github.io/pd-fileutils/?gist=5054711 [16:58:32.752] ReferenceError: pdfu is not defined @ http://sebpiq.github.io/pd-fileutils/?gist=5054711:35 [16:58:32.816] GET http://www.google-analytics.com/ga.js [HTTP/1.1 304 Not Modified 48ms] [16:58:32.936] GET
http://www.google-analytics.com/__utm.gif?utmwv=5.4.1&utms=2&utmn=18...
0%3Cbr%3E%20%20Compatible%20&utmdt=Title%20of%20the%20document&utmhid=1042282053&utmr=http%3A%2F%2Fus-mg6.mail.yahoo.com%2Fneo%2Flaunch%3F.rand%3D4045ngpabds70&utmp=%2Fpd-fileutils%2F%3Fgist%3D5054711&utmht=1367873912846&utmac=UA-17637518-3&utmcc=__utma%3D88284441.556814279.1367766157.1367813491.1367873821.3%3B%2B__utmz%3D88284441.1367873821.3.2.utmcsr%3Dus-mg6.mail.yahoo.com%7Cutmccn%3D(referral)%7Cutmcmd%3Dreferral%7Cutmcct%3D%2Fneo%2Flaunch%3B&utmu=q~[HTTP/1.1 200 OK 76ms]
From: s p sebpiq@gmail.com To: Jonathan Wilkes jancsika@yahoo.com Cc: PD List pd-list@iem.at Sent: Saturday, May 11, 2013 4:37 PM Subject: Re: [PD] pd -> svg
Thanks Jonathan,
I don't really have the time to take care about this those days, but I'll fix it as soon as possible, and post here when that'll be done.
Cheers,
Sébastien
Here's an idea...
Suppose I build a Pd gui-plugin that exports a Pd file to svg. It takes the toplevel patch and makes the drawing instructions like my example in the OP. But it also draws a little navigation bar at the bottom with 1) a little image with id="source patchname", 2) a play button with id = "webpd-play patchname", 3) a stop button with id = "webpd-stop patchname"
The image with id="source patchname" is the base64-encoded source of the patch. This would be neat because:
a) Anyone could export to svg and get a file that can be displayed in any modern browser (with searchable/selectable text in most of them). b) Since the drawing instructions Pd uses are so simple the svg will probably display on mobile devices (even older ones). c) Since the source is embedded in the file, webpd js could just listen for clicks to any webpd-play buttons in the page, and when it catches one it looks for an svg image with id "source" plus the same patchname as the webpd-play button. It then decodes the image, loads it and plays it until it receives a "webpd-stop" button click.
This method has the benefit of degrading gracefully; that is, if someone using NoScript wants to read a forum with pd patch svg images in it, they will still be able to view the image. Moreover, a forum admin or blog owner can post the svgs simply to show pictures of patches; then later when the audio api becomes more common than just firefox nightly they can add the webpd code once and all their images will now feature audio.
-Jonathan
On Sun, May 12, 2013 at 1:02 AM, Jonathan Wilkes jancsika@yahoo.com wrote:
From: s p sebpiq@gmail.com To: Jonathan Wilkes jancsika@yahoo.com Cc: PD List pd-list@iem.at Sent: Saturday, May 11, 2013 4:37 PM Subject: Re: [PD] pd -> svg
Thanks Jonathan,
I don't really have the time to take care about this those days, but I'll
fix it as soon as possible, and post here when that'll be done.
Cheers,
Sébastien
Here's an idea...
Suppose I build a Pd gui-plugin that exports a Pd file to svg. It takes the toplevel patch and makes the drawing instructions like my example in the OP. But it also draws a little navigation bar at the bottom with 1) a little image with id="source patchname", 2) a play button with id = "webpd-play patchname", 3) a stop button with id = "webpd-stop patchname"
The image with id="source patchname" is the base64-encoded source of the patch. This would be neat because:
a) Anyone could export to svg and get a file that can be displayed in any modern browser (with searchable/selectable text in most of them). b) Since the drawing instructions Pd uses are so simple the svg will probably display on mobile devices (even older ones). c) Since the source is embedded in the file, webpd js could just listen for clicks to any webpd-play buttons in the page, and when it catches one it looks for an svg image with id "source" plus the same patchname as the webpd-play button. It then decodes the image, loads it and plays it until it receives a "webpd-stop" button click.
This method has the benefit of degrading gracefully; that is, if someone using NoScript wants to read a forum with pd patch svg images in it, they will still be able to view the image. Moreover, a forum admin or blog owner can post the svgs simply to show pictures of patches; then later when the audio api becomes more common than just firefox nightly they can add the webpd code once and all their images will now feature audio.
-Jonathan
This sounds extremely appealing to me.
About the HTML side, be careful with using the ID field because it can be used only once and then other uses become impossible. Also, it has to be unique which would effectively prevent the same patch from being embedded more than once.
You might want to consider the CLASS field instead which can hold an unlimited number (theoretically; the practical limit is around 2000) of classes, and classes are already used deliberately to signify different attributes of HTML elements. I'd also recommend prepending the string with something constant that will allow the automatic discovery of such strings among other, non-pd-parseable strings (versus having plain base64-encoded strings, which are not detectable by themselves, or, at least, must be decoded before recognized). For separating the prepended part from the base64 part, CSS allows for any ISO 10646 character higher than U+00A1 to be used, or even lower characters when escaped with backslash. (I don't recommend an escaped character because the backslash might "disappear" while the HTML get processed by various scripts here and there.) For example: <img src="mypatch.svg" class="thisclass thatclass pd-source_ABC123BASE64STRING" /> would be a nice extendable format.
But even better, CSS attributes could be used, which can hold URL values without base64-encoding, and they are also more variable (can be defined elsewhere than in the HTML source, can be overwritten/cascaded without Javascript). This way, the pd-source defined right in the HTML source would look like: <img src="mypatch.svg" style="thisproperty: 4px; thatproperty: 30%; -pd-source: url(file://C:\Users\Joe\Desktop\mypatch.pd)" /> Note that the etiquette for introducing non-standard CSS attributes is to start them with the hyphen. (E.g.: -moz-box-shadow) (Similar to custom mime-types beginning with "x-something-") This method would open up an unlimited number of possibilities, just to note a few:
filesystem, the web, ftp, or even git
addressing recieves!) like -pd-param-myparameter (and note that CSS has official support for units like colors, angles, times, and frequencies)
first of all with Javascript of course
http://lists.puredata.info/pipermail/pd-dev/2012-06/018436.html)
http://www.w3.org/TR/2008/REC-CSS2-20080411/syndata.html
András