[-]
[+]
|
Changed |
_service:tar_git:harbour-audiocut.changes
|
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-audiocut.spec
^
|
|
[-]
[+]
|
Changed |
_service
^
|
@@ -2,7 +2,7 @@
<service name="tar_git">
<param name="url">https://github.com/poetaster/harbour-audiocut.git</param>
<param name="branch">main</param>
- <param name="revision">1.4.3</param>
+ <param name="revision">v1.5.0</param>
<param name="token"/>
<param name="debian">N</param>
<param name="dumb">N</param>
|
[-]
[+]
|
Added |
_service:tar_git:harbour-audiocut-1.5.0.tar.bz2/.github/FUNDING.yml
^
|
@@ -0,0 +1,2 @@
+
+liberapay: poetaster
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-audiocut-1.5.0.tar.bz2/.github/workflows/main.yml
^
|
@@ -2,10 +2,8 @@
on:
push:
- branches:
- - main
tags:
- - "1.*"
+ - "v*"
env:
OS_VERSION: 4.4.0.68
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-audiocut-1.5.0.tar.bz2/harbour-audiocut.desktop
^
|
@@ -12,6 +12,7 @@
# Name[de]=Audiocut
[X-Sailjail]
+#Sandboxing=disabled
OrganizationName=de.poetaster
ApplicationName=harbour-audiocut
-Permissions=Camera;Audio;Microphone;MediaIndexing;RemovableMedia;UserDirs;Compatibility
+Permissions=Compatibility;Camera;Audio;Microphone;MediaIndexing;Music;RemovableMedia;UserDirs
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-audiocut-1.5.0.tar.bz2/harbour-audiocut.pro
^
|
@@ -17,6 +17,7 @@
DISTFILES += qml/harbour-audiocut.qml \
qml/cover/CoverPage.qml \
qml/pages/About.qml \
+ qml/pages/Chorus.qml \
qml/pages/FirstPage.qml \
qml/pages/Flanger.qml \
qml/pages/Phaser.qml \
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-audiocut-1.5.0.tar.bz2/qml/pages/FirstPage.qml
^
|
@@ -408,6 +408,19 @@
// width // 0-100 71 default
call("audiox.phaserEffect", [ inputPathPy, outputPathPy, tempAudioType, in_gain, out_gain, delay, decay, speed ])
}
+ // https://ffmpeg.org/ffmpeg-filters.html#achorus
+ function chorusEffect() {
+ preparePathAndUndo()
+ var in_gain = 0.5
+ var out_gain = 0.90
+ var speed = chorus.speed // 0.1 - 10 Hz
+ var delay = chorus.delay // 0-30
+ var decay = chorus.decay // 0 - 10
+ var depth = chorus.depth // 0 - 10
+ //shape // sinusoidal / triangular
+ // width // 0-100 71 default
+ call("audiox.chorusEffect", [ inputPathPy, outputPathPy, tempAudioType, delay, decay, speed, depth ])
+ }
onError: {
// when an exception is raised, this error handler will be called
@@ -1387,6 +1400,10 @@
text: qsTr("phaser")
font.pixelSize: Theme.fontSizeExtraSmall
}
+ MenuItem {
+ text: qsTr("chorus")
+ font.pixelSize: Theme.fontSizeExtraSmall
+ }
}
}
IconButton {
@@ -1417,6 +1434,9 @@
if (idComboBoxToolsEffects.currentIndex === 6) {
py.phaserEffect()
}
+ if (idComboBoxToolsEffects.currentIndex === 7) {
+ py.chorusEffect()
+ }
}
}
}
@@ -1521,7 +1541,7 @@
top: 20000
}
}
- Flanger {
+ Flanger{
id: flanger
enabled: ( finishedLoading === true && showTools === true )
visible: ( buttonEffects.down && idComboBoxToolsEffects.currentIndex === 5 )
@@ -1531,13 +1551,23 @@
anchors.leftMargin: Theme.paddingLarge
anchors.rightMargin: Theme.paddingLarge
}
- Phaser {
+ Phaser{
id: phaser
enabled: ( finishedLoading === true && showTools === true )
visible: ( buttonEffects.down && idComboBoxToolsEffects.currentIndex === 6 )
anchors.top: idSubmenuEffects.bottom
anchors.left: parent.left
anchors.right: parent.right
+ anchors.leftMargin: Theme.paddingLarge
+ anchors.rightMargin: Theme.paddingLarge
+ }
+ Chorus{
+ id: chorus
+ enabled: ( finishedLoading === true && showTools === true )
+ visible: ( buttonEffects.down && idComboBoxToolsEffects.currentIndex === 7 )
+ anchors.top: idSubmenuEffects.bottom
+ anchors.left: parent.left
+ anchors.right: parent.right
anchors.leftMargin: Theme.paddingLarge
anchors.rightMargin: Theme.paddingLarge
}
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-audiocut-1.5.0.tar.bz2/qml/pages/SavePage.qml
^
|
@@ -141,7 +141,7 @@
onError: {
// when an exception is raised, this error handler will be called
- //console.log('python error: ' + traceback);
+ console.log('python error: ' + traceback);
}
onReceived: {
// asychronous messages from Python arrive here; done there via pyotherside.send()
@@ -287,6 +287,14 @@
color: Theme.errorColor
text: qsTr("LAME encoder for mp3 is not yet installed.")
}
+ Label {
+ x: Theme.paddingLarge * 1.2
+ visible: warningNoLAME === false
+ width: parent.width - 2*Theme.paddingLarge
+ font.pixelSize: Theme.fontSizeExtraSmall
+ color: Theme.errorColor
+ text: qsTr("LAME only works when started from terminal.")
+ }
Item {
width: parent.width
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-audiocut-1.5.0.tar.bz2/qml/py/audiox.py
^
|
@@ -98,17 +98,39 @@
def saveFile ( inputPathPy, savePath, tempAudioFolderPath, tempAudioType, newFileName, newFileType, mp3Bitrate, mp3CompressBitrateType, tagTitle, tagArtist, tagAlbum, tagDate, tagTrack ):
+ # mp3 only from cli
+ # these methods are from pydub since they don't run as is
+ conversion_command = ['ffmpeg' , "-vn"] # drop video
+ conversion_command.extend ([ "-i", inputPathPy ])
+ conversion_command.extend([ "-f", newFileType ])
+ conversion_command.extend( ['-metadata', "title="+str(tagTitle) ])
+ conversion_command.extend( ['-metadata', "artist="+str(tagArtist) ])
+ conversion_command.extend( ['-metadata', "album="+str(tagAlbum) ])
+ conversion_command.extend( ['-metadata', "year="+str(tagDate) ])
+ conversion_command.extend( ['-metadata', "track="+str(tagTrack) ])
+
if "mp3" in newFileType :
+ # mp3 ffmpeg -i input.wav -codec:a libmp3lame -qscale:a 2 output.mp3
sound = AudioSegment.from_file( inputPathPy )
outputPathTmp = tempAudioFolderPath + "audioWAV" + ".tmp" + "." + tempAudioType
sound.export( outputPathTmp, format = tempAudioType )
subprocess.run([ "lame", mp3CompressBitrateType, "--tt", str(tagTitle), "--ta", str(tagArtist), "--tl", str(tagAlbum), "--ty", str(tagDate), "--tn", str(tagTrack), "/"+outputPathTmp, "/"+savePath ])
+
elif "ogg" in newFileType :
- sound = AudioSegment.from_file( inputPathPy )
- sound.export( "/" + savePath, format = newFileType, tags={'title':str(tagTitle), 'artist':str(tagArtist), 'album':str(tagAlbum), 'date':str(tagDate), 'track':str(tagTrack) } )
+ #sound = AudioSegment.from_file( inputPathPy )
+ conversion_command.extend(["-acodec", "libvorbis"])
+ conversion_command.extend([ savePath ])
+ subprocess.run(conversion_command)
+
+ #sound.export( "/" + savePath, format = newFileType, tags={'title':str(tagTitle), 'artist':str(tagArtist), 'album':str(tagAlbum), 'date':str(tagDate), 'track':str(tagTrack) } )
elif "flac" in newFileType :
- sound = AudioSegment.from_file( inputPathPy )
- sound.export( "/" + savePath, format = newFileType, tags={'title':str(tagTitle), 'artist':str(tagArtist), 'album':str(tagAlbum), 'date':str(tagDate), 'track':str(tagTrack) } )
+ #sound = AudioSegment.from_file( inputPathPy )
+ conversion_command.extend( ["-acodec", "flac"])
+ conversion_command.extend([ savePath ])
+ subprocess.run(conversion_command)
+
+ #subprocess.run([ "ffmpeg", '-i', inputPathPy, '-codec:a', 'flac', '/'+savePath ])
+ #sound.export( "/" + savePath, format = newFileType, tags={'title':str(tagTitle), 'artist':str(tagArtist), 'album':str(tagAlbum), 'date':str(tagDate), 'track':str(tagTrack) } )
else:
sound = AudioSegment.from_file( inputPathPy )
sound.export( "/" + savePath, format = newFileType )
@@ -120,7 +142,24 @@
pyotherside.send('fileIsSaved', )
pyotherside.send('finishedSavingRenaming', savePath, newFileName, newFileType)
+# an example using pyav
+def to_wav(in_path: str, out_path: str = None, sample_rate: int = 16000) -> str:
+ """Arbitrary media files to wav"""
+ if out_path is None:
+ out_path = os.path.splitext(in_path)[0] + '.wav'
+ with av.open(in_path) as in_container:
+ in_stream = in_container.streams.audio[0]
+ with av.open(out_path, 'w', 'wav') as out_container:
+ out_stream = out_container.add_stream(
+ 'pcm_s16le',
+ rate=sample_rate,
+ layout='mono'
+ )
+ for frame in in_container.decode(in_stream):
+ for packet in out_stream.encode(frame):
+ out_container.mux(packet)
+ return out_path
@@ -145,7 +184,6 @@
-
# Functions for audio manipulation, depending on markers
# #######################################################################################
@@ -315,6 +353,14 @@
subprocess.run([ "/usr/bin/ffmpeg", "-y", "-i", "/"+inputPathPy, "-af", "aphaser=speed=" + str(speed) + ":delay=" + str(delay) + ":decay=" + str(decay) + ":in_gain=" + str(in_gain) + ":out_gain=" + str(out_gain), "/"+outputPathPy, "-hide_banner" ])
pyotherside.send('loadTempAudio', outputPathPy )
+def chorusEffect ( inputPathPy, outputPathPy, tempAudioType, delay, decay, speed, depth ):
+ delays = str(format(delay,'.0f')) + "|" + str(format(delay + 10,'.0f'))
+ decays = str(format(decay,'.2f')) + "|" + str(format(decay +.2,'.2f'))
+ speeds = str(format(speed,'.2f')) + "|" + str(format(speed +.2,'.2f'))
+ depths = str(format(depth,'.2f')) + "|" + str(format(depth +.2,'.2f'))
+ subprocess.run([ "/usr/bin/ffmpeg", "-y", "-i", "/"+inputPathPy, "-af", "chorus=0.5:0.8:" + str(delays) + ":" + str(decays) + ":" + str(speeds) + ":" + str(depths), "/"+outputPathPy, "-hide_banner" ])
+ pyotherside.send('loadTempAudio', outputPathPy )
+
# Replace the pydub version which is flake
def slowDown ( inputPathPy, outputPathPy, tempAudioType, tempo ):
subprocess.run([ "/usr/bin/ffmpeg", "-y", "-i", "/"+inputPathPy, "-af", "atempo=" + str(tempo), "/"+outputPathPy, "-hide_banner" ])
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-audiocut-1.5.0.tar.bz2/translations/harbour-audiocut-de.ts
^
|
@@ -29,6 +29,25 @@
</message>
</context>
<context>
+ <name>Chorus</name>
+ <message>
+ <source>chorus speed</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source> chorus delay</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source> chorus decay</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source> chorus depth</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
<name>FirstPage</name>
<message>
<source>Select audio file</source>
@@ -202,6 +221,10 @@
<source>phaser</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>chorus</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>Flanger</name>
@@ -291,5 +314,9 @@
<source>LAME encoder for mp3 is not yet installed.</source>
<translation type="unfinished">LAME Enkodierer, mp3, nicht installiert.</translation>
</message>
+ <message>
+ <source>LAME only works when started from terminal.</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
</TS>
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-audiocut-1.5.0.tar.bz2/translations/harbour-audiocut-sv.ts
^
|
@@ -29,6 +29,25 @@
</message>
</context>
<context>
+ <name>Chorus</name>
+ <message>
+ <source>chorus speed</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source> chorus delay</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source> chorus decay</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source> chorus depth</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
<name>FirstPage</name>
<message>
<source>Select audio file</source>
@@ -202,6 +221,10 @@
<source>phaser</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>chorus</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>Flanger</name>
@@ -291,5 +314,9 @@
<source>LAME encoder for mp3 is not yet installed.</source>
<translation>LAME kodare för mp3 är ännu inte installerad.</translation>
</message>
+ <message>
+ <source>LAME only works when started from terminal.</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
</TS>
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-audiocut-1.5.0.tar.bz2/translations/harbour-audiocut-zh_CN.ts
^
|
@@ -29,6 +29,25 @@
</message>
</context>
<context>
+ <name>Chorus</name>
+ <message>
+ <source>chorus speed</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source> chorus delay</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source> chorus decay</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source> chorus depth</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
<name>FirstPage</name>
<message>
<source>Select audio file</source>
@@ -202,6 +221,10 @@
<source>phaser</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>chorus</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>Flanger</name>
@@ -291,5 +314,9 @@
<source>LAME encoder for mp3 is not yet installed.</source>
<translation>未安装适用于mp3的 LAME 编码器。</translation>
</message>
+ <message>
+ <source>LAME only works when started from terminal.</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
</TS>
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-audiocut-1.5.0.tar.bz2/translations/harbour-audiocut.ts
^
|
@@ -29,6 +29,25 @@
</message>
</context>
<context>
+ <name>Chorus</name>
+ <message>
+ <source>chorus speed</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source> chorus delay</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source> chorus decay</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source> chorus depth</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
<name>FirstPage</name>
<message>
<source>Select audio file</source>
@@ -202,6 +221,10 @@
<source>phaser</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>chorus</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>Flanger</name>
@@ -291,5 +314,9 @@
<source>LAME encoder for mp3 is not yet installed.</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>LAME only works when started from terminal.</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
</TS>
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-audiocut.changes.run
^
|
@@ -4,7 +4,7 @@
# generate changelog from well formatted Git commit messages and tag
# annotations.
-git-change-log
+#git-change-log
# Here are some basic examples how to change from the default behavior. Run
# git-change-log --help inside the Sailfish OS SDK chroot or build engine to
|