From anders.vinjar at bek.no Mon Nov 5 07:50:26 2018 From: anders.vinjar at bek.no (anders.vinjar at bek.no) Date: Mon, 05 Nov 2018 16:50:26 +0100 Subject: [CM] snd: srate implicitly corrected in play ? Message-ID: <87lg671q2l.fsf@bek.no> Hi. Having jackd running in 44.1 kHz sampling rate, if i load a 48k soundfile in Snd, hit play, the playback sounds 'correct', ie. with speed/src applied to the player to make the file play (through jack) as if it were already resampled to 44.1k. Is this default behavior configured somewhere as a variable, or any place in the docs mentioning this? -anders From k.s.matheussen at gmail.com Mon Nov 5 08:05:52 2018 From: k.s.matheussen at gmail.com (Kjetil Matheussen) Date: Mon, 5 Nov 2018 17:05:52 +0100 Subject: [CM] snd: srate implicitly corrected in play ? In-Reply-To: <87lg671q2l.fsf@bek.no> References: <87lg671q2l.fsf@bek.no> Message-ID: On Mon, Nov 5, 2018 at 4:58 PM wrote: > > Hi. > > Having jackd running in 44.1 kHz sampling rate, if i load a 48k > soundfile in Snd, hit play, the playback sounds 'correct', ie. with > speed/src applied to the player to make the file play (through jack) as > if it were already resampled to 44.1k. > > Is this default behavior configured somewhere as a variable, or any > place in the docs mentioning this? > Hi, I wrote the code. You can't turn it off in configuration, but this patch should fix it: --- audio.c~ 2018-08-31 22:16:12.000000000 +0200 +++ audio.c 2018-11-05 17:02:42.669843114 +0100 @@ -4465,7 +4465,7 @@ sj_readplace=0; - if (srate!=(int)jack_get_sample_rate(sndjack_client)){ + if (false && srate!=(int)jack_get_sample_rate(sndjack_client)){ int lokke; //printf("Warning, sample-rate differs between snd and jack. Sound will not be played correctly! %d/%d\n",srate,jack_get_sample_rate(sndjack_client)); sndjack_srcratio=(double)jack_get_sample_rate(sndjack_client)/(double)srate; From anders.vinjar at bek.no Mon Nov 5 11:03:33 2018 From: anders.vinjar at bek.no (anders.vinjar at bek.no) Date: Mon, 05 Nov 2018 20:03:33 +0100 Subject: [CM] snd: srate implicitly corrected in play ? References: <87lg671q2l.fsf@bek.no> Message-ID: <87h8gv1h4q.fsf@bek.no> K> Hi, I wrote the code. You can't turn it off in configuration, but K> this patch should fix it: Right, good to know where things happen if i would ever need it. -anders From cm at jrigg.co.uk Mon Nov 5 13:28:51 2018 From: cm at jrigg.co.uk (John Rigg) Date: Mon, 5 Nov 2018 21:28:51 +0000 Subject: [CM] snd: srate implicitly corrected in play ? In-Reply-To: References: <87lg671q2l.fsf@bek.no> Message-ID: <20181105212851.GB6450@localhost.localdomain> On Mon, Nov 05, 2018 at 05:05:52PM +0100, Kjetil Matheussen wrote: > Warning, sample-rate differs between snd and jack. > Sound will not be played correctly! I'd regard playback at the wrong pitch as correct in this situation ;-) John From bil at ccrma.Stanford.EDU Mon Nov 5 16:22:52 2018 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Mon, 05 Nov 2018 16:22:52 -0800 Subject: [CM] =?utf-8?q?snd=3A_srate_implicitly_corrected_in_play_=3F?= In-Reply-To: References: <87lg671q2l.fsf@bek.no> Message-ID: <0e7862222748d95f62e76fb1723d7b4f@ccrma.stanford.edu> I think we could add a compile-time switch there, if you like. From cm at jrigg.co.uk Tue Nov 6 02:41:35 2018 From: cm at jrigg.co.uk (John Rigg) Date: Tue, 6 Nov 2018 10:41:35 +0000 Subject: [CM] snd: srate implicitly corrected in play ? In-Reply-To: <0e7862222748d95f62e76fb1723d7b4f@ccrma.stanford.edu> References: <87lg671q2l.fsf@bek.no> <0e7862222748d95f62e76fb1723d7b4f@ccrma.stanford.edu> Message-ID: <20181106104135.GA13390@localhost.localdomain> On Mon, Nov 05, 2018 at 04:22:52PM -0800, bil at ccrma.Stanford.EDU wrote: > I think we could add a compile-time switch there, if you like. That would be useful here. I'd rather not have implicit SRC as it makes it too easy (for me) to make mistakes. John From bil at ccrma.Stanford.EDU Thu Nov 8 09:35:34 2018 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Thu, 08 Nov 2018 09:35:34 -0800 Subject: [CM] =?utf-8?q?snd=3A_srate_implicitly_corrected_in_play_=3F?= In-Reply-To: <87h8gv1h4q.fsf@bek.no> References: <87lg671q2l.fsf@bek.no> <87h8gv1h4q.fsf@bek.no> Message-ID: <1da8cb04d7ba88bc1115b36a39cf7ff9@ccrma.stanford.edu> I added the switch JACK_AUTO_SRC for this (defaults to 1). I'll update the ccrma versions later today. From bil at ccrma.Stanford.EDU Tue Nov 20 04:12:35 2018 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Tue, 20 Nov 2018 04:12:35 -0800 Subject: [CM] Snd 18.9 Message-ID: Snd 18.9: Kjetil updated the s7webserver directory s7: variables can be statically typed via the built-in type checkers like integer? for example, (set! (setter 'x) integer?) audio.c: added JACK_AUTO_SRC (defaults to 1). checked: FC 29 (gcc 8.2.1), macOS Mojave, sbcl 1.4.13 Thanks!: Kjetil Matheussen