mrpackethead
Full time elf
Starting point..
(1) Create Quicktime move in Quartz composer..
(2) Export as a quicktime movie..
Dimensisons 16 x 10
Duration pick the appropriate time
(3) Open in Quicktime Player...
File ---> Export
Movie to Image Sequence
---> Options Format PNG
---> Frames per second 10
---> No space beofre Number
(4) Use imagemagik to convert the entire directory to a 10x16! ppm file.
run from within the folder that contains the .pngs
mkdir ppm && for i in *.png; do echo $i ; /opt/local/bin/convert $i -resize 10x16! -compress none -rotate -90 ppm/$i.ppm; done
====================================
(5) Run this perl script (split_files_out.pl)
Copy this file to local
../../../0.perl/split_files_out.pl
edit for number of files.
This script converts the files into a set of channel data.
To convert to vixen file;
for i in *.dmx; do cat $i | perl ../../../0.perl/dec-to-bin.pl | perl ../../../0.perl/bin-to-base64.pl; done > bells_mime64.txt
..
(6)
../../../0.perl/strip_newlines.pl bells.txt > bellsbase64.txt
#!/usr/bin/perl
use Convert::BaseN;
# by name
my $cb_64 = Convert::BaseN->new('base64');
my $cb_2 = Convert::BaseN->new('base2');
$data = <>;
$onechannelofdata = $cb_64->encode($cb_2->decode($data));
chop ($onechannelofdata);
print $onechannelofdata;
#!/usr/bin/perl
while (<>) {
print dec2bin($_);
}
sub dec2bin {
my $str = unpack("B32", pack("N", shift));
# $str =~ s/^0+(?=\d)//; # otherwise you'll get leading zeros
$str = (substr $str , 24);
return $str;
}
(1) Create Quicktime move in Quartz composer..
(2) Export as a quicktime movie..
Dimensisons 16 x 10
Duration pick the appropriate time
(3) Open in Quicktime Player...
File ---> Export
Movie to Image Sequence
---> Options Format PNG
---> Frames per second 10
---> No space beofre Number
(4) Use imagemagik to convert the entire directory to a 10x16! ppm file.
run from within the folder that contains the .pngs
mkdir ppm && for i in *.png; do echo $i ; /opt/local/bin/convert $i -resize 10x16! -compress none -rotate -90 ppm/$i.ppm; done
====================================
(5) Run this perl script (split_files_out.pl)
Copy this file to local
../../../0.perl/split_files_out.pl
edit for number of files.
This script converts the files into a set of channel data.
To convert to vixen file;
for i in *.dmx; do cat $i | perl ../../../0.perl/dec-to-bin.pl | perl ../../../0.perl/bin-to-base64.pl; done > bells_mime64.txt
..
(6)
../../../0.perl/strip_newlines.pl bells.txt > bellsbase64.txt
#!/usr/bin/perl
use Convert::BaseN;
# by name
my $cb_64 = Convert::BaseN->new('base64');
my $cb_2 = Convert::BaseN->new('base2');
$data = <>;
$onechannelofdata = $cb_64->encode($cb_2->decode($data));
chop ($onechannelofdata);
print $onechannelofdata;
#!/usr/bin/perl
while (<>) {
print dec2bin($_);
}
sub dec2bin {
my $str = unpack("B32", pack("N", shift));
# $str =~ s/^0+(?=\d)//; # otherwise you'll get leading zeros
$str = (substr $str , 24);
return $str;
}