• Main Page
  • Classes
  • Files
  • File List
  • File Members

main.cpp

Go to the documentation of this file.
00001 
00183 #include <iostream>
00184 #include <cmath>
00185 #include <cassert>
00186 
00187 #include "soundfile.hpp"
00188 #include "mainwindow.hpp"
00189 #include "spectrogram.hpp"
00190 
00191 // testing functions
00192 namespace 
00193 {
00194     void image_test()
00195     {
00196         //Soundfile file("/home/jan/ads/violin.ogg");
00197         Soundfile file("/home/jan/music/Windir/1999-Arntor/01-Byrjing.mp3");
00198         Spectrogram spec;
00199         //spec.palette = Palette("/home/jan/spectrogram/palettes/fiery.png");
00200         real_vec signal = file.read_channel(0);
00201         QImage out = spec.to_image(signal, file.data().samplerate());
00202         out.save("out.png");
00203     }
00204 
00205     void synt_test()
00206     {
00207         QImage img = QImage("/home/jan/spectrogram/out.png");
00208         //QImage img = QImage("/home/jan/or/vion-xx6.png");
00209         assert(!img.isNull());
00210         Spectrogram spec;
00211         real_vec data = spec.synthetize(img, 44100, SYNTHESIS_SINE);
00212         std::cout << "hotovo: "<<data.size()<<"\n";
00213         //Soundfile::writeSound("/home/jan/synt.wav", data);
00214     }
00215 }
00216 
00217 int main(int argc, char* argv[])
00218 {
00219     //image_test();
00220     //synt_test();
00221     //return 0;
00222     QApplication app(argc, argv);
00223     MainWindow main_window;
00224     main_window.show();
00225     return app.exec();
00226 }

Generated by  doxygen 1.7.1