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
[-- Attachment #1 --] 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@unixarea.de, ⌂ http://www.unixarea.de/ 📱 +49-176-38902045 Public GnuPG key: http://www.unixarea.de/key.pub [-- Attachment #2 --] *** 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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20180131113435.GA2564>
