Skip to content

Commit 54c26cc

Browse files
committed
[Docs]
1 parent ec115b7 commit 54c26cc

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

README.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,54 @@
22

33
A [nushell](https://www.nushell.sh/) plugin to make and play sounds
44

5+
## Usage
6+
7+
* sound beep - play a beep sound
8+
* sound make - creates a noise with given frequency and duration
9+
* sound meta - get duration and meta data of an audio file
10+
* sound play - play an audio file, by default supports flac,Wav,mp3 and ogg files, install plugin with `all-decoders` feature to include aac and mp* (audio)
11+
512
## Examples
613

14+
* to create a simple noise:
15+
16+
```bash
17+
~> sound make 1000 200ms
18+
```
19+
20+
* create a simple noise sequence
21+
22+
```bash
23+
~> [ 300.0, 500.0, 1000.0, 400.0, 600.0 ] | each { |it| sound make $it 150ms }
24+
```
25+
26+
* play first 3seconds of an audio
27+
28+
```bash
29+
~> sound play audio.mp3 -d 3sec
30+
```
31+
32+
* load metadata of an audio file
33+
34+
```bash
35+
~> sound meta audio.mp4
36+
╭──────────────┬────────────────────────────╮
37+
│ duration │ 4min 5sec 551ms 20µs 408ns │
38+
│ artist │ SINGER │
39+
│ title │ TITLE │
40+
│ album │ ALBUM │
41+
│ album_artist │ SINGER │
42+
│ track_no │ 1 │
43+
│ total_tracks │ 1 │
44+
╰──────────────┴────────────────────────────╯
45+
```
46+
47+
* to correctly play a mp3 audio file you need to first load its metadata and then use its duration to play it
48+
49+
```bash
50+
~> sound meta audio.mp4 | sound play audio.mp3 -d $in.duration
51+
```
52+
753
## Installing
854
955
* supported features:

0 commit comments

Comments
 (0)