From owner-freebsd-multimedia@freebsd.org Wed Jan 31 11:34:50 2018 Return-Path: Delivered-To: freebsd-multimedia@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C61E9EC5215 for ; Wed, 31 Jan 2018 11:34:50 +0000 (UTC) (envelope-from guru@unixarea.de) Received: from ms-10.1blu.de (mail.dpedia.de [178.254.4.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5397E7FB12 for ; Wed, 31 Jan 2018 11:34:49 +0000 (UTC) (envelope-from guru@unixarea.de) Received: from [89.204.135.119] (helo=localhost.unixarea.de) by ms-10.1blu.de with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.86_2) (envelope-from ) id 1egqf3-0002u8-Bh; Wed, 31 Jan 2018 12:34:41 +0100 Received: from localhost.my.domain (localhost [127.0.0.1]) by localhost.unixarea.de (8.15.2/8.14.9) with ESMTPS id w0VBYbo4002614 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 31 Jan 2018 12:34:37 +0100 (CET) (envelope-from guru@unixarea.de) Received: (from guru@localhost) by localhost.my.domain (8.15.2/8.14.9/Submit) id w0VBYZ4t002613; Wed, 31 Jan 2018 12:34:35 +0100 (CET) (envelope-from guru@unixarea.de) X-Authentication-Warning: localhost.my.domain: guru set sender to guru@unixarea.de using -f Date: Wed, 31 Jan 2018 12:34:35 +0100 From: Matthias Apitz To: Hans Petter Selasky Cc: freebsd-multimedia@freebsd.org Subject: Re: Convert MP3 audio to sheet music (score) Message-ID: <20180131113435.GA2564@c720-r314251> Reply-To: Matthias Apitz Mail-Followup-To: Matthias Apitz , Hans Petter Selasky , freebsd-multimedia@freebsd.org References: <20180129112923.GA2867@c720-r314251> <20180130054951.GA4410@c720-r314251> <0d10e676-f6ef-1c49-c6f0-06c5eadce3cb@selasky.org> <20180130172433.GA5983@c720-r314251> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="+g7M9IMkV8truYOl" Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD 12.0-CURRENT r314251 (amd64) X-message-flag: Mails containing HTML will not be read! Please send only plain text. User-Agent: Mutt/1.8.0 (2017-02-23) X-Con-Id: 51246 X-Con-U: 0-guru X-Originating-IP: 89.204.135.119 X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jan 2018 11:34:51 -0000 --+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--