no way to compare when less than two revisions

Differences

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


Previous revision
Next revision
wiki:scripts_and_tools [2011/06/30 19:06] emrum
Line 1: Line 1:
 +
 +===== Assorted Linux Scripts, Tools, Tips and Utilities =====
 +
 +.
 +
 +.
 +
 +==== wav file to specimen bank (sampler format) script ====
 +
 +  * see here: [[/wiki/scripts_wav2specimen| wav2specimen ]]
 +
 +\\
 +
 +
 +==== lscp2rgd - linuxsampler to rosegarden instrument ====
 +
 +  * see: [[/wiki/script_lscp2rgd]]
 +
 +\\
 +
 +==== lscp2rgd - linuxsampler to rosegarden instrument ====
 +
 +  * [[/wiki/script_midi2hydrogen| convert drums of a midi file to hydrogen format ]]
 +
 +\\
 +
 +
 +==== aj-snapshot - Store ALSA and JACK connections state ====
 +
 +[[http://aj-snapshot.sourceforge.net/]]
 +
 +.
 +
 +==== Download songs of an *.m3u File (mp3 collection) ====
 +
 +Make a directory and then do this:
 +
 +<code>
 +wget -O - http://djcj.org/audio/lam/lam-tracks-2010/lam10.m3u | while read i; do wget -c "$i"; done
 +</code>
 +
 +(by Ken Restivo - 16. Mai 2011 22:06 - @lau-ml)
 +
 +.
 +
 +==== make a *.wav swing (?) ====
 +
 +[[http://all-day-breakfast.com/m/swing.sh]]
 +
 +[[http://musicmachinery.com/2010/05/21/the-swinger/| Comparable (?) examples]]
 +
 +(by Chris Cannam - 2. Juni 2010 16:41  - @lau-ml )
 +
 +.
 +
 +==== jackctl - jack control python script ====
 +
 +[[http://www.akjmusic.com/software/]]
 +
 +[[http://www.akjmusic.com/software/jackctl20110317.py]]
 +
 +(by Aaron Krister Johnson,  28. Mai 2010 18:16  - @lau-ml)
 +
 +.
 +
 +==== a python script for making seamless loops in samples by cross fading ====
 +
 +It uses sox and ecasound for processing and should work with wav, aiff and flac (maybe more).
 +
 +planned (?): libsndfile support.
 +
 +[[http://atte.dk/files/xfade_loop]]
 +
 +(by Atte André Jensen, 11. Juni 2010 11:02 - @ lau-ml )
 +
 +.
 +
 +
 +==== convert a Hydrogen drumkit into a SF2 soundfont ====
 +
 +[[http://code.google.com/p/hydro2sf2/]]
 +
 +.
 +
 +
 +==== conversion examples with mplayer / mencoder ====
 +
 +=== wav to mp3 ===
 +
 +<code>
 +for F in *.aac; do
 +  mplayer -ao pcm:file=$F.wav $F
 +  lame -h $F.wav $F.mp3;
 +done
 +</code>
 +
 +(by Julien Claassen , 25. Dezember 2010 02:37 - @ lau-ml )
 +
 +.
 +
 +<code>
 +
 +  #!/bin/bash
 +  # flac_to_mp3
 +  for f in *.mp3; do lame -v "$f"; done
 +</code>
 +
 +(James Morris,22. September 2010 11:20)
 +
 +
 +<code>
 +$ find . -name "*flac" -exec lame -V0 {} \;
 +</code>
 +
 +(Roger, 22. September 2010 12:52)
 +
 +=== Using MEncoder to create DVD-compliant files ===
 +
 +[[http://www.mplayerhq.hu/DOCS/HTML/en/menc-feat-vcd-dvd.html]]
 +
 +.
 +
 +=== convert DV files to DVD compliant ===
 +
 +[[http://florin.myip.org/soft/conv-dvd/]]
 +
 +.
 +
 +=== convert sound files with libsndfile ===
 +
 +sndfile-convert
 +
 +.
 +
 +==== conversion examples with sox ====
 +
 +convert a .wav file to raw PCM - here 8bit (''-b 8'') signed integer (''-e signed''), stereo (''-c 2''):
 +  sox INFILE.wav -t raw -r 48k -e signed -b  8 -c 2 OUTFILE.raw
 +
 +convert raw CD digital audio (16-bit, signed-integer) to floating point wav:
 +  sox input.cdda -e float output1.wav
 +
 +generate (''-n'' = NULL input) a .wav file with a 3 second sine-sweep:
 +  sox -n OUTFILE.wav synth 3 sine 300-3300 gain -5
 +
 +The format-options must be given before the filename for which they're intended. If unspecified they are read from the file header (if possible):
 +
 +Synopsis:
 +  sox [global-options] [format-options] infile1 \ 
 +      [[format-options] infile2] ... \
 +      [format-options] outfile \
 +      [effect [effect-options]] ...
 +      
 +Common encoding-types for ''-e'': signed, unsigned, float. see ''man sox'' for a complete reference.
 +
 +==== conversion examples with ecasound ====
 +
 +FIXME
 +
 +.
 +
 +
 +
 +==== move regions, markers, temi in an Ardour session ====
 +
 +A script to slide every regions, markers, tempi, meters, automations, and so on in an Ardour session.
 +
 +"Actually, it's not really a solution, as one can move only ALL REGIONS,..."
 +
 +by Aurélien
 +
 +[[http://lists.linuxaudio.org/pipermail/linux-audio-user/2011-June/079213.html| announce mail]]
 +
 +[[http://lists.linuxaudio.org/pipermail/linux-audio-user/attachments/20110617/50c10587/attachment.obj| Download (tar.gz ?)]]
 +
 +.
 +
 +
 +
 +==== spaces to underscores ====
 +
 +<code bash>
 +#! /bin/bash
 +#
 +# spaces2underscores.sh
 +
 +echo
 +echo "This command changes all spaces in file names into underscores"
 +echo "  for ALL FILES IN THIS DIRECTORY !"
 +echo "  Type ENTER to continue or ^C to quit"
 +
 +read dummy
 +
 +for f in *; do
 + oldname=`echo $f |sed 's/ /~/g'`
 + newname=`echo $f |sed 's/ /_/g'`
 + if [ $oldname != $newname ]
 + then
 +   echo mv $f $newname
 +   mv "$f" $newname
 + fi
 +done
 +</code>
 +
 +(Marc Groenewegen, 25. September 2010 08:49 )
 +
 +.
 +
 +.
 +
 +==== Tips ====
 +
 +
 +=== use a proper python shell ===
 +
 +(by Torben Hohn, 28. September 2010 01:16 )
 +
 +ipython is there for quite some time.
 +
 +and i recently discovered bpython
 +
 +[[http://ipython.scipy.org/moin/]]
 +
 +[[http://bpython-interpreter.org/]]
 +
 +this is where the fun starts
 +
 +also help() works nicely on instances.
 +
 +doctests also pretty much kick ass.
 +
 +[[http://docs.python.org/library/doctest.html]]
 +
 +
 +
 +
  
wiki/scripts_and_tools.txt · Last modified: 2017/12/03 12:22 by nilsge