diff --git a/command-center/command-center.lua b/command-center/command-center.lua index b54aad8..532cb60 100644 --- a/command-center/command-center.lua +++ b/command-center/command-center.lua @@ -1,5 +1,19 @@ +--[[ + Central Command Center for AE, Power, and other Monitoring. + + Sections: + - AE Monitoring + - Key items + - Quantum links + - Stock levels + - Energy Levels + - Power Monitoring + - Control energy generation +]] + local monitorMainRight = peripheral.wrap("monitor_16") local monitorMainLeft = peripheral.wrap("monitor_17") local monitorTopRight = peripheral.wrap("monitor_19") -local monitorTopLeft = peripheral.wrap("monitor_18") \ No newline at end of file +local monitorTopLeft = peripheral.wrap("monitor_18") + diff --git a/elevator/going-up.pcm b/elevator/going-up.pcm new file mode 100644 index 0000000..398e968 Binary files /dev/null and b/elevator/going-up.pcm differ diff --git a/pcmToLua.d b/pcmToLua.d index 628af94..8f66a65 100755 --- a/pcmToLua.d +++ b/pcmToLua.d @@ -1,12 +1,15 @@ #!/usr/bin/env rdmd /** - * Converts a signed 8-bit PCM audio file into a Lua table list. + * Converts a signed 8-bit PCM audio file into a Lua table list. Run this from + * the command-line via `./pcmToLua my-pcm-file.pcm`. */ module pcm_to_lua; import std.stdio; import std.file; +const frameSize = 128 * 1024; + int main(string[] args) { if (args.length < 2) { stderr.writeln("Missing required file."); @@ -19,9 +22,11 @@ int main(string[] args) { } byte[] contents = cast(byte[]) std.file.read(audioFilename); + ulong sampleIndex = 0; stdout.writeln("local audio = {"); foreach (byte sample; contents) { stdout.writefln!" %d,"(sample); + sampleIndex++; } stdout.writeln("}");