Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
wiki:scripts_and_tools [2012/04/09 01:36] – conversion example flac to ogg with libsndfile emrumwiki:scripts_and_tools [2012/04/30 18:07] – sfz to hydrogen emrum
Line 22: Line 22:
  
   * [[/wiki/script_midi2hydrogen| convert drums of a midi file to hydrogen format ]]   * [[/wiki/script_midi2hydrogen| convert drums of a midi file to hydrogen format ]]
 +
 +\\
 +
 +
 +
 +==== SFZ (sound-bank-definition) to Hydrogen (drumkit xml-file) ====
 +
 +
 +  * [[/wiki/user/emrum/sfz_to_h2| sfz to hydrogen script ]]
 +
  
 \\ \\
Line 147: Line 157:
  
 === convert all FLAC files in a directory to OGA format (vorbis-encoded stream in ogg-container) === === convert all FLAC files in a directory to OGA format (vorbis-encoded stream in ogg-container) ===
 +\\ 
 +** Note: ** There is a simple and excellent GUI tool available for audio conversion: [[http://soundconverter.org/| SoundConverter ]] \\ 
 +It is included in the ubuntu repository. 
 +\\ 
 +\\ 
 +\\
 <code bash> <code bash>
 #!/bin/bash #!/bin/bash
 +
 +## UPDATE: sndfile-convert -vorbis  normalizes the sound to 0 DB !
 +## there are no options to control that, or compression rate.
 +## so rather use "oggenc" instead !
 +## there is also a py-script called "dir2ogg" in ubuntu
  
 # initial code by Emanuel Rumpf 2012-04 # initial code by Emanuel Rumpf 2012-04
 # any re-use and modification permitted # any re-use and modification permitted
  
-# convert all FLAC files in a directory to OGA format (vorbis-encoded stream in ogg-container)+# convert all FLAC files in a directory to OGA format  
 +(compressed, vorbis-encoded stream in ogg-container)
 # #
 # USAGE: # USAGE:
Line 162: Line 183:
 # copy this script to the files directory, make it executable # copy this script to the files directory, make it executable
 # edit config options below if necessary, run it # edit config options below if necessary, run it
 +
 +# TODO: allow file-names with spaces
  
  
Line 201: Line 224:
  
 </code> </code>
 +\\
 +\\
 +<code>
 +# There is a possilbe alternative, with "find" and -exec statement
 +#
 +# warning: this is not verbose  and  can take some time !
  
 +
 +# for all files in current directory (.)  execute libsndfile-convert
 +#
 +find . -name "*.flac" -exec sndfile-convert -vorbis '{}' '{}'.oga \;
 +
 +</code>
  
 . .
wiki/scripts_and_tools.txt · Last modified: 2017/12/03 12:22 by nilsge