aboutsummaryrefslogtreecommitdiff
path: root/externals/gridflow/bin/jmax2pd
diff options
context:
space:
mode:
authorN.N. <matju@users.sourceforge.net>2005-10-04 02:12:44 +0000
committerN.N. <matju@users.sourceforge.net>2005-10-04 02:12:44 +0000
commita7dc40f29086515c31667490c03211812b84e2ed (patch)
tree71e6e490e08d6afb03295098f6beb204f616ad6b /externals/gridflow/bin/jmax2pd
parent31beef22c1f976ee0d0b7d10157e726f234cff4e (diff)
added the remainder of the files (or almost) from GF 0.8.0
svn path=/trunk/; revision=3651
Diffstat (limited to 'externals/gridflow/bin/jmax2pd')
-rwxr-xr-xexternals/gridflow/bin/jmax2pd29
1 files changed, 29 insertions, 0 deletions
diff --git a/externals/gridflow/bin/jmax2pd b/externals/gridflow/bin/jmax2pd
new file mode 100755
index 00000000..5510656a
--- /dev/null
+++ b/externals/gridflow/bin/jmax2pd
@@ -0,0 +1,29 @@
+#!/usr/bin/env ruby
+
+require "gridflow"
+require "gridflow/extra/jmax_format.rb"
+require "gridflow/extra/puredata_format.rb"
+include GridFlow
+#GridFlow.verbose = true
+
+iname,oname = ARGV
+if not iname
+ raise "usage: jmax2pd <input.jmax> [<output.pd>]"
+end
+if not oname
+ oname = iname.sub(/\.jmax$/,".pd")
+end
+keep=["broken","jpatcher","button","slider","messbox"]
+GridFlow.instance_eval{@fclasses_set.delete_if {|k,v|
+ not keep.include? k
+}}
+#p GridFlow.instance_eval{@fclasses_set.keys.sort}
+
+jfr = JMaxFileReader.new(File.open(iname),FObject)
+FObject.broken_ok = true
+FObject.do_loadbangs = false
+my_patcher = jfr.parse
+pfw = PureDataFileWriter.new(oname)
+pfw.write_patcher my_patcher
+pfw.close
+