Added sample audio.

This commit is contained in:
Andrew Lalis 2023-01-02 21:01:38 +01:00
parent 45031c07dd
commit a0e8726ce6
3 changed files with 21 additions and 2 deletions

View File

@ -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 monitorMainRight = peripheral.wrap("monitor_16")
local monitorMainLeft = peripheral.wrap("monitor_17") local monitorMainLeft = peripheral.wrap("monitor_17")
local monitorTopRight = peripheral.wrap("monitor_19") local monitorTopRight = peripheral.wrap("monitor_19")
local monitorTopLeft = peripheral.wrap("monitor_18") local monitorTopLeft = peripheral.wrap("monitor_18")

BIN
elevator/going-up.pcm Normal file

Binary file not shown.

View File

@ -1,12 +1,15 @@
#!/usr/bin/env rdmd #!/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; module pcm_to_lua;
import std.stdio; import std.stdio;
import std.file; import std.file;
const frameSize = 128 * 1024;
int main(string[] args) { int main(string[] args) {
if (args.length < 2) { if (args.length < 2) {
stderr.writeln("Missing required file."); stderr.writeln("Missing required file.");
@ -19,9 +22,11 @@ int main(string[] args) {
} }
byte[] contents = cast(byte[]) std.file.read(audioFilename); byte[] contents = cast(byte[]) std.file.read(audioFilename);
ulong sampleIndex = 0;
stdout.writeln("local audio = {"); stdout.writeln("local audio = {");
foreach (byte sample; contents) { foreach (byte sample; contents) {
stdout.writefln!" %d,"(sample); stdout.writefln!" %d,"(sample);
sampleIndex++;
} }
stdout.writeln("}"); stdout.writeln("}");