Skip to content

Commit

Permalink
Merge pull request #75 from stemrollerapp/dev
Browse files Browse the repository at this point in the history
Release 2.1.0
  • Loading branch information
iffyloop authored Aug 4, 2024
2 parents 83ca945 + 64549c2 commit e06757f
Show file tree
Hide file tree
Showing 9 changed files with 863 additions and 156 deletions.
19 changes: 17 additions & 2 deletions download-third-party-apps.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import process from 'process'
import util from 'util'
import fs from 'fs'
import fsPromises from 'fs/promises'
import path from 'path'
Expand Down Expand Up @@ -98,6 +97,22 @@ async function main() {
'https://raw.githubusercontent.com/facebookresearch/demucs/main/demucs/remote/htdemucs_ft.yaml',
path.join('anyos-extra-files', 'Models', 'htdemucs_ft.yaml'),
],
[
'https://dl.fbaipublicfiles.com/demucs/hybrid_transformer/955717e8-8726e21a.th',
path.join('anyos-extra-files', 'Models', '955717e8-8726e21a.th'),
],
[
'https://raw.githubusercontent.com/facebookresearch/demucs/main/demucs/remote/htdemucs.yaml',
path.join('anyos-extra-files', 'Models', 'htdemucs.yaml'),
],
[
'https://dl.fbaipublicfiles.com/demucs/hybrid_transformer/5c90dfd2-34c22ccb.th',
path.join('anyos-extra-files', 'Models', '5c90dfd2-34c22ccb.th'),
],
[
'https://raw.githubusercontent.com/facebookresearch/demucs/main/demucs/remote/htdemucs_6s.yaml',
path.join('anyos-extra-files', 'Models', 'htdemucs_6s.yaml'),
],
[
`https://github.com/stemrollerapp/demucs-cxfreeze/releases/download/release-26a2baeb0058444b3cf87028d9df721d37c78dfb/demucs-cxfreeze-${winOrMac}${cudaSuffix}.${demucsZipOr7z}`,
path.join(
Expand Down Expand Up @@ -176,7 +191,7 @@ async function main() {
`${winOrMac}-extra-files`,
'ThirdPartyApps',
'ffmpeg',
'ffmpeg-7.0.1-essentials_build'
'ffmpeg-7.0.2-essentials_build'
)
)
} else if (process.platform === 'darwin') {
Expand Down
30 changes: 30 additions & 0 deletions main-src/main.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,22 @@ async function handleGetOutputPath() {
return processQueue.getOutputPath()
}

async function handleGetModelName() {
return processQueue.getModelName()
}

async function handleGetLocalFileOutputToContainingDir() {
return processQueue.getLocalFileOutputToContainingDir()
}

async function handleGetPrefixStemFilenameWithSongName() {
return processQueue.getPrefixStemFilenameWithSongName()
}

async function handleGetPreserveOriginalAudio() {
return processQueue.getPreserveOriginalAudio()
}

async function handleBrowseOutputPath() {
const response = await dialog.showOpenDialog(mainWindow, {
title: 'Select folder to store output stems',
Expand All @@ -144,10 +156,22 @@ async function handleBrowseOutputPath() {
return null
}

async function handleSetModelName(event, name) {
return processQueue.setModelName(name)
}

async function handleSetLocalFileOutputToContainingDir(event, value) {
return processQueue.setLocalFileOutputToContainingDir(value)
}

async function handleSetPrefixStemFilenameWithSongName(event, value) {
return processQueue.setPrefixStemFilenameWithSongName(value)
}

async function handleSetPreserveOriginalAudio(event, value) {
return processQueue.setPreserveOriginalAudio(value)
}

async function handleGetOutputFormat() {
return processQueue.getOutputFormat()
}
Expand Down Expand Up @@ -284,9 +308,15 @@ function main() {
ipcMain.handle('openChat', handleOpenChat)
ipcMain.handle('disableDonatePopup', handleDisableDonatePopup)
ipcMain.handle('getOutputPath', handleGetOutputPath)
ipcMain.handle('getModelName', handleGetModelName)
ipcMain.handle('getLocalFileOutputToContainingDir', handleGetLocalFileOutputToContainingDir)
ipcMain.handle('getPrefixStemFilenameWithSongName', handleGetPrefixStemFilenameWithSongName)
ipcMain.handle('getPreserveOriginalAudio', handleGetPreserveOriginalAudio)
ipcMain.handle('browseOutputPath', handleBrowseOutputPath)
ipcMain.handle('setModelName', handleSetModelName)
ipcMain.handle('setLocalFileOutputToContainingDir', handleSetLocalFileOutputToContainingDir)
ipcMain.handle('setPrefixStemFilenameWithSongName', handleSetPrefixStemFilenameWithSongName)
ipcMain.handle('setPreserveOriginalAudio', handleSetPreserveOriginalAudio)
ipcMain.handle('getOutputFormat', handleGetOutputFormat)
ipcMain.handle('setOutputFormat', handleSetOutputFormat)
ipcMain.handle('getPyTorchBackend', handleGetPyTorchBackend)
Expand Down
16 changes: 16 additions & 0 deletions main-src/preload.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,29 @@ contextBridge.exposeInMainWorld('disableDonatePopup', () =>
ipcRenderer.invoke('disableDonatePopup')
)
contextBridge.exposeInMainWorld('getOutputPath', () => ipcRenderer.invoke('getOutputPath'))
contextBridge.exposeInMainWorld('getModelName', () => ipcRenderer.invoke('getModelName'))
contextBridge.exposeInMainWorld('getLocalFileOutputToContainingDir', () =>
ipcRenderer.invoke('getLocalFileOutputToContainingDir')
)
contextBridge.exposeInMainWorld('getPrefixStemFilenameWithSongName', () =>
ipcRenderer.invoke('getPrefixStemFilenameWithSongName')
)
contextBridge.exposeInMainWorld('getPreserveOriginalAudio', () =>
ipcRenderer.invoke('getPreserveOriginalAudio')
)
contextBridge.exposeInMainWorld('browseOutputPath', () => ipcRenderer.invoke('browseOutputPath'))
contextBridge.exposeInMainWorld('setModelName', (value) =>
ipcRenderer.invoke('setModelName', value)
)
contextBridge.exposeInMainWorld('setLocalFileOutputToContainingDir', (value) =>
ipcRenderer.invoke('setLocalFileOutputToContainingDir', value)
)
contextBridge.exposeInMainWorld('setPrefixStemFilenameWithSongName', (value) =>
ipcRenderer.invoke('setPrefixStemFilenameWithSongName', value)
)
contextBridge.exposeInMainWorld('setPreserveOriginalAudio', (value) =>
ipcRenderer.invoke('setPreserveOriginalAudio', value)
)
contextBridge.exposeInMainWorld('getOutputFormat', () => ipcRenderer.invoke('getOutputFormat'))
contextBridge.exposeInMainWorld('setOutputFormat', (outputFormat) =>
ipcRenderer.invoke('setOutputFormat', outputFormat)
Expand Down
Loading

0 comments on commit e06757f

Please sign in to comment.