https://github.com/markrosemaker/audacity-go
This go package lets you control Audacity by using scripting/macros.
https://github.com/markrosemaker/audacity-go
Last synced: 8 months ago
JSON representation
This go package lets you control Audacity by using scripting/macros.
- Host: GitHub
- URL: https://github.com/markrosemaker/audacity-go
- Owner: MarkRosemaker
- Created: 2020-05-14T12:22:49.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-05-14T18:01:26.000Z (about 6 years ago)
- Last Synced: 2025-02-26T21:23:40.488Z (over 1 year ago)
- Language: Go
- Homepage: https://manual.audacityteam.org/man/scripting.html
- Size: 4.88 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# audacity-go
This go package lets you control Audacity by using scripting/macros.
## Usage
```go
import audacity "github.com/MarkRosemaker/audacity-go"
```
After your program is done using all the Audacity commands, make sure to call `ClosePipes()` to close the pipes to and from Audacity.
## Example
```go
defer audacity.ClosePipes()
// some code, e.g. a loop
path := "D:/audio/myfile.m4a"
audacity.RemoveTracks() // clear the project
audacity.Import(path) // import the file
audacity.SelectAll() // select all for noise reduction to be applied
audacity.NoiseReduction() // apply noise reduction
audacity.Normalize() // normalize the audio
target := strings.Replace(path, ".m4a", ".mp3", 1)
audacity.Export(target) // export the project to mp3 (or whatever extension target has)
```
## Progress
This repository is not fully done nor sufficiently tested.
To be done:
- [x] connecting to pipes on a windows system
- [x] implementation of universal `Command(cmd string, args ...string) Response` function
- [x] implementation of basic commands
- [ ] implementation of more commands
- [ ] automatic starting of Audacity if it's not running, i.e. pipes are not found
- [ ] testing and implementation with non-windows system
Pull requests are very welcome!