From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: blake@reproduciblemedia.com Newsgroups: gmane.lisp.guile.user Subject: Re: I've made a sound/audio thing Date: Sun, 04 Sep 2022 14:06:17 +0000 Message-ID: References: <017e97d7-bccd-e6a7-5ef2-55e302e8459e@posteo.de> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4863"; mail-complaints-to="usenet@ciao.gmane.io" To: "Zelphir Kaltstahl" , "Guile User" Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Sun Sep 04 16:06:42 2022 Return-path: Envelope-to: guile-user@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oUqGn-0000tD-O0 for guile-user@m.gmane-mx.org; Sun, 04 Sep 2022 16:06:42 +0200 Original-Received: from localhost ([::1]:35130 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oUqGm-0001Lx-Gd for guile-user@m.gmane-mx.org; Sun, 04 Sep 2022 10:06:40 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43724) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oUqGY-0001Lp-Bq for guile-user@gnu.org; Sun, 04 Sep 2022 10:06:26 -0400 Original-Received: from out0.migadu.com ([2001:41d0:2:267::]:56211) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oUqGV-0002Dg-FX for guile-user@gnu.org; Sun, 04 Sep 2022 10:06:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=reproduciblemedia.com; s=key1; t=1662300378; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=eK4FBK+uvIUKjwPFOhaMk4QNQdOwv/Ji0ot/SW3MKRw=; b=kv+dg/JbRUTUOhPKpPa09pjv+8fBLWb54lhy7sXF8MBGckKHTwno3pDcIezB9oyWqamMpm PjDVqSOX3lx3ujO+rqAa6Z5x3LWVO6rxy+9xitv/UIU34XG72wcbZQ9+FQpPrpjdKOr1ab V41vtcHJC2jZ5diB8ativel2v22D/Xc= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. In-Reply-To: <017e97d7-bccd-e6a7-5ef2-55e302e8459e@posteo.de> X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: reproduciblemedia.com Received-SPF: pass client-ip=2001:41d0:2:267::; envelope-from=blake@reproduciblemedia.com; helo=out0.migadu.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.io gmane.lisp.guile.user:18569 Archived-At: Very cool, I look forward to checking it out!=0A=0A=0A=0ASeptember 4, 202= 2 12:16 PM, "Zelphir Kaltstahl" wrote:=0A=0A= > Hello Guile users!=0A> =0A> Recently I've looked at "how to write a wav= file?" and wrote some code to output in RIFF-WAVE fie=0A> format: https:= //notabug.org/ZelphirKaltstahl/guile-examples/src/master/sound/riff-wave.= It only=0A> writes a file currently, and does not read in any files yet.= Hopefully I will work on it more soon.=0A> =0A> My idea is, that Guile s= hould be kind of perfect for making functions, which output sample values= .=0A> Just combining functions. I want to make more effects like fade-in = and fade out, amplify, change of=0A> sample rate or whatever else is simp= le to do. Already implemented things like a function to make=0A> another = function "stepped" (is what I call it), so that one only gives an integer= and it will give=0A> the sample of the index that is that integer, consi= dering a previously given step size.=0A> =0A> I imagine, that it should b= e possible, to build good abstractions over sample values and then give= =0A> helper functions allowing anyone to make their own effects and so on= . When reading in files is=0A> implemented, one could easily write a litt= le Guile code and apply effects to any wav file.=0A> =0A> I know libsndfi= le exists and perhaps I should be using FFI to interface with it, but I s= till have=0A> not gotten around to learning more about how to use FFI and= also I made the mistake of looking at=0A> the implementation of wav file= format in the libsndfile library =E2=80=A6 biiig mistake :D Well, I also= =0A> would probably not have learned as much about wav files and some byt= evector and vector stuff, if I=0A> had used libsndfile. Though more about= FFI =E2=80=A6=0A> =0A> Will see how far I take it : )=0A> =0A> Best rega= rds,=0A> Zelphir=0A> =0A> -- repositories: https://notabug.org/ZelphirKal= tstahl