Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Jan 2018 12:34:35 +0100
From:      Matthias Apitz <guru@unixarea.de>
To:        Hans Petter Selasky <hps@selasky.org>
Cc:        freebsd-multimedia@freebsd.org
Subject:   Re: Convert MP3 audio to sheet music (score)
Message-ID:  <20180131113435.GA2564@c720-r314251>
In-Reply-To: <dcc0f22a-32a3-5c67-81d5-24cbab5950ad@selasky.org>
References:  <20180129112923.GA2867@c720-r314251> <c39c8970-dfc3-0ddc-b6fd-0198d4a1c963@selasky.org> <20180130054951.GA4410@c720-r314251> <0d10e676-f6ef-1c49-c6f0-06c5eadce3cb@selasky.org> <20180130172433.GA5983@c720-r314251> <dcc0f22a-32a3-5c67-81d5-24cbab5950ad@selasky.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--+g7M9IMkV8truYOl
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

El d=C3=ADa martes, enero 30, 2018 a las 09:51:58p. m. +0100, Hans Petter S=
elasky escribi=C3=B3:

> ...
> If you have a wider screen or use fewer bands, you'll see the same red=20
> line falling on the left side.
>=20
> Contributions are appreciated!
>=20
> --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

--=20
Matthias Apitz, =E2=9C=89 guru@unixarea.de, =E2=8C=82 http://www.unixarea.d=
e/  =F0=9F=93=B1 +49-176-38902045
Public GnuPG key: http://www.unixarea.de/key.pub

--+g7M9IMkV8truYOl
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment; filename=diff
Content-Transfer-Encoding: quoted-printable

*** 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 =3D new QSpinBox();
  	spn->setRange(1,1024);
  	spn->setSuffix(tr(" bands"));
! 	spn->setValue(240);
  	gl->addWidget(spn, 1,3,1,1);
  =09
  	pb =3D new QPushButton(tr("AddLog"));
--- 997,1003 ----
  	spn =3D new QSpinBox();
  	spn->setRange(1,1024);
  	spn->setSuffix(tr(" bands"));
! 	spn->setValue(qas_number_bands);
  	gl->addWidget(spn, 1,3,1,1);
  =09
  	pb =3D new QPushButton(tr("AddLog"));
***************
*** 1146,1151 ****
--- 1146,1153 ----
  	double cf;
  	double pf;
 =20
+ 	fprintf(stderr, "handle_add_log(): max_bands: %d\n", max_bands);
+ 	fflush(stderr);
  	for (unsigned x =3D 0; x !=3D max_bands; x++) {
  		range =3D qas_sample_rate / 2.0;
  		step =3D range / max_bands;
***************
*** 1171,1176 ****
--- 1173,1180 ----
  	double range;
  	double step;
 =20
+ 	fprintf(stderr, "handle_add_lin(): max_bands: %d\n", max_bands);
+ 	fflush(stderr);
  	for (unsigned x =3D 0; x !=3D max_bands; x++) {
 =20
  		range =3D qas_sample_rate / 2.0;
***************
*** 1202,1207 ****
--- 1206,1213 ----
 =20
  	/* must be divisible by 24 */
  	max_bands +=3D (24 - (max_bands % 24)) % 24;
+ 	fprintf(stderr, "handle_add_piano(): max_bands: %d\n", max_bands);
+ 	fflush(stderr);
 =20
  	pf =3D pow(2.0, 1.0 / 24.0);
 =20
***************
*** 1356,1361 ****
--- 1362,1369 ----
  	exit(0);
  }
 =20
+ int qas_number_bands =3D QAS_NUMBER_BANDS;
+=20
  int
  main(int argc, char **argv)
  {
***************
*** 1365,1372 ****
          /* must be first, before any threads are created */
          signal(SIGPIPE, SIG_IGN);
  =09
! 	while ((c =3D getopt(argc, argv, "r:h")) !=3D -1) {
  		switch (c) {
  		case 'r':
  			qas_sample_rate =3D atoi(optarg);
  			if (qas_sample_rate < 8000)
--- 1373,1389 ----
          /* must be first, before any threads are created */
          signal(SIGPIPE, SIG_IGN);
  =09
! 	while ((c =3D getopt(argc, argv, "r:b:h")) !=3D -1) {
  		switch (c) {
+ 		case 'b':
+ 			qas_number_bands =3D atoi(optarg);
+ 			if (qas_number_bands < 24)
+ 				qas_number_bands =3D 24;
+ 			else if (qas_number_bands > QAS_NUMBER_BANDS)
+ 				qas_number_bands =3D QAS_NUMBER_BANDS;
+ 			/* must be divisible by 24 */
+ 			qas_number_bands +=3D (24 - (qas_number_bands % 24)) % 24;
+ 			break;
  		case 'r':
  			qas_sample_rate =3D atoi(optarg);
  			if (qas_sample_rate < 8000)

--+g7M9IMkV8truYOl--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20180131113435.GA2564>