Date:2011-11-24 15:01:58 (7 years 8 months ago)
Author:Werner Almesberger
Commit:1c5cbcab6651ea0fc5635e5e4287b1f4d78e8652
Message:m1/curiosity-demo: sources of the "curiosity" demo clip

Files: m1/curiosity-demo/Makefile (1 diff)
m1/curiosity-demo/README (1 diff)
m1/curiosity-demo/ghost.xbm (1 diff)
m1/curiosity-demo/pacman.fnp (1 diff)
m1/curiosity-demo/pacman.xbm (1 diff)

Change Details

m1/curiosity-demo/Makefile
1.PHONY: all clean
2
3all: pacman.jpg ghost.jpg
4
5pacman.jpg: pacman.xbm
6        xbmtopbm $< | pbmtopgm 1 1 | pgmtoppm yellow-black | \
7            convert - $@
8
9ghost.jpg: ghost.xbm
10        xbmtopbm $< | pbmtopgm 1 1 | pgmtoppm magenta-black | \
11            convert - $@
12
13clean:
14        rm -f pacnman.jpg ghost.jpg
m1/curiosity-demo/README
1The following invocation of midi2osc ...
2
3./midi2osc c8.1=c0.0 c8.2=c0.1 c9.1=c0.2 c9.2=c0.3 c0.7=c0.4 c7.7=c0.5 m1
4
5... assigns the Faderfox LV3 controls to the M1 default MIDI
6configuration (0 through 7) with pacman.fnp as follows:
7
8Left joystick: pacman position
9Right joystick: ghost position
10Fader 1 (leftmost): pacman size
11Fader 2 (rightmost): ghost size
12
13The result can be seen here:
14http://www.youtube.com/watch?v=JuSjp_zKarI
m1/curiosity-demo/ghost.xbm
1#define ghost_width 24
2#define ghost_height 24
3static unsigned char ghost_bits[] = {
4   0xe0, 0xff, 0x07, 0xf8, 0xff, 0x1f, 0xfc, 0xff, 0x3f, 0xfc, 0xff, 0x3f,
5   0x3e, 0xff, 0x7c, 0x1e, 0x7e, 0x78, 0x0e, 0x3c, 0x70, 0x0f, 0x3c, 0xf0,
6   0x0f, 0x3c, 0xf0, 0x8f, 0x3d, 0xf6, 0x8f, 0x3d, 0xf6, 0x1f, 0x7e, 0xf8,
7   0x3f, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
8   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
9   0xcf, 0xcf, 0xe7, 0x87, 0x87, 0xc3, 0x83, 0x83, 0xc1, 0x83, 0x83, 0xc1};
m1/curiosity-demo/pacman.fnp
1imagefile1=pacman.jpg
2imagefile2=ghost.jpg
3decay=0.6
4image1_a=0.6
5image2_a=0.6
6per_frame=image1_zoom=midi5*5+0.1
7per_frame=image2_zoom=midi6*6+0.1
8sx=1.06
9sy=1.06
10per_frame=cx=0.5+0.1*sin(1.82*time)
11per_frame=cy=0.5+0.1*sin(0.97*time)
12per_frame=rot=0.05*sin(0.4*time)
13per_frame=image1_x=midi1
14per_frame=image1_y=1-midi2
15per_frame=image2_x=midi3
16per_frame=image2_y=1-midi4
m1/curiosity-demo/pacman.xbm
1#define pacman_width 24
2#define pacman_height 24
3static unsigned char pacman_bits[] = {
4   0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0xc0, 0xff, 0x01, 0xe0, 0xff, 0x03,
5   0xf0, 0xff, 0x07, 0xf8, 0xff, 0x07, 0xfc, 0xff, 0x03, 0xfe, 0xff, 0x01,
6   0xfe, 0xff, 0x00, 0xfe, 0x3f, 0x00, 0xff, 0x1f, 0x00, 0xff, 0x0f, 0x00,
7   0xff, 0x07, 0x00, 0xff, 0x0f, 0x00, 0xff, 0x1f, 0x00, 0xfe, 0x3f, 0x00,
8   0xfe, 0x7f, 0x00, 0xfe, 0xff, 0x01, 0xfc, 0xff, 0x03, 0xf8, 0xff, 0x07,
9   0xf0, 0xff, 0x07, 0xe0, 0xff, 0x03, 0xc0, 0xff, 0x01, 0x00, 0x3e, 0x00};

Archive Download the corresponding diff file

Branches:
master



interactive