Skip to content

Convert an audio file to an ascii file read by Natron/Nuke (based on sox)

License

Notifications You must be signed in to change notification settings

rcspam/audio2ascii

Repository files navigation

#ATTENTION: Does'nt work anymore since Natron 2.0. I have no time to see what is wrong, apparently just some changes in the natron pyplug API. It could be easy enough to make it work again. So fork it.

rcspam

audio2ascii

frame

screenshot-2

Natron2.0 python plugin to animate you parameters with waveform from an audio file(mp3, wav,aiff,...). It can do a basic preview audio while viewer playing (only OSX and Linux for now), this can be usefull until a sound support in future Natron versions (>2.0).

An external app can be set and launch directly from the plugin to edit audio files (e.g. audacity..)

The plugin use AudioCurve written by @olear on Linux and Windows, and a bash script(audio2ascii.sh) on MacOSX.

sox is use to convert audio.

ffplay(from ffmpeg) to play the preview.

Here is a Demo/tuto.

Other videos in the examples section below.

#Installation

  • Linux
$ wget https://github.com/rcspam/audio2ascii/releases/download/v2.0.2/Audio2ascii-2.0.2-Linux64.tar.gz
$ tar xvzf Audio2ascii-2.0.2-Linux64.tar.gz
$ cd Audio2ascii-2.0.2-Linux64
$ ./install_Unix.sh
  • MacOSX

    Download last version. Decompress it where you want and launch 'install_Unix.sh' from the decompress directory in a terminal, or open archive and copy all files in '/Users/<username>/Library/Application Support/INRIA/Natron/Plugins'.

  • Windows

    Download last version.

Install some extras (Optional)

  • If you want add a standalone audio2ascii.sh in a Ext-Tools menu to the Natron menu-bar, add the following lines in the init.py of your home Natron plugin directory (create it if doesn't exist): selection_002
# Linux
import os
def audioToAscii():
    os.system("$HOME/.local/share/INRIA/Natron/Plugins/audio2ascii/audio2ascii.sh -g &")
NatronGui.natron.addMenuCommand("Ext-Tools/AudioToAscii","audioToAscii",QtCore.Qt.Key.Key_L,QtCore.Qt.KeyboardModifier.ShiftModifier)
  • Linux users can run audio2ascii.sh as standalone to create ascii curves (yad must be installed)
$ your/path/to/audio2ascii.sh -g

#Examples

Some short videos released with the Natron 2 Snapshot Transform Node:

  • Test1.mp4 ( x curve on scale)
  • Test2.mp4 ( xy curves (stereo) with x translate on left channel, y translate on right channel )
  • Test3.mp4 (y curve on y translate)
  • Tuto/Demo (animate a rotopaint point on music)

#Requirements

  • sox:

    • Debian/Ubuntu: sudo apt-get install sox or sudo yum install sox. For support more audio formats than 'wav': sudo apt-get install libsox-fmt-all (debian).

    • Fedora: for mp3 support for sox you can read this

    • Mac OSX: sudo port install lame(mp3 support) and sudo port install sox (After have installed Xcode and Command Line Tools)

    • Windows: Sox is include, so no need to install it but the official SoX Windows binaries can't play 'mp3' due to license restrictions.

  • ffmpeg:

    • Debian/Ubuntu: sudo apt-get install ffmpeg or sudo yum install ffmpeg

    • Mac OSX: sudo port install ffmpeg

  • gawk (Mac OSX users only, awk doesn't support floats):

    • sudo port install gawk
  • yad (optional, stand alone GUI on Linux):

    • Debian/Ubuntu: sudo apt-get install yad

    • Fedora:sudo yum install yad

About

Convert an audio file to an ascii file read by Natron/Nuke (based on sox)

Resources

License

Stars

Watchers

Forks

Packages

No packages published