Compare commits
31 Commits
a8c6e06187
...
main
Author | SHA1 | Date | |
---|---|---|---|
151318165b | |||
48ef973c54 | |||
92386202db | |||
246b58e7c4 | |||
820cea9bbf | |||
d09cbf8ad6 | |||
29c26d771a | |||
8ee23d17b0 | |||
a55ec54e8e | |||
0969b9b225 | |||
af03bf8fa1 | |||
34652408a0 | |||
8856df75df | |||
152d13bb76 | |||
e443f24f3c | |||
f0d101dc1d | |||
e12b63a238 | |||
eafe6966e4 | |||
1f48f1bb15 | |||
843a90a0cd | |||
f290b18722 | |||
b186d07973 | |||
13238c826d | |||
a9dc6549b1 | |||
7c6297bac9 | |||
4b35e15829 | |||
0aaa206e6a | |||
1e9f849d1e | |||
00a2ca1913 | |||
d5545e29aa | |||
716df973e0 |
@@ -12,20 +12,27 @@ jobs:
|
||||
- run: git config --global core.quotepath false
|
||||
- name: Install apt packages
|
||||
run: apt update && apt install -y rsync
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 23
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true # Fetch Hugo themes (true OR recursive)
|
||||
fetch-depth: 0
|
||||
- uses: https://github.com/actions/setup-go@v4
|
||||
with:
|
||||
go-version: '^1.20'
|
||||
go-version: '^1.23'
|
||||
- name: Setup Hugo
|
||||
uses: https://github.com/peaceiris/actions-hugo@v2
|
||||
with:
|
||||
hugo-version: "latest"
|
||||
extended: true
|
||||
- name: Setup Hugo modules
|
||||
run: hugo mod get -u
|
||||
- name: Setup Hugo npm modules
|
||||
run: hugo mod npm pack
|
||||
- run: npm install
|
||||
- name: Run Hugo
|
||||
run: hugo --minify
|
||||
run: hugo --gc --minify
|
||||
# - name: upload artifacs
|
||||
# uses: https://github.com/actions/upload-artifact@v3
|
||||
# with:
|
||||
|
4
.gitignore
vendored
@@ -1,3 +1,5 @@
|
||||
resources
|
||||
public/
|
||||
.DS_Store
|
||||
.DS_Store
|
||||
content/.obsidian
|
||||
node_modules
|
3
.gitmodules
vendored
@@ -1,3 +0,0 @@
|
||||
[submodule "themes/book"]
|
||||
path = themes/book
|
||||
url = https://github.com/tomoyanonymous/hugo-book.git
|
21
README.md
@@ -21,6 +21,22 @@ https://matsuuratomoya.com
|
||||
|
||||
# 使い方のメモ
|
||||
|
||||
[hugo-book](https://github.com/alex-shpak/hugo-book)をベースに、いくつか手を加えている。
|
||||
|
||||
[hugo-micromorph](https://github.com/tomoyanonymous/hugo-micromorph)で読み込み速度をめっちゃ早くしている。
|
||||
|
||||
## インストール & ビルド
|
||||
|
||||
HugoとNode.jsを入れる。
|
||||
|
||||
```sh
|
||||
git clone gitea:tomoyanoynmous/teach-matsuuratomoya-com.git # giteaは~/.sshの中で設定すること
|
||||
hugo mod get -u
|
||||
hugo mod npm pack
|
||||
npm install
|
||||
hugo server
|
||||
```
|
||||
|
||||
## 新しい授業資料更新のファイル作成コマンド
|
||||
|
||||
```sh
|
||||
@@ -29,10 +45,11 @@ hugo new --kind class content/docs/2023/code-design/10
|
||||
|
||||
## カスタムショートコード
|
||||
|
||||
テーマのショートコードも使える。
|
||||
テーマのショートコードも使える。 https://github.com/alex-shpak/hugo-book#shortcodes
|
||||
|
||||
https://github.com/alex-shpak/hugo-book#shortcodes
|
||||
CallOutは[hugo-admonition](https://github.com/KKKZOZ/hugo-admonitions)が使える。
|
||||
|
||||
FontAwesomeのIconも使える。 https://github.com/hugomods/icons/vendors/font-awesome
|
||||
|
||||
### `embed_pdf` PDFの埋め込み
|
||||
|
||||
|
18
assets/_custom.scss
Normal file
@@ -0,0 +1,18 @@
|
||||
body {
|
||||
//mod by tomoya
|
||||
font-family: "Helvetica Neue",
|
||||
Arial,
|
||||
"Hiragino Sans",
|
||||
"Hiragino Kaku Gothic ProN",
|
||||
Meiryo,
|
||||
sans-serif;
|
||||
font-feature-settings: "palt" 1;
|
||||
word-break: auto-phrase;
|
||||
}
|
||||
|
||||
code {
|
||||
font-family: monospace;
|
||||
}
|
||||
.book-brand .book-icon{
|
||||
filter:none;
|
||||
}
|
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: 2020年度
|
||||
weight: 4
|
||||
weight: -1
|
||||
bookFlatSection: true
|
||||
---
|
||||
|
||||
|
@@ -29,4 +29,4 @@ weight: 1
|
||||
|
||||
{{< button href="20200430_sounddesign1.pdf">}}スライド(PDF){{< /button >}}
|
||||
|
||||
{{< button href="./slides">}}スライド(HTML){{< /button >}}
|
||||
{{< button relref="./slides">}}スライド(HTML){{< /button >}}
|
||||
|
@@ -27,4 +27,4 @@ weight: 10
|
||||
|
||||
{{< button href="20200718_sounddesign10.pdf">}}スライド(PDF){{< /button >}}
|
||||
|
||||
{{< button href="./slides">}}スライド(HTML){{< /button >}}
|
||||
{{< button relref="./slides">}}スライド(HTML){{< /button >}}
|
||||
|
@@ -14,4 +14,4 @@ weight: 11
|
||||
|
||||
{{< button href="20200721_sounddesign11.pdf">}}スライド(PDF){{< /button >}}
|
||||
|
||||
{{< button href="./slides">}}スライド(HTML){{< /button >}}
|
||||
{{< button relref="./slides">}}スライド(HTML){{< /button >}}
|
||||
|
@@ -12,4 +12,4 @@ weight: 12
|
||||
|
||||
{{< button href="20200728_sounddesign12.pdf">}}スライド(PDF){{< /button >}}
|
||||
|
||||
{{< button href="./slides">}}スライド(HTML){{< /button >}}
|
||||
{{< button relref="./slides">}}スライド(HTML){{< /button >}}
|
||||
|
@@ -11,4 +11,4 @@ weight: 13
|
||||
|
||||
{{< button href="20200729_sounddesign13.pdf">}}スライド(PDF){{< /button >}}
|
||||
|
||||
{{< button href="./slides">}}スライド(HTML){{< /button >}}
|
||||
{{< button relref="./slides">}}スライド(HTML){{< /button >}}
|
||||
|
@@ -12,4 +12,4 @@ weight: 14
|
||||
|
||||
{{< button href="20200804_sounddesign14.pdf">}}スライド(PDF){{< /button >}}
|
||||
|
||||
{{< button href="./slides">}}スライド(HTML){{< /button >}}
|
||||
{{< button relref="./slides">}}スライド(HTML){{< /button >}}
|
||||
|
@@ -12,4 +12,4 @@ weight: 15
|
||||
|
||||
{{< button href="20200806_sounddesign15.pdf">}}スライド(PDF){{< /button >}}
|
||||
|
||||
{{< button href="./slides">}}スライド(HTML){{< /button >}}
|
||||
{{< button relref="./slides">}}スライド(HTML){{< /button >}}
|
||||
|
@@ -37,4 +37,4 @@ weight: 2
|
||||
|
||||
{{< button href="20200507_sounddesign2.pdf">}}スライド(PDF){{< /button >}}
|
||||
|
||||
{{< button href="./slides">}}スライド(HTML){{< /button >}}
|
||||
{{< button relref="./slides">}}スライド(HTML){{< /button >}}
|
||||
|
@@ -30,7 +30,7 @@ weight: 3
|
||||
|
||||
{{< button href="20200514_sounddesign3.pdf">}}スライド(PDF){{< /button >}}
|
||||
|
||||
{{< button href="./slides">}}スライド(HTML){{< /button >}}
|
||||
{{< button relref="./slides">}}スライド(HTML){{< /button >}}
|
||||
|
||||
## 非圧縮サンプル音声(ファイル名はスライド参照)
|
||||
|
||||
|
@@ -13,4 +13,4 @@ weight: 4
|
||||
|
||||
{{< button href="20200625_sounddesign4.pdf">}}スライド(PDF){{< /button >}}
|
||||
|
||||
{{< button href="./slides">}}スライド(HTML){{< /button >}}
|
||||
{{< button relref="./slides">}}スライド(HTML){{< /button >}}
|
||||
|
@@ -12,4 +12,4 @@ weight: 5
|
||||
|
||||
{{< button href="20200702_sounddesign5.pdf">}}スライド(PDF){{< /button >}}
|
||||
|
||||
{{< button href="./slides">}}スライド(HTML){{< /button >}}
|
||||
{{< button relref="./slides">}}スライド(HTML){{< /button >}}
|
||||
|
@@ -12,4 +12,4 @@ weight: 6
|
||||
|
||||
{{< button href="20200708_sounddesign6.pdf">}}スライド(PDF){{< /button >}}
|
||||
|
||||
{{< button href="./slides">}}スライド(HTML){{< /button >}}
|
||||
{{< button relref="./slides">}}スライド(HTML){{< /button >}}
|
||||
|
@@ -12,4 +12,4 @@ weight: 7
|
||||
|
||||
{{< button href="20200711_sounddesign7.pdf">}}スライド(PDF){{< /button >}}
|
||||
|
||||
{{< button href="./slides">}}スライド(HTML){{< /button >}}
|
||||
{{< button relref="./slides">}}スライド(HTML){{< /button >}}
|
||||
|
@@ -12,4 +12,4 @@ weight: 8
|
||||
|
||||
{{< button href="20200714_sounddesign8.pdf">}}スライド(PDF){{< /button >}}
|
||||
|
||||
{{< button href="./slides">}}スライド(HTML){{< /button >}}
|
||||
{{< button relref="./slides">}}スライド(HTML){{< /button >}}
|
||||
|
@@ -12,4 +12,4 @@ weight: 9
|
||||
|
||||
{{< button href="20200716_sounddesign9.pdf">}}スライド(PDF){{< /button >}}
|
||||
|
||||
{{< button href="./slides">}}スライド(HTML){{< /button >}}
|
||||
{{< button relref="./slides">}}スライド(HTML){{< /button >}}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: 2021年度
|
||||
weight: 3
|
||||
weight: -2
|
||||
bookFlatSection: true
|
||||
---
|
||||
|
||||
|
@@ -13,5 +13,5 @@ weight: 1
|
||||
|
||||
{{< button href="20210415_sounddesign1.pdf">}}スライド(PDF){{< /button >}}
|
||||
|
||||
{{< button href="./slides">}}スライド(HTML){{< /button >}}
|
||||
{{< button relref="./slides">}}スライド(HTML){{< /button >}}
|
||||
|
||||
|
@@ -12,7 +12,7 @@ weight: 10
|
||||
|
||||
{{< button href="20210610_sounddesign10.pdf">}}スライド(PDF){{< /button >}}
|
||||
|
||||
{{< button href="./slides">}}スライド(HTML){{< /button >}}
|
||||
{{< button relref="./slides">}}スライド(HTML){{< /button >}}
|
||||
|
||||
{{< button href="./20210610_missingfun.pd">}}ミッシングファンダメンタル サンプルパッチ{{< /button >}}
|
||||
|
||||
|
@@ -12,6 +12,6 @@ weight: 11
|
||||
|
||||
{{< button href="20210617_sounddesign11.pdf">}}スライド(PDF){{< /button >}}
|
||||
|
||||
{{< button href="./slides">}}スライド(HTML){{< /button >}}
|
||||
{{< button relref="./slides">}}スライド(HTML){{< /button >}}
|
||||
|
||||
{{< button href="./20210617_stereopan_eqpower.pd">}}ステレオ等価パワーパンナー サンプルパッチ{{< /button >}}
|
@@ -12,5 +12,5 @@ weight: 12
|
||||
|
||||
{{< button href="20210624_sounddesign12.pdf">}}スライド(PDF){{< /button >}}
|
||||
|
||||
{{< button href="./slides">}}スライド(HTML){{< /button >}}
|
||||
{{< button relref="./slides">}}スライド(HTML){{< /button >}}
|
||||
|
||||
|
@@ -12,5 +12,5 @@ weight: 13
|
||||
|
||||
{{< button href="20210701_sounddesign13.pdf">}}スライド(PDF){{< /button >}}
|
||||
|
||||
{{< button href="./slides">}}スライド(HTML){{< /button >}}
|
||||
{{< button relref="./slides">}}スライド(HTML){{< /button >}}
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: 第14週
|
||||
date: 2021-0708
|
||||
date: 2021-07-08
|
||||
weight: 14
|
||||
---
|
||||
|
||||
@@ -12,7 +12,7 @@ weight: 14
|
||||
|
||||
{{< button href="20210708_sounddesign14.pdf">}}スライド(PDF){{< /button >}}
|
||||
|
||||
{{< button href="./slides">}}スライド(HTML){{< /button >}}
|
||||
{{< button relref="./slides">}}スライド(HTML){{< /button >}}
|
||||
|
||||
|
||||
## 最終課題 サンプルパッチ
|
||||
|
@@ -13,5 +13,5 @@ weight: 2
|
||||
|
||||
{{< button href="20210422_sounddesign2.pdf">}}スライド(PDF){{< /button >}}
|
||||
|
||||
{{< button href="./slides">}}スライド(HTML){{< /button >}}
|
||||
{{< button relref="./slides">}}スライド(HTML){{< /button >}}
|
||||
|
||||
|
@@ -13,5 +13,5 @@ weight: 3
|
||||
|
||||
{{< button href="20210506_sounddesign3.pdf">}}スライド(PDF){{< /button >}}
|
||||
|
||||
{{< button href="./slides">}}スライド(HTML){{< /button >}}
|
||||
{{< button relref="./slides">}}スライド(HTML){{< /button >}}
|
||||
|
||||
|
@@ -12,5 +12,5 @@ weight: 4
|
||||
|
||||
{{< button href="20210508_sounddesign4.pdf">}}スライド(PDF){{< /button >}}
|
||||
|
||||
{{< button href="./slides">}}スライド(HTML){{< /button >}}
|
||||
{{< button relref="./slides">}}スライド(HTML){{< /button >}}
|
||||
|
||||
|
@@ -12,5 +12,5 @@ weight: 5
|
||||
|
||||
{{< button href="20210513_sounddesign5.pdf">}}スライド(PDF){{< /button >}}
|
||||
|
||||
{{< button href="./slides">}}スライド(HTML){{< /button >}}
|
||||
{{< button relref="./slides">}}スライド(HTML){{< /button >}}
|
||||
|
||||
|
@@ -12,5 +12,5 @@ weight: 6
|
||||
|
||||
{{< button href="20210520_sounddesign6.pdf">}}スライド(PDF){{< /button >}}
|
||||
|
||||
{{< button href="./slides">}}スライド(HTML){{< /button >}}
|
||||
{{< button relref="./slides">}}スライド(HTML){{< /button >}}
|
||||
|
||||
|
@@ -12,5 +12,5 @@ weight: 7
|
||||
|
||||
{{< button href="20210527_sounddesign7.pdf">}}スライド(PDF){{< /button >}}
|
||||
|
||||
{{< button href="./slides">}}スライド(HTML){{< /button >}}
|
||||
{{< button relref="./slides">}}スライド(HTML){{< /button >}}
|
||||
|
||||
|
@@ -12,5 +12,5 @@ weight: 8
|
||||
|
||||
{{< button href="20210603_sounddesign8.pdf">}}スライド(PDF){{< /button >}}
|
||||
|
||||
{{< button href="./slides">}}スライド(HTML){{< /button >}}
|
||||
{{< button relref="./slides">}}スライド(HTML){{< /button >}}
|
||||
|
||||
|
@@ -12,7 +12,7 @@ weight: 9
|
||||
|
||||
{{< button href="20210605_sounddesign9.pdf">}}スライド(PDF){{< /button >}}
|
||||
|
||||
{{< button href="./slides">}}スライド(HTML){{< /button >}}
|
||||
{{< button relref="./slides">}}スライド(HTML){{< /button >}}
|
||||
|
||||
## クリティカル・リスニング サンプル音源
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: 2022年度
|
||||
weight: 2
|
||||
weight: -3
|
||||
bookFlatSection: true
|
||||
---
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: 2023
|
||||
weight: 1
|
||||
weight: -4
|
||||
bookFlatSection: true
|
||||
---
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: 2023年度
|
||||
weight: 1
|
||||
weight: -5
|
||||
bookFlatSection: true
|
||||
---
|
||||
|
||||
@@ -17,6 +17,9 @@ bookFlatSection: true
|
||||
|
||||
講師:松浦知也
|
||||
|
||||
# 2023年 東京藝術大学 芸術情報センター開設科目 「メディア特論」(通年 水曜6限隔週)(ゲスト講義のため資料なし)
|
||||
|
||||
|
||||
|
||||
# [2023年 福岡女学院大学 「サウンド・デザイン」(夏季集中講義)](fukujo-sounddesign)
|
||||
|
||||
|
@@ -10,5 +10,5 @@ weight: 1
|
||||
|
||||
{{< button href="2023-code-and-design-1.pdf">}}Slides(PDF){{< /button >}}
|
||||
|
||||
{{< button href="./slides">}}Slides(HTML){{< /button >}}
|
||||
{{< button relref="./slides">}}Slides(HTML){{< /button >}}
|
||||
|
||||
|
BIN
content/docs/2023/code-design/11/2023-code-and-design-11.pdf
Normal file
13
content/docs/2023/code-design/11/_index.en.md
Normal file
@@ -0,0 +1,13 @@
|
||||
---
|
||||
title: Week 11
|
||||
date: 2023-06-23
|
||||
weight: 11
|
||||
params:
|
||||
pdf_path: 2023-code-and-design-11.pdf
|
||||
---
|
||||
|
||||
# 2023 Tokyo University of the Arts Art media Center「Code and Design」 Week 11
|
||||
|
||||
## Slide
|
||||
|
||||
{{< embed_pdf >}}
|
13
content/docs/2023/code-design/11/_index.md
Normal file
@@ -0,0 +1,13 @@
|
||||
---
|
||||
title: 第11週
|
||||
date: 2023-06-23
|
||||
weight: 11
|
||||
params:
|
||||
pdf_path: 2023-code-and-design-11.pdf
|
||||
---
|
||||
|
||||
# 2023年 東京藝術大学 芸術情報センター開設科目 「コードとデザイン」 第11回
|
||||
|
||||
## スライド
|
||||
|
||||
{{< embed_pdf >}}
|
13
content/docs/2023/code-design/13/_index.en.md
Normal file
@@ -0,0 +1,13 @@
|
||||
---
|
||||
title: Week 11
|
||||
date: 2023-06-23
|
||||
weight: 11
|
||||
params:
|
||||
pdf_path: 2023-code-and-design-11.pdf
|
||||
---
|
||||
|
||||
# 2023 Tokyo University of the Arts Art media Center「Code and Design」 Week 11
|
||||
|
||||
## Slide
|
||||
|
||||
{{< embed_pdf >}}
|
61
content/docs/2023/code-design/13/_index.md
Normal file
@@ -0,0 +1,61 @@
|
||||
---
|
||||
title: 第13週
|
||||
date: 2023-06-23
|
||||
weight: 13
|
||||
---
|
||||
|
||||
# 2023年 東京藝術大学 芸術情報センター開設科目 「コードとデザイン」 第13回
|
||||
|
||||
## スライド
|
||||
|
||||
(スライド行方不明・・・多分この日はスライドなかったと思います)
|
||||
|
||||
## 銅箔テープで作る平面コイルのSVGを出力するProcessingスケッチ
|
||||
|
||||
|
||||
|
||||
```java
|
||||
import processing.svg.*;
|
||||
|
||||
void setup(){
|
||||
noLoop();
|
||||
size(800,800);
|
||||
stroke(0);
|
||||
background(255);
|
||||
beginRecord(SVG, "spiral.svg");
|
||||
|
||||
}
|
||||
|
||||
float diameter = 800;
|
||||
|
||||
|
||||
void draw(){
|
||||
float angle = 0;
|
||||
float r = 1;
|
||||
float r_step =0.4;
|
||||
float angle_step = 0.1;
|
||||
translate(width/2,height/2);
|
||||
float x_tmp = 0;
|
||||
float y_tmp = 0;
|
||||
while(r < width/2-10){
|
||||
r += r_step;
|
||||
angle += angle_step;
|
||||
float x = r*sin(angle);
|
||||
float y = r*cos(angle);
|
||||
line(x_tmp,y_tmp,x,y);
|
||||
x_tmp = x;
|
||||
y_tmp = y;
|
||||
}
|
||||
r+=9;
|
||||
while(r > 0){
|
||||
r -= r_step;
|
||||
angle -= angle_step;
|
||||
float x = r*sin(angle);
|
||||
float y = r*cos(angle);
|
||||
line(x_tmp,y_tmp,x,y);
|
||||
x_tmp = x;
|
||||
y_tmp = y;
|
||||
}
|
||||
endRecord();
|
||||
}
|
||||
```
|
43
content/docs/2023/code-design/13/svg_spiral.pde
Normal file
@@ -0,0 +1,43 @@
|
||||
import processing.svg.*;
|
||||
|
||||
void setup(){
|
||||
noLoop();
|
||||
size(800,800);
|
||||
stroke(0);
|
||||
background(255);
|
||||
beginRecord(SVG, "spiral.svg");
|
||||
|
||||
}
|
||||
|
||||
float diameter = 800;
|
||||
|
||||
|
||||
void draw(){
|
||||
float angle = 0;
|
||||
float r = 1;
|
||||
float r_step =0.4;
|
||||
float angle_step = 0.1;
|
||||
translate(width/2,height/2);
|
||||
float x_tmp = 0;
|
||||
float y_tmp = 0;
|
||||
while(r < width/2-10){
|
||||
r += r_step;
|
||||
angle += angle_step;
|
||||
float x = r*sin(angle);
|
||||
float y = r*cos(angle);
|
||||
line(x_tmp,y_tmp,x,y);
|
||||
x_tmp = x;
|
||||
y_tmp = y;
|
||||
}
|
||||
r+=9;
|
||||
while(r > 0){
|
||||
r -= r_step;
|
||||
angle -= angle_step;
|
||||
float x = r*sin(angle);
|
||||
float y = r*cos(angle);
|
||||
line(x_tmp,y_tmp,x,y);
|
||||
x_tmp = x;
|
||||
y_tmp = y;
|
||||
}
|
||||
endRecord();
|
||||
}
|
@@ -10,5 +10,5 @@ weight: 2
|
||||
|
||||
{{< button href="2023-code-and-design-2.pdf">}}Slides(PDF){{< /button >}}
|
||||
|
||||
{{< button href="./slides">}}Slides(HTML){{< /button >}}
|
||||
{{< button relref="./slides">}}Slides(HTML){{< /button >}}
|
||||
|
||||
|
@@ -10,5 +10,5 @@ weight: 3
|
||||
|
||||
{{< button href="2023-code-and-design-3.pdf">}}Slides(PDF){{< /button >}}
|
||||
|
||||
{{< button href="./slides">}}Slides(HTML){{< /button >}}
|
||||
{{< button relref="./slides">}}Slides(HTML){{< /button >}}
|
||||
|
||||
|
@@ -10,5 +10,5 @@ weight: 4
|
||||
|
||||
{{< button href="2023-code-and-design-4.pdf">}}Slides(PDF){{< /button >}}
|
||||
|
||||
{{< button href="./slides">}}Slides(HTML){{< /button >}}
|
||||
{{< button relref="./slides">}}Slides(HTML){{< /button >}}
|
||||
|
||||
|
@@ -10,5 +10,5 @@ weight: 5
|
||||
|
||||
{{< button href="2023-code-and-design-5.pdf">}}Slides(PDF){{< /button >}}
|
||||
|
||||
{{< button href="./slides">}}Slides(HTML){{< /button >}}
|
||||
{{< button relref="./slides">}}Slides(HTML){{< /button >}}
|
||||
|
||||
|
@@ -10,5 +10,5 @@ weight: 6
|
||||
|
||||
{{< button href="2023-code-and-design-6.pdf">}}Slides(PDF){{< /button >}}
|
||||
|
||||
{{< button href="./slides">}}Slides(HTML){{< /button >}}
|
||||
{{< button relref="./slides">}}Slides(HTML){{< /button >}}
|
||||
|
||||
|
@@ -10,7 +10,7 @@ weight: 7
|
||||
|
||||
{{< button href="2023-code-and-design-7.pdf">}}Slides(PDF){{< /button >}}
|
||||
|
||||
{{< button href="./slides">}}Slides(HTML){{< /button >}}
|
||||
{{< button relref="./slides">}}Slides(HTML){{< /button >}}
|
||||
|
||||
|
||||
## Python Scripts for Mouse Automation
|
||||
|
@@ -10,7 +10,7 @@ weight: 7
|
||||
|
||||
{{< button href="2023-code-and-design-7.pdf">}}Slides(PDF){{< /button >}}
|
||||
|
||||
{{< button href="./slides">}}Slides(HTML){{< /button >}}
|
||||
{{< button relref="./slides">}}Slides(HTML){{< /button >}}
|
||||
|
||||
|
||||
## Python Scripts for Mouse Automation
|
||||
|
@@ -10,7 +10,7 @@ weight: 9
|
||||
|
||||
{{< button href="2023-code-and-design-9.pdf">}}Slides(PDF){{< /button >}}
|
||||
|
||||
{{< button href="./slides">}}Slides(HTML){{< /button >}}
|
||||
{{< button relref="./slides">}}Slides(HTML){{< /button >}}
|
||||
|
||||
|
||||
## Arduino Example
|
||||
|
@@ -2,6 +2,8 @@
|
||||
title: 第9週
|
||||
date: 2023-06-09
|
||||
weight: 9
|
||||
params:
|
||||
pdf_path: 2023-code-and-design-9.pdf
|
||||
---
|
||||
|
||||
# 2023年 東京藝術大学 芸術情報センター開設科目 「コードとデザイン」 第9回
|
||||
|
@@ -43,10 +43,10 @@ bookCollapseSection: true
|
||||
7. [(5/26) 入力を考える(不条理なマウスを作る)](./7)
|
||||
8. [(6/2) 入力を考える2 - ProcessingとArduinoの連携、オブジェクト指向プログラミング(一人用PONG)](./8)
|
||||
9. [(6/9) 出力を考える - Arduinoでの音声プログラミング](./9)
|
||||
10. (6/16) Cartesian Robotとデジタルファブリケーション (3DプリンターとGコードハック)
|
||||
11. (6/23) 制作①相談
|
||||
12. (6/30) 制作②作業
|
||||
13. (7/7) 制作③ 内容に応じた補足授業
|
||||
10. (6/16) 制作①相談1
|
||||
11. [(6/23) デジタルファブリケーション:入力機器(可変抵抗)を作る](./11)
|
||||
12. (6/30) 制作②相談2
|
||||
13. [(7/7) デジタルファブリケーション:出力機器(スピーカー)を作る](./13)
|
||||
14. (7/14) 課題発表展示
|
||||
15. (7/21) 展示撤収・発表ふりかえりとまとめ
|
||||
|
||||
|
15
content/docs/2023/mediaart-programming2/1/_index.en.md
Normal file
@@ -0,0 +1,15 @@
|
||||
---
|
||||
title: Week 1
|
||||
date: 2023-10-06
|
||||
weight: 1
|
||||
draft: false
|
||||
params:
|
||||
pdf_path: 2023-media-art-programming2-1.pdf
|
||||
---
|
||||
|
||||
# 2023 Media Art Programming #1
|
||||
|
||||
## Slides
|
||||
|
||||
{{< embed_pdf >}}
|
||||
|
14
content/docs/2023/mediaart-programming2/1/_index.md
Normal file
@@ -0,0 +1,14 @@
|
||||
---
|
||||
title: 第1週
|
||||
date: 2023-10-06
|
||||
weight: 1
|
||||
draft: false
|
||||
params:
|
||||
pdf_path: 2023-media-art-programming2-1.pdf
|
||||
---
|
||||
|
||||
# 2023年 メディアアート・プログラミング 第1回
|
||||
|
||||
## スライド
|
||||
|
||||
{{< embed_pdf >}}
|
12
content/docs/2023/mediaart-programming2/10/1_launch.js
Normal file
@@ -0,0 +1,12 @@
|
||||
const puppeteer = require('puppeteer');
|
||||
|
||||
const main = async () => {
|
||||
let browser = await puppeteer.launch({ headless: false });
|
||||
let page = await browser.newPage();
|
||||
await page.goto('https://www.youtube.com/');
|
||||
await page.screenshot({ path: "./ss.png", fullPage: true });
|
||||
await page.close();
|
||||
await browser.close();
|
||||
};
|
||||
|
||||
main();
|
11
content/docs/2023/mediaart-programming2/10/2_async_intro.js
Normal file
@@ -0,0 +1,11 @@
|
||||
const puppeteer = require('puppeteer');
|
||||
|
||||
const main = async () =>
|
||||
puppeteer.launch({ headless: false })
|
||||
.then(browser => browser.newPage()
|
||||
.then(page => page.goto('https://www.youtube.com/')
|
||||
.then(_response => page.screenshot({ path: "./ss.png" })
|
||||
.then(_ => page.close()
|
||||
.then(_ => browser.close())))));
|
||||
|
||||
main();
|
21
content/docs/2023/mediaart-programming2/10/3_map_async.js
Normal file
@@ -0,0 +1,21 @@
|
||||
const puppeteer = require('puppeteer');
|
||||
|
||||
const take_screen_shot = async (browser, url, index) => {
|
||||
let page = await browser.newPage();
|
||||
let path = `${index}.png`;
|
||||
await page.goto(url);
|
||||
await page.screenshot({ path: path });
|
||||
await page.close();
|
||||
}
|
||||
|
||||
const main = async () => {
|
||||
let browser = await puppeteer.launch({ headless: false ,args: ["--window-size=1920,1080"],timeout:0});
|
||||
const urllist = ["https://www.youtube.com",
|
||||
"https://www.google.com",
|
||||
"https://www.geidai.ac.jp",
|
||||
"https://yahoo.co.jp"]
|
||||
await Promise.all(urllist.map((url, index) => take_screen_shot(browser, url, index)));
|
||||
await browser.close();
|
||||
}
|
||||
|
||||
main();
|
13
content/docs/2023/mediaart-programming2/10/4_auto_scroll.js
Normal file
@@ -0,0 +1,13 @@
|
||||
const puppeteer = require('puppeteer');
|
||||
const autoScroll = require("./autoscroll.js").autoScroll;
|
||||
|
||||
const main = async () => {
|
||||
let browser = await puppeteer.launch({ headless: false });
|
||||
let page = await browser.newPage();
|
||||
await page.goto('https://www.youtube.com/');
|
||||
await autoScroll(page,10);
|
||||
await page.screenshot({ path: "ss_full.png", fullPage: true })
|
||||
await page.close();
|
||||
await browser.close();
|
||||
}
|
||||
main();
|
@@ -0,0 +1,19 @@
|
||||
const puppeteer = require('puppeteer');
|
||||
const autoScroll = require("./autoscroll.js").autoScroll;
|
||||
|
||||
const main = async () => {
|
||||
let browser = await puppeteer.launch({ headless: false });
|
||||
let page = await browser.newPage();
|
||||
await page.goto('https://www.youtube.com/');
|
||||
for (let i = 0; i < 1000; i++) {
|
||||
const urllist = await page.$$eval("a#thumbnail", elems => elems.map(elem => elem.href));
|
||||
const url = urllist[3];
|
||||
console.log(url)
|
||||
await page.goto(url);
|
||||
await autoScroll(page, 10);
|
||||
await page.screenshot({ path: `${i}.png`, fullPage: true });
|
||||
}
|
||||
await page.close();
|
||||
await browser.close();
|
||||
}
|
||||
main();
|
15
content/docs/2023/mediaart-programming2/10/_index.en.md
Normal file
@@ -0,0 +1,15 @@
|
||||
---
|
||||
title: Week 10
|
||||
date: 2023-12-08
|
||||
weight: 10
|
||||
draft: false
|
||||
params:
|
||||
pdf_path: 2023-media-art-programming2-10.pdf
|
||||
---
|
||||
|
||||
# 2023 Media Art Programming #10
|
||||
|
||||
## Slides
|
||||
|
||||
{{< embed_pdf >}}
|
||||
|
30
content/docs/2023/mediaart-programming2/10/_index.md
Normal file
@@ -0,0 +1,30 @@
|
||||
---
|
||||
title: 第10週
|
||||
date: 2023-12-08
|
||||
weight: 10
|
||||
draft: false
|
||||
params:
|
||||
pdf_path: 2023-media-art-programming2-10.pdf
|
||||
---
|
||||
|
||||
# 2023年 メディアアート・プログラミング 第10回
|
||||
|
||||
## スライド
|
||||
|
||||
{{< embed_pdf >}}
|
||||
|
||||
## puppeteerのコードサンプル
|
||||
|
||||
`autoscroll.js`は`4_auto_scroll.js`でライブラリとして使用するだけなので、内容を理解しなくても大丈夫です。
|
||||
|
||||
{{< preview_code href="1_launch.js" type= "js">}}
|
||||
|
||||
{{< preview_code href="2_async_intro.js" type= "js">}}
|
||||
|
||||
{{< preview_code href="3_map_async.js" type= "js">}}
|
||||
|
||||
{{< preview_code href="4_auto_scroll.js" type= "js">}}
|
||||
|
||||
{{< preview_code href="5_youtube_hopper.js" type= "js">}}
|
||||
|
||||
{{< preview_code href="autoscroll.js" type= "js">}}
|
18
content/docs/2023/mediaart-programming2/10/autoscroll.js
Normal file
@@ -0,0 +1,18 @@
|
||||
async function autoScroll(page, maxScrolls) {
|
||||
await page.evaluate(async maxScrolls => {
|
||||
await new Promise((then) => {
|
||||
let distance = 1000;
|
||||
let scrolls = 0;
|
||||
let timer = setInterval(() => {
|
||||
window.scrollBy(0, distance);
|
||||
scrolls += 1;
|
||||
if (scrolls >= maxScrolls) {
|
||||
clearInterval(timer);
|
||||
then();
|
||||
}
|
||||
}, 100);
|
||||
});
|
||||
}, maxScrolls);
|
||||
}
|
||||
|
||||
exports.autoScroll = autoScroll;
|
15
content/docs/2023/mediaart-programming2/10/package.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"name": "20231201-scraping_test",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"jsdom": "^23.0.1",
|
||||
"puppeteer": "^21.6.0",
|
||||
}
|
||||
}
|
15
content/docs/2023/mediaart-programming2/2/_index.en.md
Normal file
@@ -0,0 +1,15 @@
|
||||
---
|
||||
title: Week 2
|
||||
date: 2023-10-13
|
||||
weight: 2
|
||||
draft: false
|
||||
params:
|
||||
pdf_path: 2023-media-art-programming2-2.pdf
|
||||
---
|
||||
|
||||
# 2023 Media Art Programming #2
|
||||
|
||||
## Slides
|
||||
|
||||
{{< embed_pdf >}}
|
||||
|
14
content/docs/2023/mediaart-programming2/2/_index.md
Normal file
@@ -0,0 +1,14 @@
|
||||
---
|
||||
title: 第2週
|
||||
date: 2023-10-13
|
||||
weight: 2
|
||||
draft: false
|
||||
params:
|
||||
pdf_path: 2023-media-art-programming2-2.pdf
|
||||
---
|
||||
|
||||
# 2023年 メディアアート・プログラミング 第2回
|
||||
|
||||
## スライド
|
||||
|
||||
{{< embed_pdf >}}
|
18
content/docs/2023/mediaart-programming2/3/_index.en.md
Normal file
@@ -0,0 +1,18 @@
|
||||
---
|
||||
title: Week 3
|
||||
date: 2023-10-20
|
||||
weight: 3
|
||||
params:
|
||||
pdf_path: 2023-media-art-programming2-3.pdf
|
||||
draft: false
|
||||
---
|
||||
|
||||
# 2023 メディアアート・プログラミング Week 3
|
||||
|
||||
## Slides
|
||||
|
||||
{{< embed_pdf >}}
|
||||
|
||||
{{< button href=.Page.Params.pdf_path >}}Slides(PDF){{< /button >}}
|
||||
|
||||
{{< button href="slides">}}Slides(HTML){{< /button >}}
|
18
content/docs/2023/mediaart-programming2/3/_index.md
Normal file
@@ -0,0 +1,18 @@
|
||||
---
|
||||
title: 第3週
|
||||
date: 2023-10-20
|
||||
weight: 3
|
||||
draft: false
|
||||
params:
|
||||
pdf_path: 2023-media-art-programming2-3.pdf
|
||||
---
|
||||
|
||||
# 2023年 メディアアート・プログラミング 第3回
|
||||
|
||||
## スライド
|
||||
|
||||
{{< embed_pdf >}}
|
||||
|
||||
{{< button href=.Page.Params.pdf_path >}}スライド(PDF){{< /button >}}
|
||||
|
||||
{{< button href="slides">}}スライド(HTML){{< /button >}}
|
After Width: | Height: | Size: 374 KiB |
After Width: | Height: | Size: 159 KiB |
After Width: | Height: | Size: 974 KiB |
After Width: | Height: | Size: 290 KiB |
After Width: | Height: | Size: 1.2 MiB |
After Width: | Height: | Size: 1.5 MiB |
After Width: | Height: | Size: 594 KiB |
After Width: | Height: | Size: 703 KiB |
After Width: | Height: | Size: 1.4 MiB |
After Width: | Height: | Size: 536 KiB |
After Width: | Height: | Size: 689 KiB |
After Width: | Height: | Size: 443 KiB |
After Width: | Height: | Size: 366 KiB |
After Width: | Height: | Size: 444 KiB |
After Width: | Height: | Size: 442 KiB |
After Width: | Height: | Size: 506 KiB |
After Width: | Height: | Size: 342 KiB |
After Width: | Height: | Size: 2.2 MiB |
After Width: | Height: | Size: 630 KiB |
After Width: | Height: | Size: 499 KiB |
After Width: | Height: | Size: 547 KiB |
After Width: | Height: | Size: 796 KiB |
After Width: | Height: | Size: 746 KiB |
After Width: | Height: | Size: 720 KiB |
After Width: | Height: | Size: 192 KiB |