File: create-testfile.kwave

package info (click to toggle)
kwave 25.04.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 23,272 kB
  • sloc: cpp: 56,173; xml: 817; perl: 688; sh: 57; makefile: 11
file content (111 lines) | stat: -rw-r--r-- 3,207 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
#############################################################################
##    create-testfile.kwave - create example.wav from sample.ogg (for demo)
##                           -------------------
##    begin                : Tue Mar 03 2015
##    copyright            : (C) 2015 by Thomas Eschenbacher
##    email                : Thomas.Eschenbacher@gmx.de
#############################################################################
#
#############################################################################
##                                                                          #
##    This program is free software; you can redistribute it and/or modify  #
##    it under the terms of the GNU General Public License as published by  #
##    the Free Software Foundation; either version 2 of the License, or     #
##    (at your option) any later version.                                   #
##                                                                          #
#############################################################################

# steps for reproducing:
# 1) open(sample.opus)
# 2) run this script

view:zoom_all()
selectall()
plugin:execute(normalize)
add_track()
label:add(10478, Beethoven - Symphony No. 5)
label:add(151500, right)
label:add(80000, middle)
select_track:off(1)
copy()
select_track:invert()
paste()
select_track:on(0)

plugin:execute(selectrange,2,1,0,10000)
copy()
plugin:execute(selectrange,2,1,0,1)
paste()
plugin:execute(selectrange,2,1,0,1)
paste()
expandtolabel()

select_track:off(1)
plugin:execute(noise, 0.20, 0)
plugin:execute(amplifyfree, fade in, linear, 0.0, 0.0, 1.0, 1.0)
plugin:execute(amplifyfree, fade in, linear, 0.0, 0.0, 1.0, 1.0)

select_track:invert()
plugin:execute(noise, 0.80, 0)
plugin:execute(amplifyfree, amplify free, spline, 0, 0, 0.16, 0.49, 0.68, 0.48, 1, 1)

select_track:on(0)
selectnextlabels()
selectnextlabels()
copy()
selectnextlabels()
paste()
view:zoom_all()
plugin:execute(zero)

plugin:execute(selectrange,2,2,80,10)
select_track:invert()
select_track:on(0)
plugin:execute(noise, 1, 0)
plugin:execute(amplifyfree, fade in, linear, 0.0, 0.0, 1.0, 1.0)
plugin:execute(amplifyfree, fade out, linear, 0.0, 1.0, 1.0, 0.0)

select_track:invert()
selectprevlabels()
selectprevlabels()
copy()
selectnextlabels()
selectnextlabels()
paste()

selectprevlabels()
plugin:execute(noise, 0.68, 1)
plugin:execute(amplifyfree, amplify free, spline, 0, 0.16, 0.44, 0.53, 0.65, 0.70, 0.80, 0.31, 1, 0.19)

add_track()
select_track:none()
select_track:on(2)
plugin:execute(selectrange,2,2,10,10)
expandtolabel()
plugin:execute(noise, 1, 1)
plugin:execute(amplifyfree, amplify free, sample_hold, 0, 0, 0.25, 0.33, 0.54, 0.69, 0.85, 0.12, 1, 0)

select_track:off(2)
select_track:on(0)
selectnextlabels()
selectprevlabels()
copy()
select_track:off(0)
select_track:on(2)
selectnextlabels()
paste()
plugin:execute(amplifyfree, fade in, linear, 0.0, 0.0, 1.0, 1.0)

selectnextlabels()
paste()
plugin:execute(amplifyfree, fade out, linear, 0.0, 1.0, 1.0, 0.0)

select_track:all()
selectnone()

# export the result as plain wav file
fileinfo(Compression, 0)
fileinfo(Mime Type, audio/x-wav)
saveas(/var/tmp/example.wav)

### EOF ###