This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- div | |
-- modulo matrix sequencing | |
-- with variable divisions | |
-- by lijnenspel | |
-- | |
-- grid needed | |
-- x = tracks, y = division | |
-- add samples via param menu | |
-- | |
-- enc 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(fn mass->fuel [mass] | |
(-> (tonumber mass) (/ 3) (math.floor) (- 2))) | |
(let [file (io.open "1.data" "r") | |
file-contents (file:read "*a") | |
mods (string.gmatch file-contents "%d+")] | |
(var total-fuel 0) | |
(each [mass mods] | |
(let [fuel (mass->fuel mass)] | |
(set total-fuel (+ total-fuel fuel)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(fn mass->fuel [mass] | |
(-> (tonumber mass) (/ 3) (math.floor) (- 2))) | |
(let [file (io.open "1.data" "r") | |
file-contents (file:read "*a") | |
mods (string.gmatch file-contents "%d+")] | |
(var total-fuel 0) | |
(each [mass mods] | |
(let [fuel (mass->fuel mass)] | |
(set total-fuel (+ total-fuel fuel)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(fn mass->fuel [mass] | |
(-> (tonumber mass) (/ 3) (math.floor) (- 2))) | |
(let [file (io.open "1.data" "r") | |
file-contents (file:read "*a") | |
mods (string.gmatch file-contents "%d+")] | |
(var total-fuel 0) | |
(each [mass mods] | |
(let [fuel (mass->fuel mass)] | |
(set total-fuel (+ total-fuel fuel)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function ssidChangedCallback() | |
newSSID = hs.wifi.currentNetwork() | |
if newSSID ~= lastSSID then | |
hs.alert.show("Wifi Change - Zeroing Volume", 5) | |
hs.audiodevice.defaultOutputDevice():setVolume(0) | |
end | |
lastSSID = newSSID | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MIDI clock in running | |
MIDI stop -> No clock running | |
stop button -> No clock running | |
Analog clock in | |
Reset | |
When no more incoming pulse for ref ppqn ticks -> No clock running | |
RUN | |
Run signal low -> No clock running | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MIDI clock in running | |
MIDI stop -> No clock running | |
stop button -> No clock running | |
Analog clock in | |
Reset | |
When no more incoming pulse for ref ppqn ticks -> No clock running | |
MIDI start -> MIDI clock in running | |
MIDI stop -> No clock running | |
RUN |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MIDI clock in running | |
MIDI stop -> No clock running | |
stop button -> No clock running | |
Analog clock in | |
Reset | |
When no more incoming pulse for ref ppqn ticks -> No clock running | |
MIDI start -> MIDI clock in running | |
MIDI stop -> No clock running | |
RUN |
OlderNewer