-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.cpp
More file actions
44 lines (33 loc) · 1.1 KB
/
Copy pathapp.cpp
File metadata and controls
44 lines (33 loc) · 1.1 KB
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
/*
@author : Rothang Ralph Ralefaso
@email : rrralefaso@outloook.com
@github : github.com/RR-Ralefaso
@date : 2026
*/
#include <iostream>
#include <string>
#include "src/Equations.hpp"
int main()
{
ATI::Audiomapper mapper;
std::string filepath, savepath;
std::cout << "--- Professional Audio-to-image (ATI) Engine ---\n";
std::cout << "Author: Rothang Ralph Ralefaso\n\n";
std::cout << "Enter path to WAV file: ";
std::getline(std::cin, filepath);
std::cout << "Performing Fast Fourier Transform (FFT)...\n";
auto freqData = mapper.GetFrequencyMap(filepath);
if (freqData.empty())
{
std::cerr << "Error: File could not be processed. Ensure it is a valid WAV.\n";
return 1;
}
int w = mapper.GetWidth();
int h = mapper.GetHeight();
std::cout << "Enter output filename (e.g., viz.png): ";
std::getline(std::cin, savepath);
std::cout << "Generating high-detail spectrogram...\n";
mapper.CreateSpectrogramPNG(freqData, w, h, savepath);
std::cout << "Done! Saved to " << savepath << " at " << w << "x" << h << "\n";
return 0;
}