Wraps common audio-related tasks into Dragonfly analysers and processors.
Add this line to your application’s Gemfile:
And then execute:
Or install it yourself as:
$ gem install dragonfly_audio
This gem uses taglib-ruby to read and write meta data and properties of audio files.
:audio plugin to your Dragonfly config block:
List of supported formats is available as:
DragonflyAudio::SUPPORTED_FORMATS # => ["aif", "aiff", …]
Reads properties and tags of an audio file:
# title: ‘The Ship Was Sailing’, # artist: ‘Vito Ricci’, # album: ‘Music From Memory’, # year: ‘1985’, # track: 7 # genre: ‘Ambient’, # comment: ‘This Music was originally composed for “The Memory Theatre of Gulio Camillo” by Matthew Maguire. A Creation production premiered at La Mama Spring 1985 thanks to Bonnie for not laughing to Justin for laughing to Jon Gordron for electronic bondage produced by Jonathan Mann for Pangea Productions recorded 8/85 at Chiens Interdits Studio in a big cover production by Ann Rower cover design by Paul Leone * all compositions by Vito Ricci * play it loud’, # length: 345, # bitrate: 192, # channels: 2, # sample_rate: 44_100 # } ```
Sets the file’s meta information:
audio.tag(artist: 'Ariel Kalma', album: 'Le Temps Des Moissons', track: 'Bakafrika')
Permissible properties: * album * artist * comment * genre * tag * title * track * year
Sets the file’s album art:
Note that this only works for mp3 files.
- Fork it ( https://github.com/tomasc/dragonfly_audio/fork )
- Create your feature branch (
git checkout -b my-new-feature)
- Commit your changes (
git commit -am 'Add some feature')
- Push to the branch (
git push origin my-new-feature)
- Create a new Pull Request