Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Matter cannot be created or destroyed, nor can it be returned without a receipt.


devel / comp.lang.tcl / Re: Generating sound signals

SubjectAuthor
* Generating sound signalsYann-Erwan_Trévilly
`* Generating sound signalsScott Pitcher
 `* Generating sound signalsPaul Obermeier
  +- Generating sound signalsScott Pitcher
  `* Generating sound signalsRalf Fassel
   `- Generating sound signalsPaul Obermeier

1
Re: Generating sound signals

<6e992ae7-15db-44eb-ad54-bf88394d637en@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10503&group=comp.lang.tcl#10503

  copy link   Newsgroups: comp.lang.tcl
X-Received: by 2002:ae9:e20f:0:b0:702:16ea:dfab with SMTP id c15-20020ae9e20f000000b0070216eadfabmr2063892qkc.759.1672914437099;
Thu, 05 Jan 2023 02:27:17 -0800 (PST)
X-Received: by 2002:ac8:760d:0:b0:3a8:2f8:683 with SMTP id t13-20020ac8760d000000b003a802f80683mr1931076qtq.99.1672914436883;
Thu, 05 Jan 2023 02:27:16 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.tcl
Date: Thu, 5 Jan 2023 02:27:16 -0800 (PST)
In-Reply-To: <4fe66c8a-5c94-45ae-9f96-171147baffb1n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=95.141.100.48; posting-account=TiR9AQoAAADBv9h8YIvzTZ5nFKxwWT01
NNTP-Posting-Host: 95.141.100.48
References: <9bf8daf0-db0c-4ac5-976d-0bee8b957fdfn@googlegroups.com>
<02fc1e23-316d-48f0-8efc-63321af25a66n@googlegroups.com> <cc4c2c8c-b83f-4762-97ae-2ecb61cadd9en@googlegroups.com>
<4bcfa7dc-4677-4a5a-91f0-10165c62e311n@googlegroups.com> <a1f92df6-7945-4bed-b29d-830ecf05dae9n@googlegroups.com>
<ygafstx52qy.fsf@akutech.de> <e40add0b-c998-4f43-b08f-73d8fbbb5e84n@googlegroups.com>
<48babc4b-1fc6-4382-ad7c-d96f45b10bdan@googlegroups.com> <4fe66c8a-5c94-45ae-9f96-171147baffb1n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <6e992ae7-15db-44eb-ad54-bf88394d637en@googlegroups.com>
Subject: Re: Generating sound signals
From: profdocu...@gmail.com (Yann-Erwan Trévilly)
Injection-Date: Thu, 05 Jan 2023 10:27:17 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1935
 by: Yann-Erwan Trévilly - Thu, 5 Jan 2023 10:27 UTC

> > Alexandru would you like a copy of the -64 bit library to test?
> Hi Scotty,
>
> of course. Thank you!

Hi Scotty,
I'm building a version of Wavesurfer for bioacoustics in 32bits. But I would like a 64-bit version and I need snack: is your patch for the 64-bit version of snack still available? The link no longer works. It would be great...
Yann

Re: Generating sound signals

<789a58ef-da4d-4be0-a094-f71f4eaf0da4n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10504&group=comp.lang.tcl#10504

  copy link   Newsgroups: comp.lang.tcl
X-Received: by 2002:a37:4149:0:b0:705:74fe:b39a with SMTP id o70-20020a374149000000b0070574feb39amr552828qka.616.1673000722599;
Fri, 06 Jan 2023 02:25:22 -0800 (PST)
X-Received: by 2002:a05:620a:a1c:b0:6ff:8af3:c97f with SMTP id
i28-20020a05620a0a1c00b006ff8af3c97fmr3023249qka.425.1673000722367; Fri, 06
Jan 2023 02:25:22 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.tcl
Date: Fri, 6 Jan 2023 02:25:22 -0800 (PST)
In-Reply-To: <6e992ae7-15db-44eb-ad54-bf88394d637en@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=125.168.237.123; posting-account=8M0e7AoAAAB_f08ofWnkIy4mQYwHyCIq
NNTP-Posting-Host: 125.168.237.123
References: <9bf8daf0-db0c-4ac5-976d-0bee8b957fdfn@googlegroups.com>
<02fc1e23-316d-48f0-8efc-63321af25a66n@googlegroups.com> <cc4c2c8c-b83f-4762-97ae-2ecb61cadd9en@googlegroups.com>
<4bcfa7dc-4677-4a5a-91f0-10165c62e311n@googlegroups.com> <a1f92df6-7945-4bed-b29d-830ecf05dae9n@googlegroups.com>
<ygafstx52qy.fsf@akutech.de> <e40add0b-c998-4f43-b08f-73d8fbbb5e84n@googlegroups.com>
<48babc4b-1fc6-4382-ad7c-d96f45b10bdan@googlegroups.com> <4fe66c8a-5c94-45ae-9f96-171147baffb1n@googlegroups.com>
<6e992ae7-15db-44eb-ad54-bf88394d637en@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <789a58ef-da4d-4be0-a094-f71f4eaf0da4n@googlegroups.com>
Subject: Re: Generating sound signals
From: scottypi...@gmail.com (Scott Pitcher)
Injection-Date: Fri, 06 Jan 2023 10:25:22 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2327
 by: Scott Pitcher - Fri, 6 Jan 2023 10:25 UTC

On Thursday, January 5, 2023 at 9:27:19 PM UTC+11, Yann-Erwan Trévilly wrote:
> > > Alexandru would you like a copy of the -64 bit library to test?
> > Hi Scotty,
> >
> > of course. Thank you!
> Hi Scotty,
> I'm building a version of Wavesurfer for bioacoustics in 32bits. But I would like a 64-bit version and I need snack: is your patch for the 64-bit version of snack still available? The link no longer works. It would be great....
> Yann

Hi Yann,

I've uploaded it to Github. Please see if any of the binaries on this page help you: https://github.com/scottypitcher/tcl-snack/releases

Kind regards,
Scott

Re: Generating sound signals

<tpa5fb$390c2$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10506&group=comp.lang.tcl#10506

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: oberme...@poSoft.de (Paul Obermeier)
Newsgroups: comp.lang.tcl
Subject: Re: Generating sound signals
Date: Fri, 6 Jan 2023 22:57:01 +0100
Organization: A noiseless patient Spider
Lines: 38
Message-ID: <tpa5fb$390c2$1@dont-email.me>
References: <9bf8daf0-db0c-4ac5-976d-0bee8b957fdfn@googlegroups.com>
<02fc1e23-316d-48f0-8efc-63321af25a66n@googlegroups.com>
<cc4c2c8c-b83f-4762-97ae-2ecb61cadd9en@googlegroups.com>
<4bcfa7dc-4677-4a5a-91f0-10165c62e311n@googlegroups.com>
<a1f92df6-7945-4bed-b29d-830ecf05dae9n@googlegroups.com>
<ygafstx52qy.fsf@akutech.de>
<e40add0b-c998-4f43-b08f-73d8fbbb5e84n@googlegroups.com>
<48babc4b-1fc6-4382-ad7c-d96f45b10bdan@googlegroups.com>
<4fe66c8a-5c94-45ae-9f96-171147baffb1n@googlegroups.com>
<6e992ae7-15db-44eb-ad54-bf88394d637en@googlegroups.com>
<789a58ef-da4d-4be0-a094-f71f4eaf0da4n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 6 Jan 2023 21:56:59 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="519bb082fc59faf39323d37d2ab23852";
logging-data="3441026"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18Fd5uwSHvNkiIepT8arW1hqSEt8Le7FpM="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.6.1
Cancel-Lock: sha1:7XYkGMcZTbuXfYO80sQ+Y5Na3pI=
In-Reply-To: <789a58ef-da4d-4be0-a094-f71f4eaf0da4n@googlegroups.com>
 by: Paul Obermeier - Fri, 6 Jan 2023 21:57 UTC

Am 06.01.2023 um 11:25 schrieb Scott Pitcher:
> On Thursday, January 5, 2023 at 9:27:19 PM UTC+11, Yann-Erwan Trévilly wrote:
>>>> Alexandru would you like a copy of the -64 bit library to test?
>>> Hi Scotty,
>>>
>>> of course. Thank you!
>> Hi Scotty,
>> I'm building a version of Wavesurfer for bioacoustics in 32bits. But I would like a 64-bit version and I need snack: is your patch for the 64-bit version of snack still available? The link no longer works. It would be great...
>> Yann
>
> Hi Yann,
>
> I've uploaded it to Github. Please see if any of the binaries on this page help you: https://github.com/scottypitcher/tcl-snack/releases
>
> Kind regards,
> Scott

Hi Scott,

I'm trying to include your Snack version into my BAWT framework.

It compiles and runs fine on Windows 11 using MinGW/gcc in 32-bit and 64-bit.
(I had to replace the "mkdir" call with "mkdir -p" in Makefile.in).

When compiling on Linux with default configure options, I get the following error when starting snack:
"Unable to open mixer /dev/mixer"
and the following error when trying to run demo generator.tcl:
"Could not gain access to /dev/sound/dsp for writing"

When configuring with "--enable-alsa" I get the following error when starting snack:
undefined symbol: _snd_pcm_mmap_hw_ptr
while executing "load /opt/Tcl/lib/snack2.2.11/libsnack.so"

Which configure option are you using and which Linux distribution does it run for you?

Thanks,
Paul

Re: Generating sound signals

<5f4c555c-b34d-48da-a046-72cc2650ee70n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10507&group=comp.lang.tcl#10507

  copy link   Newsgroups: comp.lang.tcl
X-Received: by 2002:a05:620a:166a:b0:702:1a38:e42d with SMTP id d10-20020a05620a166a00b007021a38e42dmr2827288qko.306.1673045137253;
Fri, 06 Jan 2023 14:45:37 -0800 (PST)
X-Received: by 2002:ad4:5f07:0:b0:4b1:b025:54e6 with SMTP id
fo7-20020ad45f07000000b004b1b02554e6mr2633821qvb.53.1673045137103; Fri, 06
Jan 2023 14:45:37 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.tcl
Date: Fri, 6 Jan 2023 14:45:36 -0800 (PST)
In-Reply-To: <tpa5fb$390c2$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=125.168.237.123; posting-account=8M0e7AoAAAB_f08ofWnkIy4mQYwHyCIq
NNTP-Posting-Host: 125.168.237.123
References: <9bf8daf0-db0c-4ac5-976d-0bee8b957fdfn@googlegroups.com>
<02fc1e23-316d-48f0-8efc-63321af25a66n@googlegroups.com> <cc4c2c8c-b83f-4762-97ae-2ecb61cadd9en@googlegroups.com>
<4bcfa7dc-4677-4a5a-91f0-10165c62e311n@googlegroups.com> <a1f92df6-7945-4bed-b29d-830ecf05dae9n@googlegroups.com>
<ygafstx52qy.fsf@akutech.de> <e40add0b-c998-4f43-b08f-73d8fbbb5e84n@googlegroups.com>
<48babc4b-1fc6-4382-ad7c-d96f45b10bdan@googlegroups.com> <4fe66c8a-5c94-45ae-9f96-171147baffb1n@googlegroups.com>
<6e992ae7-15db-44eb-ad54-bf88394d637en@googlegroups.com> <789a58ef-da4d-4be0-a094-f71f4eaf0da4n@googlegroups.com>
<tpa5fb$390c2$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <5f4c555c-b34d-48da-a046-72cc2650ee70n@googlegroups.com>
Subject: Re: Generating sound signals
From: scottypi...@gmail.com (Scott Pitcher)
Injection-Date: Fri, 06 Jan 2023 22:45:37 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 10580
 by: Scott Pitcher - Fri, 6 Jan 2023 22:45 UTC

On Saturday, January 7, 2023 at 8:57:03 AM UTC+11, Paul Obermeier wrote:
......
> Hi Scott,
>
> I'm trying to include your Snack version into my BAWT framework.
>
> It compiles and runs fine on Windows 11 using MinGW/gcc in 32-bit and 64-bit.
> (I had to replace the "mkdir" call with "mkdir -p" in Makefile.in).
>
> When compiling on Linux with default configure options, I get the following error when starting snack:
> "Unable to open mixer /dev/mixer"
> and the following error when trying to run demo generator.tcl:
> "Could not gain access to /dev/sound/dsp for writing"
>
> When configuring with "--enable-alsa" I get the following error when starting snack:
> undefined symbol: _snd_pcm_mmap_hw_ptr
> while executing "load /opt/Tcl/lib/snack2.2.11/libsnack.so"
>
> Which configure option are you using and which Linux distribution does it run for you?
>
> Thanks,
> Paul

Hi Paul,
My tcl-snack/build-x86_64/config.log shows:

| This file contains any messages produced by compilers while
| running configure, to aid debugging if configure makes a mistake.
|
| It was created by configure, which was
| generated by GNU Autoconf 2.69. Invocation command line was
|
| $ ../unix/configure --prefix=/home/scotty/Tcl8.6.9-x86_64 --srcdir=.../unix

I'm using the scripts I placed in tcl-snack/devtools, specifically myconfigure.sh. That script did work on both Windows (MINGW) and Linux when I built the binaries.

I'm running Ubuntu 18.04.1 here:
| scotty@officepc:~$ uname -a
| Linux officepc.svpts 5.4.0-132-lowlatency #148~18.04.1-Ubuntu SMP PREEMPT Mon Oct 24 21:15:00 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

I use my own builds of Tcl for testing in my home directory and I build and install Snack there, building both 32 and 64 bit in each case. I just reran the snack tests/all.tcl test (note, the ex1.wav file I had to copy from over in the snack demos/.... directory into tests/ to get it run cleanly:

| scotty@officepc:~/src/tcltk/tcl-snack/tests$ cp ../demos/tcl/ex1.wav ./
| scotty@officepc:~/src/tcltk/tcl-snack/tests$ ~/Tcl8.6.9-x86_64/bin/tclsh8..6 all.tcl
| Tcl 8.6.9 tests running in interp: /home/scotty/Tcl8.6.9-x86_64/bin/tclsh8.6
| Tests running in working dir: /home/scotty/src/tcltk/tcl-snack/tests
| Only running tests that match: *
| Skipping test files that match: l.*.test
| Only sourcing test files that match: *.test
| Tests began at Sat Jan 07 09:33:13 AEDT 2023
| audio.test
| cget.test
| concat.test
| conf.test
| convert.test
| copy.test
| crop.test
| cut.test
| data.test
| dbpower.test
| fileio.test
| filter.test
| formant.test
| inflush.test
| insert.test
| length.test
| maxmin.test
| mixer.test
| pitch.test
|
|
| ==== pitch-1.3 pitch command FAILED
| ==== Contents of test case:
|
| set tcl_precision 5
| set s [snack::sound snd -load ex1.wav]
| set res [$s pitch -method ESPS]
| $s destroy
| set res
|
| ---- Result was:
| {0.0 0.0 0.0 0.7046} {0.0 0.0 773.7 0.65552} {0.0 0.0 818.08 0.24061} {0.0 0.0 813.13 0.56787} {0.0 0.0 808.39 0.51307} {0.0 0.0 826.01 0.49327} {0.0 0.0 856.56 0.9469} {0.0 0.0 851.72 0.0} {0.0 0.0 869.15 0.48861} {0.0 0.0 842.57 0.39768} {0.0 0.0 839.14 0.4009} {0.0 0.0 820.39 0.81465} {0.0 0.0 833.47 0.95806} {0.0 0.0 855.33 0.89539} {0.0 0.0 852.97 0.28335} {0.0 0.0 889.07 0.59169} {0.0 0.0 1070.5 0.68884} {0.0 0.0 878.41 0.5143} {0.0 0.0 892.74 0.3997} {0.0 0.0 873.53 0.68623} {0.0 0.0 965.13 0.57252} {0.0 0.0 882.69 0.49351} {0.0 0.0 1193.0 0.70511} {209.81 1.0 3304.3 0.88756} {162.78 1.0 3660.9 0.99115} {161.92 1.0 3512.7 0.99646} {158.92 1.0 3547.9 0.99354} {155.91 1.0 3468.7 0.98505} {149.48 1.0 3285.3 0.99364} {143.31 1.0 3008.2 0.98736} {133.77 1.0 2823.7 0.94805} {126.48 1.0 2640.8 0.98759} {119.94 1..0 2333.7 0.9852} {112.98 1.0 2040.5 0.95218} {109.81 1.0 2121.6 0.9571} {107.68 1.0 2418.1 0.92161} {106.6 1.0 2507.3 0.95998} {105.57 1.0 2478.0 0.95695} {105.43 1.0 2671.9 0.96458} {106.74 1.0 2706.6 0.98918} {109.0 1.0 2755.4 0.99448} {111.84 1.0 2717.5 0.97564} {115.73 1.0 2277.5 0.87201} {99.183 1.0 924.36 0.60726} {120.34 1.0 859.79 0.84981} {150.88 1.0 2136.3 0.93803} {136.25 1.0 2838.1 0.98336} {141.73 1.0 2877.0 0.99704} {145.06 1.0 2894.6 0.98906} {146.54 1.0 2749.1 0.98797} {149.82 1.0 2699.5 0.94096} {149.23 1.0 2838.4 0.98879} {146.53 1.0 2630.6 0.95378} {141.86 1.0 2181.0 0.97326} {133.37 1.0 1888.3 0.85003} {124.99 1.0 1660.0 0.94212} {117.97 1.0 1443..6 0.96375} {109.74 1.0 1091.7 0.96917} {103.63 1.0 915.75 0.92499} {111.49 1.0 853.13 0.69573} {107.37 1.0 786.42 0.86455} {93.37 1.0 815.44 0.81332} {123.3 1.0 804.05 0.61468} {84.033 1.0 762.98 0.74945} {121.1 1.0 725.91 0..5574} {114.08 1.0 700.22 0.82347} {101.78 1.0 704.95 0.57994} {103.43 1.0 695.87 0.75774} {101.42 1.0 699.81 0.79472} {105.86 1.0 714.47 0.70127} {0.0 0.0 745.7 0.828} {0.0 0.0 736.31 0.64289} {0.0 0.0 696.35 0.40449} {0.0 0..0 684.65 0.44551} {0.0 0.0 639.58 0.38997} {0.0 0.0 561.77 0.0} {0.0 0.0 627.65 0.34976} {0.0 0.0 717.62 0.38937} {0.0 0.0 748.27 0.41932} {0.0 0.0 750.33 0.86962} {0.0 0.0 783.3 0.82826} {0.0 0.0 761.05 0.20038} {0.0 0.0 809.51 0.35076} {0.0 0.0 831.97 0.7714} {0.0 0.0 872.22 0.67117} {0.0 0.0 826..62 0.6413} {0.0 0.0 717.3 0.0} {0.0 0.0 723.3 0.54415} {0.0 0.0 751.75 0.33728} {0.0 0.0 818.03 0.31209} {0.0 0.0 837.29 0.4341} {0.0 0.0 849.53 0.3289} {0.0 0.0 862.33 0.28854} {0.0 0.0 845.65 0.68362} {0.0 0.0 868.25 0.74526}
| ---- Result should have been (exact matching):
| {0.0 0.0 0.0 0.7046} {0.0 0.0 773.75 0.65552} {0.0 0.0 818.19 0.24061} {0..0 0.0 813.11 0.56787} {0.0 0.0 808.38 0.51307} {0.0 0.0 826.19 0.49327} {0..0 0.0 856.39 0.9469} {0.0 0.0 851.94 0.0} {0.0 0.0 869.07 0.48861} {0.0 0.0 842.5 0.39768} {0.0 0.0 839.18 0.4009} {0.0 0.0 820.35 0.81465} {0.0 0.0 833.41 0.95806} {0.0 0.0 855.43 0.89539} {0.0 0.0 853.1 0.28335} {0.0 0.0 889.35 0.59169} {0.0 0.0 1070.4 0.68884} {0.0 0.0 878.07 0.5143} {0.0 0.0 893.05 0.3997} {0.0 0.0 873.35 0.68623} {0.0 0.0 965.28 0.57252} {0.0 0.0 882..13 0.49351} {0.0 0.0 1196.0 0.70511} {209.81 1.0 3310.1 0.88756} {162.78 1..0 3659.8 0.99115} {161.92 1.0 3512.8 0.99646} {158.92 1.0 3547.8 0.99354} {155.91 1.0 3468.3 0.98505} {149.48 1.0 3284.6 0.99364} {143.31 1.0 3007.4 0.98736} {133.77 1.0 2823.2 0.94805} {126.48 1.0 2640.0 0.98759} {119.94 1.0 2332.5 0.9852} {112.98 1.0 2040.0 0.95218} {109.81 1.0 2122.5 0.9571} {107.68 1.0 2418.8 0.92161} {106.6 1.0 2507.1 0.95998} {105.57 1.0 2478.7 0.95695} {105.43 1.0 2671.9 0.96458} {106.74 1.0 2706.4 0.98918} {109.0 1.0 2755.5 0.99448} {111.84 1.0 2716.9 0.97564} {115.73 1.0 2274.5 0.87201} {99.183 1.0 920.17 0.60726} {120.34 1.0 860.54 0.84981} {150.88 1.0 2140.9 0.93803} {136.25 1.0 2838.7 0.98336} {141.73 1.0 2877.0 0.99704} {145.06 1.0 2894..6 0.98906} {146.54 1.0 2748.1 0.98797} {149.82 1.0 2700.2 0.94096} {149.23 1.0 2838.5 0.98879} {146.53 1.0 2629.4 0.95378} {141.86 1.0 2179.6 0.97326} {133.37 1.0 1887.6 0.85003} {124.99 1.0 1659.4 0.94212} {117.97 1.0 1442.7 0.96375} {109.74 1.0 1090.7 0.96917} {103.63 1.0 915.58 0.92499} {111.49 1.0 852.97 0.69573} {107.37 1.0 786.45 0.86455} {93.37 1.0 815.31 0.81332} {123.3 1.0 804.19 0.61468} {84.033 1.0 762.64 0.74945} {121.1 1.0 725.97 0.5574} {114.08 1.0 700.18 0.82347} {101.78 1.0 704.91 0.57994} {103.43 1.0 695.82 0.75774} {101.42 1.0 699.76 0.79472} {105.86 1.0 714.6 0.70127} {0.0 0.0 745.64 0.828} {0.0 0.0 736.29 0.64289} {0.0 0.0 696.31 0.40449} {0.0 0.0 684.55 0.44551} {0.0 0.0 639.39 0.38997} {0.0 0.0 561.58 0.0} {0.0 0.0 628.03 0.34976} {0.0 0.0 717.81 0.38937} {0.0 0.0 748.32 0.41932} {0.0 0.0 750.33 0.86962} {0.0 0.0 783.32 0.82826} {0.0 0.0 761.07 0.20038} {0.0 0.0 809.66 0.35076} {0.0 0.0 831.98 0.7714} {0.0 0.0 872.36 0.67117} {0.0 0.0 826..35 0.6413} {0.0 0.0 717.04 0.0} {0.0 0.0 723.39 0.54415} {0.0 0.0 751.84 0..33728} {0.0 0.0 818.29 0.31209} {0.0 0.0 837.27 0.4341} {0.0 0.0 849.58 0.3289} {0.0 0.0 862.31 0.28854} {0.0 0.0 845.67 0.68362} {0.0 0.0 868.24 0.74526}
| ==== pitch-1.3 FAILED
|
|
| Segmentation fault (core dumped)
| scotty@officepc:~/src/tcltk/tcl-snack/tests$
That last test seems to always fails on Linux due to small variations in the result.

For building Tcl and Tk I use a similar set of scripts. I think that's where I crafted the snack devtools scripts from. They are stock builds but just put the results into different directories for X86_64, AMD, debug etc, so I can run tests against each easily.

Kind regards,
Scott

Re: Generating sound signals

<ygazgaraerz.fsf@akutech.de>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10511&group=comp.lang.tcl#10511

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: ralf...@gmx.de (Ralf Fassel)
Newsgroups: comp.lang.tcl
Subject: Re: Generating sound signals
Date: Mon, 09 Jan 2023 16:50:08 +0100
Lines: 104
Message-ID: <ygazgaraerz.fsf@akutech.de>
References: <9bf8daf0-db0c-4ac5-976d-0bee8b957fdfn@googlegroups.com>
<02fc1e23-316d-48f0-8efc-63321af25a66n@googlegroups.com>
<cc4c2c8c-b83f-4762-97ae-2ecb61cadd9en@googlegroups.com>
<4bcfa7dc-4677-4a5a-91f0-10165c62e311n@googlegroups.com>
<a1f92df6-7945-4bed-b29d-830ecf05dae9n@googlegroups.com>
<ygafstx52qy.fsf@akutech.de>
<e40add0b-c998-4f43-b08f-73d8fbbb5e84n@googlegroups.com>
<48babc4b-1fc6-4382-ad7c-d96f45b10bdan@googlegroups.com>
<4fe66c8a-5c94-45ae-9f96-171147baffb1n@googlegroups.com>
<6e992ae7-15db-44eb-ad54-bf88394d637en@googlegroups.com>
<789a58ef-da4d-4be0-a094-f71f4eaf0da4n@googlegroups.com>
<tpa5fb$390c2$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain
X-Trace: individual.net H6w8xKAxwHmO7ZJAvpfs5g+rInYbUFODRY5bwfNX/BQlgz8ps=
Cancel-Lock: sha1:Lt/UmmwHXEg7yPAaW2jeANNx9FE= sha1:meiEs7apq1rWvFs5S7qP6Jk1yzQ=
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
 by: Ralf Fassel - Mon, 9 Jan 2023 15:50 UTC

* Paul Obermeier <obermeier@poSoft.de>
>
| When configuring with "--enable-alsa" I get the following error when starting snack:
| undefined symbol: _snd_pcm_mmap_hw_ptr
| while executing "load /opt/Tcl/lib/snack2.2.11/libsnack.so"
>
| Which configure option are you using and which Linux distribution does it run for you?

FWIW,
we use snack2.2.10 (without MP3 which we don't need) on OpenSuse 15.4
and Debian 11.

Here are the patches that we apply to snack2.2.10:

==================================================

--- snack2.2.10/generic/jkSoundEngine.c.orig
+++ snack2.2.10/generic/jkSoundEngine.c
@@ -1694,7 +1694,7 @@
if (soundQueue != NULL) {
for (p = soundQueue; p != NULL && p->sound != s; p = p->next);
- if (p->sound == s) {
+ if (p && p->sound == s) {
n = p->startPos + p->nWritten;
}
}

==================================================

# https://bugs.gentoo.org/show_bug.cgi?id=226137
# + double-close-protection
--- snack2.2.10/unix/jkAudIO_alsa.c.orig
+++ snack2.2.10/unix/jkAudIO_alsa.c
@@ -49,6 +49,8 @@
static int minNumChan = 1;
+static snd_pcm_uframes_t hw_bufsize = 0;
+ int
SnackAudioOpen(ADesc *A, Tcl_Interp *interp, char *device, int mode, int freq,
int nchannels, int encoding)
@@ -135,6 +137,9 @@
Tcl_AppendResult(interp, "Failed setting HW params.", NULL);
return TCL_ERROR;
}
+ + snd_pcm_hw_params_get_buffer_size (hw_params, &hw_bufsize);
+ snd_pcm_hw_params_free(hw_params);
snd_pcm_prepare(A->handle);
if (A->mode == RECORD) {
@@ -155,9 +160,11 @@
{
if (A->debug > 1) Snack_WriteLog(" Enter SnackAudioClose\n");
- snd_pcm_drop(A->handle);
- snd_pcm_close(A->handle);
- + if (A->handle) {
+ snd_pcm_drop(A->handle);
+ snd_pcm_close(A->handle);
+ A->handle = NULL;
+ }
if (A->debug > 1) Snack_WriteLog(" Exit SnackAudioClose\n");
return(0);
@@ -202,6 +209,8 @@
int i;
static char buf[64];
+ return;
+
if (A->debug > 1) Snack_WriteLog(" Enter SnackAudioPost\n");
for (i = 0; i < 1000; i++) {
@@ -267,12 +276,14 @@
long
SnackAudioPlayed(ADesc *A)
{
- long avail = _snd_pcm_mmap_hw_ptr(A->handle);
+ // FIX Here, _snd_pcm_mmap_hw_ptr is deprecated in new alsalib
+ long played = A->nWritten - (hw_bufsize - SnackAudioWriteable(A));
+ // long avail = _snd_pcm_mmap_hw_ptr(A->handle);

- if (avail < 0)
- avail = 0;
+ if (played < 0)
+ return 0;
- return (avail+A->nPlayed);
+ return (played);
}
void

==================================================

HTH
R'

Re: Generating sound signals

<tphp7l$92b4$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10512&group=comp.lang.tcl#10512

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: oberme...@poSoft.de (Paul Obermeier)
Newsgroups: comp.lang.tcl
Subject: Re: Generating sound signals
Date: Mon, 9 Jan 2023 20:17:10 +0100
Organization: A noiseless patient Spider
Lines: 112
Message-ID: <tphp7l$92b4$1@dont-email.me>
References: <9bf8daf0-db0c-4ac5-976d-0bee8b957fdfn@googlegroups.com>
<02fc1e23-316d-48f0-8efc-63321af25a66n@googlegroups.com>
<cc4c2c8c-b83f-4762-97ae-2ecb61cadd9en@googlegroups.com>
<4bcfa7dc-4677-4a5a-91f0-10165c62e311n@googlegroups.com>
<a1f92df6-7945-4bed-b29d-830ecf05dae9n@googlegroups.com>
<ygafstx52qy.fsf@akutech.de>
<e40add0b-c998-4f43-b08f-73d8fbbb5e84n@googlegroups.com>
<48babc4b-1fc6-4382-ad7c-d96f45b10bdan@googlegroups.com>
<4fe66c8a-5c94-45ae-9f96-171147baffb1n@googlegroups.com>
<6e992ae7-15db-44eb-ad54-bf88394d637en@googlegroups.com>
<789a58ef-da4d-4be0-a094-f71f4eaf0da4n@googlegroups.com>
<tpa5fb$390c2$1@dont-email.me> <ygazgaraerz.fsf@akutech.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 9 Jan 2023 19:17:09 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="0efcb01ff2595e05d879631ab518ed49";
logging-data="297316"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+G8+u3e6ueClgvzM2kDc1vQ5y59Qf+7Wc="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.6.1
Cancel-Lock: sha1:fY6WuVrncZyCTuyRlgX/EMjdUC4=
In-Reply-To: <ygazgaraerz.fsf@akutech.de>
 by: Paul Obermeier - Mon, 9 Jan 2023 19:17 UTC

Am 09.01.2023 um 16:50 schrieb Ralf Fassel:
> * Paul Obermeier <obermeier@poSoft.de>
>>
> | When configuring with "--enable-alsa" I get the following error when starting snack:
> | undefined symbol: _snd_pcm_mmap_hw_ptr
> | while executing "load /opt/Tcl/lib/snack2.2.11/libsnack.so"
>>
> | Which configure option are you using and which Linux distribution does it run for you?
>
> FWIW,
> we use snack2.2.10 (without MP3 which we don't need) on OpenSuse 15.4
> and Debian 11.
>
> Here are the patches that we apply to snack2.2.10:
>
> ==================================================
>
>
> --- snack2.2.10/generic/jkSoundEngine.c.orig
> +++ snack2.2.10/generic/jkSoundEngine.c
> @@ -1694,7 +1694,7 @@
>
> if (soundQueue != NULL) {
> for (p = soundQueue; p != NULL && p->sound != s; p = p->next);
> - if (p->sound == s) {
> + if (p && p->sound == s) {
> n = p->startPos + p->nWritten;
> }
> }
>
> ==================================================
>
>
> # https://bugs.gentoo.org/show_bug.cgi?id=226137
> # + double-close-protection
> --- snack2.2.10/unix/jkAudIO_alsa.c.orig
> +++ snack2.2.10/unix/jkAudIO_alsa.c
> @@ -49,6 +49,8 @@
>
> static int minNumChan = 1;
>
> +static snd_pcm_uframes_t hw_bufsize = 0;
> +
> int
> SnackAudioOpen(ADesc *A, Tcl_Interp *interp, char *device, int mode, int freq,
> int nchannels, int encoding)
> @@ -135,6 +137,9 @@
> Tcl_AppendResult(interp, "Failed setting HW params.", NULL);
> return TCL_ERROR;
> }
> +
> + snd_pcm_hw_params_get_buffer_size (hw_params, &hw_bufsize);
> +
> snd_pcm_hw_params_free(hw_params);
> snd_pcm_prepare(A->handle);
> if (A->mode == RECORD) {
> @@ -155,9 +160,11 @@
> {
> if (A->debug > 1) Snack_WriteLog(" Enter SnackAudioClose\n");
>
> - snd_pcm_drop(A->handle);
> - snd_pcm_close(A->handle);
> -
> + if (A->handle) {
> + snd_pcm_drop(A->handle);
> + snd_pcm_close(A->handle);
> + A->handle = NULL;
> + }
> if (A->debug > 1) Snack_WriteLog(" Exit SnackAudioClose\n");
>
> return(0);
> @@ -202,6 +209,8 @@
> int i;
> static char buf[64];
>
> + return;
> +
> if (A->debug > 1) Snack_WriteLog(" Enter SnackAudioPost\n");
>
> for (i = 0; i < 1000; i++) {
> @@ -267,12 +276,14 @@
> long
> SnackAudioPlayed(ADesc *A)
> {
> - long avail = _snd_pcm_mmap_hw_ptr(A->handle);
> + // FIX Here, _snd_pcm_mmap_hw_ptr is deprecated in new alsalib
> + long played = A->nWritten - (hw_bufsize - SnackAudioWriteable(A));
> + // long avail = _snd_pcm_mmap_hw_ptr(A->handle);
>
> - if (avail < 0)
> - avail = 0;
> + if (played < 0)
> + return 0;
>
> - return (avail+A->nPlayed);
> + return (played);
> }
>
> void
>
>
> ==================================================
>
> HTH
> R'

Hi Ralf,

thanks for the patches, which I detected yesterday.
I have tested the patches today successfully on Debian 10, Ubuntu 20 and SUSE 15.1.

Paul


devel / comp.lang.tcl / Re: Generating sound signals

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor