commit be6dfcc722359d09aea03b45c16b80ddaead52fa Author: Vincent Rozenberg Date: Thu Nov 14 10:36:52 2024 +0100 Add files via upload diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..79b5b54 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 Vincent Rozenberg + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..f8ca674 --- /dev/null +++ b/README.md @@ -0,0 +1,67 @@ +# WAV Recording Time Calculator WordPress Plugin + +A WordPress plugin that provides a calculator for determining WAV recording time based on storage capacity and audio settings. This tool helps audio professionals and enthusiasts calculate recording duration for their WAV files based on various technical parameters. + +## Features + +- Calculate recording time based on: + - SD Card/Storage size (GB) + - Sample rate (48 kHz, 96 kHz, 192 kHz) + - Bit depth (16-bit, 24-bit, 32-bit) + - Unlimited number of tracks +- Real-time calculations +- Displays: + - Total recording time + - Data rate (Kbps and Mbps) + - Storage required per hour +- Responsive design with dark mode support +- Clean, professional interface + +## Installation + +1. Download the plugin files +2. Upload the plugin folder to the `/wp-content/plugins/` directory +3. Activate the plugin through the 'Plugins' menu in WordPress + +## Usage + +Add the calculator to any post or page using the shortcode: + +``` +[wav_calculator] +``` + +## Technical Details + +The calculator takes into account: +- Storage capacity in gigabytes (GB) +- Sample rates: 48 kHz, 96 kHz, 192 kHz +- Bit depths: 16-bit, 24-bit, 32-bit +- Multi-track support with no upper limit + +Calculations are performed using the following formula: +- Total bytes = Card size in GB * 1,000,000,000 +- Bytes per second = (Sample rate * 1000) * (Bit depth / 8) * Number of tracks +- Total seconds = Total bytes / Bytes per second + +The calculator provides real-time updates and includes data rate calculations in both Kbps and Mbps, as well as storage requirements per hour of recording. + +## Requirements + +- WordPress 5.0 or higher +- PHP 7.0 or higher + +## License + +This project is licensed under the MIT License. + +## Author + +Created by Vincent Rozenberg +- Website: [vincentrozenberg.com](https://vincentrozenberg.com) + +## Notes + +- Storage cards typically have slightly less usable space than their advertised capacity due to file system overhead +- The calculator assumes uncompressed WAV format +- Calculations are theoretical and may vary slightly in real-world usage diff --git a/wav-calculator-mono.php b/wav-calculator-mono.php new file mode 100644 index 0000000..f7b0898 --- /dev/null +++ b/wav-calculator-mono.php @@ -0,0 +1,399 @@ + + +
+

WAV Recording Time Calculator

+ +
+ +
+ + GB +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ +
+ + +
+ +
+
+ Recording Time (32 GB): + -- +
+
+ Data Rate: + -- +
+
+ Storage per Hour: + -- +
+
+ Note: Storage cards have slightly less usable space than their advertised capacity due to file system overhead. Plan accordingly when recording near maximum capacity.
+
+
+ + diff --git a/wav-calculator.php b/wav-calculator.php new file mode 100644 index 0000000..6b998bf --- /dev/null +++ b/wav-calculator.php @@ -0,0 +1,27 @@ +