-
Notifications
You must be signed in to change notification settings - Fork 7
/
includes.lua
153 lines (123 loc) · 3.34 KB
/
includes.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
-- ships with norns
crow = require("crow")
er = require("er")
fileselect = require("fileselect")
musicutil = require("musicutil")
textentry = require("textentry")
tabutil = require("tabutil")
engine.name = "PolyPerc"
local lib = "arcologies/lib/"
-- stores application configuration and cell composition data
config = include(lib .. "config")
config_ = io.open(_path["code"] .. lib .. "config_.lua", "r")
if config_ ~= nil then
io.close(config_)
include(lib .. "config_")
end
-- defines cell structures
include(lib .. "structures")
-- the core concept of arcologies, interact with Signals
include(lib .. "Cell")
--[[
attributes of cells. adding more minimally requires:
- copy mixins/_template.lua to mixinsfoobar_mixin.lua
- config in in structures.lua
- contstructor code in Cell.lua
- probably some logic in keeper:collision()
- saveload.lua
]]
local mixins = {
"bearing_mixin",
"capacity_mixin",
"channel_mixin",
"charge_mixin",
"clockwise_mixin",
"crow_out_mixin",
"crumble_mixin",
"deflect_mixin",
"device_mixin",
"docs_stub_mixin",
"drift_mixin",
"duration_mixin",
"er_mixin",
"level_mixin",
"metabolism_mixin",
"nb_select_mixin",
"nb_voice_mixin",
"network_mixin",
"notes_mixin",
"offset_mixin",
"operator_mixin",
"output_mixin",
"ports_mixin",
"probability_mixin",
"psyop_mixin",
"pulses_mixin",
"range_mixin",
"resilience_mixin",
"state_index_mixin",
"structure_mixin",
"target_mixin",
"territory_mixin",
"topography_mixin",
"turing_mixin",
"velocity_mixin"
}
for k, v in pairs(mixins) do
include(lib .. "mixins/" .. v)
end
-- emitted by Cells, "bangs" that move n, e, s, w
include(lib .. "Signal")
-- global functions
fn = include(lib .. "functions")
-- all the save and load routines
saveload = include(lib .. "saveload")
-- arc interactions and leds
_arc = include(lib .. "_arc")
-- the whole murder of them
_crow = include(lib .. "_crow")
-- clocks, metros, timing
counters = include(lib .. "counters")
-- in app documentation
docs = include(lib .. "docs")
-- read & write on norns
filesystem = include(lib .. "filesystem")
-- grid interactions and leds
_grid = include(lib .. "_grid")
-- structure glyph drawings
glyphs = include(lib .. "glyphs")
-- all norns screen rendering
graphics = include(lib .. "graphics")
--[[
"keeper" is state machine for Cells and Signals
a lot of the "higher order" logic happens here
for example, solariums absorb signals to increase
their charge, then invert their ports and release
once capacity is met. - solariums have charge and
capacity, but don't know exactly what to do with
them. this is where keeper comes in.
furthermore, Signals know nothing about Cells. Cells
know nothing about Signals. keeper:collide() is
the great atom smasher.
]]
keeper = include(lib .. "keeper")
-- build the side menus for norns pages
menu = include(lib .. "menu")
-- midi interface
_midi = include(lib .. "_midi")
-- controller for norns pages
page = include(lib .. "page")
-- exposed norns parameters
parameters = include(lib .. "parameters")
-- popup menu for selecting complex values
popup = include(lib .. "popup")
-- softcut
_softcut = include(lib .. "_softcut")
-- all things musical
sound = include(lib .. "sound")
-- experimental
api = include(lib .. "api")
-- https://github.com/sixolet/nb
nb = include(lib .. "nb/nb")
-- dev only stuff
dev = include(lib .. "dev")