Convert MP3 audio to sheet music (score)

Matthias Apitz guru at unixarea.de
Wed Jan 31 11:34:51 UTC 2018


El día martes, enero 30, 2018 a las 09:51:58p. m. +0100, Hans Petter Selasky escribió:

> ...
> If you have a wider screen or use fewer bands, you'll see the same red 
> line falling on the left side.
> 
> Contributions are appreciated!
> 
> --HPS

Attached below is a first small contribution. I'm still testing and
guessing how to manage the tool. Is there some document or readme
explaining, what I see?

Thaks for your help

	matthias

-- 
Matthias Apitz, ✉ guru at unixarea.de, ⌂ http://www.unixarea.de/  📱 +49-176-38902045
Public GnuPG key: http://www.unixarea.de/key.pub
-------------- next part --------------
*** qaudiosonar.h.orig	2018-01-31 11:25:55.189192000 +0100
--- qaudiosonar.h	2018-01-31 11:41:52.825642000 +0100
***************
*** 343,348 ****
--- 343,350 ----
  extern char dsp_write_device[1024];
  extern char midi_write_device[1024];
  extern int qas_sample_rate;
+ #define QAS_NUMBER_BANDS 240
+ extern int qas_number_bands;
  extern int qas_source_0;
  extern int qas_source_1;
  extern int qas_output_0;
*** qaudiosonar.cpp.orig	2018-01-31 11:25:55.188385000 +0100
--- qaudiosonar.cpp	2018-01-31 12:27:06.076494000 +0100
***************
*** 997,1003 ****
  	spn = new QSpinBox();
  	spn->setRange(1,1024);
  	spn->setSuffix(tr(" bands"));
! 	spn->setValue(240);
  	gl->addWidget(spn, 1,3,1,1);
  	
  	pb = new QPushButton(tr("AddLog"));
--- 997,1003 ----
  	spn = new QSpinBox();
  	spn->setRange(1,1024);
  	spn->setSuffix(tr(" bands"));
! 	spn->setValue(qas_number_bands);
  	gl->addWidget(spn, 1,3,1,1);
  	
  	pb = new QPushButton(tr("AddLog"));
***************
*** 1146,1151 ****
--- 1146,1153 ----
  	double cf;
  	double pf;
  
+ 	fprintf(stderr, "handle_add_log(): max_bands: %d\n", max_bands);
+ 	fflush(stderr);
  	for (unsigned x = 0; x != max_bands; x++) {
  		range = qas_sample_rate / 2.0;
  		step = range / max_bands;
***************
*** 1171,1176 ****
--- 1173,1180 ----
  	double range;
  	double step;
  
+ 	fprintf(stderr, "handle_add_lin(): max_bands: %d\n", max_bands);
+ 	fflush(stderr);
  	for (unsigned x = 0; x != max_bands; x++) {
  
  		range = qas_sample_rate / 2.0;
***************
*** 1202,1207 ****
--- 1206,1213 ----
  
  	/* must be divisible by 24 */
  	max_bands += (24 - (max_bands % 24)) % 24;
+ 	fprintf(stderr, "handle_add_piano(): max_bands: %d\n", max_bands);
+ 	fflush(stderr);
  
  	pf = pow(2.0, 1.0 / 24.0);
  
***************
*** 1356,1361 ****
--- 1362,1369 ----
  	exit(0);
  }
  
+ int qas_number_bands = QAS_NUMBER_BANDS;
+ 
  int
  main(int argc, char **argv)
  {
***************
*** 1365,1372 ****
          /* must be first, before any threads are created */
          signal(SIGPIPE, SIG_IGN);
  	
! 	while ((c = getopt(argc, argv, "r:h")) != -1) {
  		switch (c) {
  		case 'r':
  			qas_sample_rate = atoi(optarg);
  			if (qas_sample_rate < 8000)
--- 1373,1389 ----
          /* must be first, before any threads are created */
          signal(SIGPIPE, SIG_IGN);
  	
! 	while ((c = getopt(argc, argv, "r:b:h")) != -1) {
  		switch (c) {
+ 		case 'b':
+ 			qas_number_bands = atoi(optarg);
+ 			if (qas_number_bands < 24)
+ 				qas_number_bands = 24;
+ 			else if (qas_number_bands > QAS_NUMBER_BANDS)
+ 				qas_number_bands = QAS_NUMBER_BANDS;
+ 			/* must be divisible by 24 */
+ 			qas_number_bands += (24 - (qas_number_bands % 24)) % 24;
+ 			break;
  		case 'r':
  			qas_sample_rate = atoi(optarg);
  			if (qas_sample_rate < 8000)


More information about the freebsd-multimedia mailing list