Warning, /multimedia/kwave/scripts/create-testfile.kwave is written in an unsupported language. File is not indexed.

0001 #############################################################################
0002 ##    create-testfile.kwave - create example.wav from sample.ogg (for demo)
0003 ##                           -------------------
0004 ##    begin                : Tue Mar 03 2015
0005 ##    copyright            : (C) 2015 by Thomas Eschenbacher
0006 ##    email                : Thomas.Eschenbacher@gmx.de
0007 #############################################################################
0008 #
0009 #############################################################################
0010 ##                                                                          #
0011 ##    This program is free software; you can redistribute it and/or modify  #
0012 ##    it under the terms of the GNU General Public License as published by  #
0013 ##    the Free Software Foundation; either version 2 of the License, or     #
0014 ##    (at your option) any later version.                                   #
0015 ##                                                                          #
0016 #############################################################################
0017 
0018 # steps for reproducing:
0019 # 1) open(sample.opus)
0020 # 2) run this script
0021 
0022 view:zoom_all()
0023 selectall()
0024 plugin:execute(normalize)
0025 add_track()
0026 label:add(10478, Beethoven - Symphony No. 5)
0027 label:add(151500, right)
0028 label:add(80000, middle)
0029 select_track:off(1)
0030 copy()
0031 select_track:invert()
0032 paste()
0033 select_track:on(0)
0034 
0035 plugin:execute(selectrange,2,1,0,10000)
0036 copy()
0037 plugin:execute(selectrange,2,1,0,1)
0038 paste()
0039 plugin:execute(selectrange,2,1,0,1)
0040 paste()
0041 expandtolabel()
0042 
0043 select_track:off(1)
0044 plugin:execute(noise, 0.20, 0)
0045 plugin:execute(amplifyfree, fade in, linear, 0.0, 0.0, 1.0, 1.0)
0046 plugin:execute(amplifyfree, fade in, linear, 0.0, 0.0, 1.0, 1.0)
0047 
0048 select_track:invert()
0049 plugin:execute(noise, 0.80, 0)
0050 plugin:execute(amplifyfree, amplify free, spline, 0, 0, 0.16, 0.49, 0.68, 0.48, 1, 1)
0051 
0052 select_track:on(0)
0053 selectnextlabels()
0054 selectnextlabels()
0055 copy()
0056 selectnextlabels()
0057 paste()
0058 view:zoom_all()
0059 plugin:execute(zero)
0060 
0061 plugin:execute(selectrange,2,2,80,10)
0062 select_track:invert()
0063 select_track:on(0)
0064 plugin:execute(noise, 1, 0)
0065 plugin:execute(amplifyfree, fade in, linear, 0.0, 0.0, 1.0, 1.0)
0066 plugin:execute(amplifyfree, fade out, linear, 0.0, 1.0, 1.0, 0.0)
0067 
0068 select_track:invert()
0069 selectprevlabels()
0070 selectprevlabels()
0071 copy()
0072 selectnextlabels()
0073 selectnextlabels()
0074 paste()
0075 
0076 selectprevlabels()
0077 plugin:execute(noise, 0.68, 1)
0078 plugin:execute(amplifyfree, amplify free, spline, 0, 0.16, 0.44, 0.53, 0.65, 0.70, 0.80, 0.31, 1, 0.19)
0079 
0080 add_track()
0081 select_track:none()
0082 select_track:on(2)
0083 plugin:execute(selectrange,2,2,10,10)
0084 expandtolabel()
0085 plugin:execute(noise, 1, 1)
0086 plugin:execute(amplifyfree, amplify free, sample_hold, 0, 0, 0.25, 0.33, 0.54, 0.69, 0.85, 0.12, 1, 0)
0087 
0088 select_track:off(2)
0089 select_track:on(0)
0090 selectnextlabels()
0091 selectprevlabels()
0092 copy()
0093 select_track:off(0)
0094 select_track:on(2)
0095 selectnextlabels()
0096 paste()
0097 plugin:execute(amplifyfree, fade in, linear, 0.0, 0.0, 1.0, 1.0)
0098 
0099 selectnextlabels()
0100 paste()
0101 plugin:execute(amplifyfree, fade out, linear, 0.0, 1.0, 1.0, 0.0)
0102 
0103 select_track:all()
0104 selectnone()
0105 
0106 # export the result as plain wav file
0107 fileinfo(Compression, 0)
0108 fileinfo(Mime Type, audio/x-wav)
0109 saveas(/var/tmp/example.wav)
0110 
0111 ### EOF ###