aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDevine Lu Linvega <[email protected]>2019-04-17 16:55:52 +0900
committerDevine Lu Linvega <[email protected]>2019-04-17 16:55:52 +0900
commit6b25b66adc1fb75fd523d9e644760d02c12b95c9 (patch)
treeeb46fba3432b0ac1f7bfa25cbd5a52fe71137124
parent72b74ac18debb62d65f551ba16f9c9feb4a864be (diff)
downloadOrca-6b25b66adc1fb75fd523d9e644760d02c12b95c9.tar.gz
Orca-6b25b66adc1fb75fd523d9e644760d02c12b95c9.zip
Added Chromatic scale example
-rw-r--r--desktop/sources/scripts/clock.js2
-rw-r--r--desktop/sources/scripts/patterns.js4
-rw-r--r--examples/chromatic.orca17
-rw-r--r--examples/pingpong.orca17
4 files changed, 22 insertions, 18 deletions
diff --git a/desktop/sources/scripts/clock.js b/desktop/sources/scripts/clock.js
index ae231ba..e746c89 100644
--- a/desktop/sources/scripts/clock.js
+++ b/desktop/sources/scripts/clock.js
@@ -106,7 +106,7 @@ function Clock (terminal) {
this.toString = function () {
const diff = this.speed.target - this.speed.value
- const _offset = diff > 0 ? `+${diff}` : diff < 0 ? diff : ''
+ const _offset = Math.abs(diff) > 5 ? (diff > 0 ? `+${diff}` : diff) : ''
const _beat = diff === 0 && terminal.orca.f % 4 === 0 ? '*' : ''
return `${this.speed.value}${_offset}${_beat}`
}
diff --git a/desktop/sources/scripts/patterns.js b/desktop/sources/scripts/patterns.js
index ecaed18..4348404 100644
--- a/desktop/sources/scripts/patterns.js
+++ b/desktop/sources/scripts/patterns.js
@@ -30,6 +30,10 @@ patterns['oct#'] = `
.7Tcdefgab
..C.......`
+patterns['scale'] = `
+cTCcDdEFfGgAab
+.C............`
+
patterns['ca44'] = `
.C4
A04`
diff --git a/examples/chromatic.orca b/examples/chromatic.orca
new file mode 100644
index 0000000..12100f6
--- /dev/null
+++ b/examples/chromatic.orca
@@ -0,0 +1,17 @@
+.........................................
+.#.CHROMATIC.#...........................
+.........................................
+.16O.....................................
+.........................................
+..2lc0...................................
+....JJ...................................
+...Ic0...................................
+...5cT*..........*.......................
+...J.....................................
+.H.5cTCcDdEFfGgAab.......................
+.*:03F...................................
+.J...J...................................
+.*:02F...................................
+.........................................
+.........................................
+......................................... \ No newline at end of file
diff --git a/examples/pingpong.orca b/examples/pingpong.orca
deleted file mode 100644
index 21f8fa5..0000000
--- a/examples/pingpong.orca
+++ /dev/null
@@ -1,17 +0,0 @@
-.........................................
-.#.PINGPONG.#............................
-.........................................
-.16O.....................................
-.........................................
-..2l09...................................
-....JJ...................................
-...I09...................................
-...29T*.......*..........................
-.........................................
-.........................................
-.........................................
-.........................................
-.........................................
-.........................................
-.........................................
-......................................... \ No newline at end of file