Arissounddart - a Command-line SoundSprite generator for Dart

Overview

SoundDart

SoundDart is a Command-line SoundSprite generator for Dart.

It requires the wonderful ffmpeg to be in your PATH. Thanks to unscripted for simplifying command-line app creation and audiosprite.js for inspiration.

##What's a SoundSprite?## Just like sprite sheets for graphics, a SoundSprite is comprised of several sounds, stitched together in a single compressed file. This allows for fewer HTTP Requests / deployed assets in your project. A configurable silence gap is placed between each sound (to help prevent loose Audio APIs from running into other sounds) and since Variable Bit Rate (VBR) encoding is available for most formats, there is little file size penalty.

##How do I use SoundDart?## SoundDart is run on the command-line, using the DartVM like so:

dart path/to/sounddart.dart

Passing no options will provide a familiar help block:

Combines uncompressed sound files, encodes to popular formats, and generates json atlas.

Usage:

dart sounddart.dart [options] files...

Options:

-h, --help          Print this usage information.
-o, --output        Filename for the output file(s), without extension.
                    (defaults to "output")

-e, --export        Limit exported file types. eg "mp3,ogg"
                    (defaults to "")

-r, --samplerate    Sample rate.
                    (defaults to "44100")

-c, --channels      Number of channels (1=mono, 2=stereo).
                    (defaults to "1")

-g, --gap           Length of gap in seconds.
                    (defaults to ".25")

-v, --verbose       Be super chatty.

Examples:

dart sounddart.dart -o audio *.wav # wildcard expansion supported even if your shell doesn't
dart sounddart.dart -e "mp3,ogg" *.wav # only export mp3 and ogg formats

SoundDart will then chain all of your sounds together and output SoundSprites in several formats (mp3, ogg, opus, m4a) and a .json atlas (currently supports the format used by StageXL and Howler.js) in your current working directory:

Bomb0 added at 0.00 seconds, length 0.84 seconds
Bomb1 added at 1.09 seconds, length 0.84 seconds
Bomb2 added at 2.19 seconds, length 0.85 seconds
Bomb3 added at 3.28 seconds, length 0.84 seconds
Bomb4 added at 4.37 seconds, length 0.82 seconds
click added at 5.45 seconds, length 0.60 seconds
flag added at 6.30 seconds, length 0.16 seconds
Pop0 added at 6.70 seconds, length 0.20 seconds
Pop1 added at 7.16 seconds, length 0.21 seconds
Pop2 added at 7.61 seconds, length 0.20 seconds
Pop3 added at 8.07 seconds, length 0.19 seconds
Pop4 added at 8.50 seconds, length 0.21 seconds
Pop5 added at 8.96 seconds, length 0.23 seconds
Pop6 added at 9.44 seconds, length 0.19 seconds
Pop7 added at 9.89 seconds, length 0.19 seconds
Pop8 added at 10.33 seconds, length 0.21 seconds
throw added at 10.79 seconds, length 0.14 seconds
unflag added at 11.18 seconds, length 0.31 seconds
win added at 11.75 seconds, length 3.83 seconds
Total sprite length 15.58 seconds, uncompressed size 1342 KB
output.opus created, compressed size 121 KB
output.mp3 created, compressed size 128 KB
output.m4a created, compressed size 248 KB
output.ogg created, compressed size 109 KB
all done - kthxbye!
You might also like...

πŸš€The Flutter dart code generator from zeplin. ex) Container, Text, Color, TextStyle, ... - Save your time.

πŸš€The Flutter dart code generator from zeplin. ex) Container, Text, Color, TextStyle, ... - Save your time.

Flutter Gen Zeplin Extension πŸš€ The Flutter dart code generator from zeplin. ex) Container, Text, Color, TextStyle, ... - Save your time. ⬇ 1.1k Getti

Oct 12, 2022

Dart Code Generator for generating mapper classes

Smartstruct - Dart bean mappings - the easy nullsafe way! Code generator for generating type-safe mappers in dart, inspired by https://mapstruct.org/

Nov 29, 2022

The Dart code generator for your package versions. 🎯

The Dart code generator for your package versions. 🎯

The Dart code generator for your package versions. There is no way to get the package version from the code in the Dart ecosystem. Installation Add bu

Dec 14, 2022

OpenAPI generator for Dart & Flutter

Fantom Fantom is a cli tool for generating API layer based on OpenAPI Spec. Usage Install fantom $ dart pub global activate fantom Generate API client

Oct 18, 2022

OpenAPI generator for Dart & Flutter

Fantom Fantom is a cli tool for generating API layer based on OpenAPI Spec. Usage Install fantom $ dart pub global activate fantom Generate API client

Oct 18, 2022

Dart R-file generator for build_runner

r_resources This package is made for R-file code generation using build_runner.

Dec 17, 2021

Destiny is a new, mock-data generator for Dart/Flutter

Destiny is a new, mock-data generator for Dart/Flutter. It uses static methods couched in a destiny namespace as the API.

Sep 16, 2022

Scribble is a lightweight library for freehand drawing in Flutter supporting pressure, variable line width and more!

Scribble is a lightweight library for freehand drawing in Flutter supporting pressure, variable line width and more!

Scribble Scribble is a lightweight library for freehand drawing in Flutter supporting pressure, variable line width and more! A

Dec 16, 2022

Starter project and code generator for Flutter/Redux

Starter project and code generator for Flutter/Redux

Flutter Redux Starter/Code Generator Videos Short video ~ 1 minute Long video ~ 10 minutes We're using this approach to develop the Flutter app for In

Dec 12, 2022
Owner
Behruz Hurramov
Behruz Hurramov
Behruz Hurramov
Uproot(uprt) is a multi-platform (Windows, MacOs, and Linux) command line utility written in Dart to convert a router's DHCP IP Reservations between routers

UPROOT Uproot(uprt) is a multi-platform (Windows, MacOs, and Linux) command line utility written in Dart to convert a router's DHCP IP Reservations be

GeekVisit 73 Jan 1, 2023
A command-line interface for Ultroid

UltroidCli Welcome to the UltroidCli project built for The Ultroid. This Project is actively maintained by Akash Pattnaik. All kinds of contributions

AkashPattanaik 38 Nov 13, 2022
Command-line tool to provide null-safety percentage info of a project. Track your migration progress on mixed-version programs that execute with unsound null safety.

null_safety_percentage Command-line tool to provide null-safety percentage info of a project. Track your migration progress on mixed-version programs

dartside.dev 8 Mar 27, 2022
Easy to use cross-platform regex replace command line util

replace Easy to use cross-platform regex replace command line util. Can't remember the arguments to the find command? or how xargs works? Maybe sed is

Rob Becker 3 Feb 1, 2022
A simple command-line application to generate simple folder and file structure for Flutter Applications

Kanza_cli is a simple command line tool to generate folder and file structure for your Flutter apps. To use it, you should do the followings: 1. First

Kanan Yusubov 9 Dec 16, 2022
Command-line Interface (CLI) for any_icon_maker.

makeanyicon Command-line Interface (CLI) for any_icon_maker. makeanyicon Quick Start Installation Usage License Quick Start Installation dart pub glob

MakeAnyIcon 6 Nov 4, 2022
A tool to easily install the Android SDK command-line and platform tools.

gibadb A tool to easily install the Android SDK command-line and platform tools. For developers: This README describes the CLI tool that ships with th

null 3 Sep 22, 2022
A simple shortcut, command line interface (CLI) for a lazy (a.k.a effective) Flutter developer in order to increase productivity and happiness.

f A simple shortcut, command line interface (CLI) for a lazy (a.k.a effective) Flutter developer in order to increase productivity and happiness. Inst

Salman S 27 Nov 22, 2022
A Flutter curl-command generator for Dio

curl_logger_dio_interceptor A Flutter curl-command generator for Dio. Easily test your Flutter-made requests in your favorite terminal or even in Post

null 7 Nov 17, 2022
Environment specific config generator for Dart and Flutter applications during CI/CD builds

Environment Config Generator Environment specific config generator. Allows to specify env configuration during CI/CD build. Primarily created to simpl

Denis Beketsky 86 Dec 2, 2022