-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial commit: Cool AudioM application
- Loading branch information
Cool AudioM Developer
committed
Nov 21, 2024
0 parents
commit 98eefda
Showing
10 changed files
with
5,529 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
node_modules/ | ||
dist/ | ||
mastered/ | ||
.DS_Store | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Cool AudioM | ||
|
||
A desktop application for batch audio mastering using reference tracks. Built with Electron. | ||
|
||
## Features | ||
|
||
- Multiple audio file processing in one go | ||
- Reference track-based mastering | ||
- Easy-to-use interface | ||
- Supports WAV and MP3 formats | ||
- Results saved in high-quality WAV format | ||
|
||
## Requirements | ||
|
||
- Python with matchering package installed | ||
- Windows operating system | ||
|
||
## Installation | ||
|
||
Download the latest installer from the Releases section and run `Cool AudioM Setup.exe`. | ||
|
||
## Development Setup | ||
|
||
1. Clone the repository | ||
2. Install dependencies: | ||
```bash | ||
npm install | ||
``` | ||
3. Run the application: | ||
```bash | ||
npm start | ||
``` | ||
|
||
## Building | ||
|
||
To create a Windows installer: | ||
```bash | ||
npm run build | ||
``` | ||
|
||
## License | ||
|
||
ISC |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Cool AudioM</title> | ||
<link rel="stylesheet" href="styles.css"> | ||
</head> | ||
<body> | ||
<div class="container"> | ||
<h1>Cool AudioM</h1> | ||
|
||
<div class="file-section"> | ||
<div class="file-input"> | ||
<h2>Target Track</h2> | ||
<div id="targetTracks"> | ||
<div class="target-track"> | ||
<button class="selectTarget">Select Target File</button> | ||
<p class="targetPath">No file selected</p> | ||
</div> | ||
</div> | ||
<button id="addTrackButton">+ Add Another Track</button> | ||
</div> | ||
|
||
<div class="file-input"> | ||
<h2>Reference Track</h2> | ||
<button id="selectReference">Select Reference File</button> | ||
<p id="referencePath">No file selected</p> | ||
</div> | ||
</div> | ||
|
||
<div class="process-section"> | ||
<button id="processButton" disabled>Process</button> | ||
<div id="progress" class="progress-bar"> | ||
<div class="progress-fill"></div> | ||
</div> | ||
<p id="status">Ready</p> | ||
<p id="resultLink" style="display: none;">Result: <a href="#" id="downloadLink">result.wav</a> | <a href="#" id="folderLink">Open Folder</a></p> | ||
</div> | ||
</div> | ||
<script src="renderer.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
const { app, BrowserWindow, ipcMain, dialog, shell } = require('electron'); | ||
const path = require('path'); | ||
const { spawn } = require('child_process'); | ||
|
||
function createWindow() { | ||
const win = new BrowserWindow({ | ||
width: 1200, | ||
height: 800, | ||
webPreferences: { | ||
nodeIntegration: true, | ||
contextIsolation: false | ||
} | ||
}); | ||
|
||
win.loadFile('index.html'); | ||
} | ||
|
||
app.whenReady().then(() => { | ||
createWindow(); | ||
|
||
app.on('activate', () => { | ||
if (BrowserWindow.getAllWindows().length === 0) { | ||
createWindow(); | ||
} | ||
}); | ||
}); | ||
|
||
app.on('window-all-closed', () => { | ||
if (process.platform !== 'darwin') { | ||
app.quit(); | ||
} | ||
}); | ||
|
||
ipcMain.handle('select-file', async (event, type) => { | ||
const result = await dialog.showOpenDialog({ | ||
properties: ['openFile'], | ||
filters: [ | ||
{ name: 'Audio Files', extensions: ['wav', 'mp3'] } | ||
] | ||
}); | ||
return result.filePaths[0]; | ||
}); | ||
|
||
ipcMain.handle('process-audio', async (event, { targetFile, referenceFile, outputFile }) => { | ||
return new Promise((resolve, reject) => { | ||
const pythonScript = ` | ||
import matchering as mg | ||
import sys | ||
try: | ||
mg.process( | ||
target=sys.argv[1], | ||
reference=sys.argv[2], | ||
results=[ | ||
mg.pcm16(sys.argv[3]) | ||
] | ||
) | ||
print("success") | ||
except Exception as e: | ||
print(f"error: {str(e)}") | ||
`; | ||
const pythonProcess = spawn('python', ['-c', pythonScript, targetFile, referenceFile, outputFile || 'result.wav']); | ||
|
||
pythonProcess.stdout.on('data', (data) => { | ||
const output = data.toString().trim(); | ||
resolve(output); | ||
}); | ||
|
||
pythonProcess.stderr.on('data', (data) => reject(data.toString())); | ||
}); | ||
}); | ||
|
||
ipcMain.handle('open-folder', async (event, folderPath) => { | ||
await shell.openPath(folderPath); | ||
return true; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
echo off | ||
npm start |
Oops, something went wrong.