From unknown Mon Jun 16 23:40:58 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#73891 <73891@debbugs.gnu.org> To: bug#73891 <73891@debbugs.gnu.org> Subject: Status: [PATCH] Add ability to crossfade between songs in 'mpc' Reply-To: bug#73891 <73891@debbugs.gnu.org> Date: Tue, 17 Jun 2025 06:40:58 +0000 retitle 73891 [PATCH] Add ability to crossfade between songs in 'mpc' reassign 73891 emacs submitter 73891 john muhl severity 73891 normal tag 73891 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 19 17:25:11 2024 Received: (at submit) by debbugs.gnu.org; 19 Oct 2024 21:25:11 +0000 Received: from localhost ([127.0.0.1]:44954 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t2Gwh-00050b-7T for submit@debbugs.gnu.org; Sat, 19 Oct 2024 17:25:11 -0400 Received: from lists.gnu.org ([209.51.188.17]:38822) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t2Gwd-00050P-Or for submit@debbugs.gnu.org; Sat, 19 Oct 2024 17:25:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t2GwF-0004j3-89 for bug-gnu-emacs@gnu.org; Sat, 19 Oct 2024 17:24:43 -0400 Received: from fhigh-a7-smtp.messagingengine.com ([103.168.172.158]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t2GwD-0000Rn-Dl for bug-gnu-emacs@gnu.org; Sat, 19 Oct 2024 17:24:42 -0400 Received: from phl-compute-01.internal (phl-compute-01.phl.internal [10.202.2.41]) by mailfhigh.phl.internal (Postfix) with ESMTP id 98FF71140124 for ; Sat, 19 Oct 2024 17:24:38 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-01.internal (MEProxy); Sat, 19 Oct 2024 17:24:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pub.pink; h=cc :content-type:content-type:date:date:from:from:in-reply-to :message-id:mime-version:reply-to:subject:subject:to:to; s=fm2; t=1729373078; x=1729459478; bh=GkBLz65stC2qMjMOhZwVOzBclLfNFvKq o+ABVkISSWU=; b=GwPuoKO0AuEMzuByTALnoAAG0xk3ON440LB06YgxTwlbwWTA xNPPXW0cT7LRM9JeaEHHGjmyjA/1QqP1vhm+7fJN86C6XB2lumUcyMCakCE68tSf kFLBXcZILJ7zieIDSkUlTz7mC1mg3K5u6j1HFZJSc/k5iOG394oQ5J4eF4sGTvKN t/HV0LiEUb+EztosIgdKvkIXlzE4gOAX4OxtI+VDMGdoCPyd2+TsWYsvdIhv66+a 50bv1FyyjTt+snqEF1wElC411BM7ibkHUkZIgzHfFO1d395mGPf1yMURInCiSCJn vnFOhKF9ah8sNDAbHdQQdhr3a3bB9ghTsOQjFg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:message-id :mime-version:reply-to:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1729373078; x=1729459478; bh=GkBLz65stC2qMjMOhZwVOzBclLfNFvKqo+A BVkISSWU=; b=QVPnd7qZ2gZOWOY8/8tGBstTjcBFJqGj5fjm3ET/o81xNSBCuvx ZyLRtD5cHtYbIfog77W6XZGMyfQznWMSF84AnDdRv9prvDh149v6S57HVYMHZMGO fsfPGNj9TNUymu4gTN+fFFA546UfxTEJ5lZC/t3X/fgu0hx4g0GtpcmUulv5G3OC wrl9GUUPnPB8vHpNbhOC8oq3qDiW/rQfBjocnRndBs1VBMWiFhWFJZy6vTviXQ0T UUvflQmJvF8veNhA0uP3wy8cIhN2zhtE4rDTaomuuFc+5HqN+bIuu9QYmX/aMUw/ Oz/nvwhOQ8pbg/UUJ0yOfDk8nWgCWAHkHZA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvdehhedgudeigecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecunecujfgurhephffvuf ffkfggtgesthdtredttddttdenucfhrhhomhepjhhohhhnuchmuhhhlhcuoehjmhesphhu sgdrphhinhhkqeenucggtffrrghtthgvrhhnpeeghfdukeeuheduuefghffggeefvefhte ejhefhueelfffggeeutdffvdetueetudenucevlhhushhtvghrufhiiigvpedtnecurfgr rhgrmhepmhgrihhlfhhrohhmpehjmhesphhusgdrphhinhhkpdhnsggprhgtphhtthhope dupdhmohguvgepshhmthhpohhuthdprhgtphhtthhopegsuhhgqdhgnhhuqdgvmhgrtghs sehgnhhurdhorhhg X-ME-Proxy: Feedback-ID: i74194916:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Sat, 19 Oct 2024 17:24:37 -0400 (EDT) From: john muhl To: bug-gnu-emacs@gnu.org Subject: [PATCH] Add ability to crossfade between songs in 'mpc' X-Debbugs-Cc: Stefan Monnier Date: Sat, 19 Oct 2024 16:24:36 -0500 Message-ID: <87y12jvl9n.fsf@pub.pink> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=103.168.172.158; envelope-from=jm@pub.pink; helo=fhigh-a7-smtp.messagingengine.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, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.6 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.6 (--) Tags: patch Another small addition for mpc so that you can toggle the crossfader. p.s. I noticed the use of (cdr (assq 'etc ...)) throughout and guessed that was because mpc predates alist-get but if there is a preference I can change it to match the other mpc-toggle-* functions. From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 19 17:28:25 2024 Received: (at 73891) by debbugs.gnu.org; 19 Oct 2024 21:28:25 +0000 Received: from localhost ([127.0.0.1]:44964 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t2Gzo-0005Cu-OH for submit@debbugs.gnu.org; Sat, 19 Oct 2024 17:28:25 -0400 Received: from fout-a3-smtp.messagingengine.com ([103.168.172.146]:56487) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t2Gzm-0005Ce-Rr for 73891@debbugs.gnu.org; Sat, 19 Oct 2024 17:28:23 -0400 Received: from phl-compute-07.internal (phl-compute-07.phl.internal [10.202.2.47]) by mailfout.phl.internal (Postfix) with ESMTP id C302B1380088; Sat, 19 Oct 2024 17:27:52 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-07.internal (MEProxy); Sat, 19 Oct 2024 17:27:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pub.pink; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1729373272; x=1729459672; bh=auRkqhBEtE d4e8ESt3De4dWJi/RaR7De51KvpWGbQe8=; b=GlkeUy+q5lO9Y1Lclw76aTMqmH QABDvv8L49pc+MMSUzE7QnvrEA5fNPIJiNIdxpM9tBOLJ0wT6ajMYw72slnJO8Da YqZJROwYouwyIMEJwJyBeb/fpkCWR9mHVnjpCgZ75h+WXsyzFAPeRInj6N4wzYbC bUPUqgMk0VyMvnHEcUC6YtA7IMkB/wL34QaYUijjZKceSM7BWL0WangaI0txhCkt eeqqI1iZfU5mGq/zrgAsot3FaTgzkoY8weOq4F9FZz2QAMoQ3oJR0M/VGVywOAp6 Y0WKzhpKK7ny46rNYYctycCwuOpU38DGokI5/K0Wnn+N5rGL8hoLym+t5HXg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1729373272; x=1729459672; bh=auRkqhBEtEd4e8ESt3De4dWJi/Ra R7De51KvpWGbQe8=; b=ByM7rosdPyIq9Vbzn5Z/sXOb59zm1nBb6+76ghHTVQjh aQHbpj9TIkYzh7BSxDyqrax9Z2LJ9XGo1v+SegY8Iez66Bj/N3RDLg3gNEhF/sN5 /SrEDcDzLsfffNT1ALpOSUBbBFihQDQ7TMYeFMS/3WalnX8IFRH3TbiyL1H7o0Ma dHH169V1tWmpUBUjrFp81zrcEg4ojqo8CyJ/8khBMbcs1zhyXE2bep9J0HL6h3Bs hnd9HmeINkSenI/FNhH7HchZ/7KVOSiZ9t44FAXe/TAtml0MjoE4+7OXPzCpMwrd QfVkEvpFDe/UxcgzTRwag3IuL0ddyyTsu0qqFPQDHg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvdehhedgudeigecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefhvfevufgjfhgffffkgggtsehmtderredtredt necuhfhrohhmpehjohhhnhcumhhuhhhluceojhhmsehpuhgsrdhpihhnkheqnecuggftrf grthhtvghrnhepffduledtfffhjeduheeghfefledtfeetfffgtdevleeiudehueffudej veffvddtnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh epjhhmsehpuhgsrdhpihhnkhdpnhgspghrtghpthhtohepvddpmhhouggvpehsmhhtphho uhhtpdhrtghpthhtohepmhhonhhnihgvrhesihhrohdruhhmohhnthhrvggrlhdrtggrpd hrtghpthhtohepjeefkeeludesuggvsggsuhhgshdrghhnuhdrohhrgh X-ME-Proxy: Feedback-ID: i74194916:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 19 Oct 2024 17:27:52 -0400 (EDT) From: john muhl To: 73891@debbugs.gnu.org Subject: Re: bug#73891: [PATCH] Add ability to crossfade between songs in 'mpc' In-Reply-To: <87y12jvl9n.fsf@pub.pink> (john muhl's message of "Sat, 19 Oct 2024 16:24:36 -0500") References: <87y12jvl9n.fsf@pub.pink> User-Agent: mu4e 1.12.1; emacs 31.0.50 Date: Sat, 19 Oct 2024 16:27:51 -0500 Message-ID: <87plnvvl48.fsf@pub.pink> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 73891 Cc: Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-=-= Content-Type: text/plain And the patch... --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Add-ability-to-crossfade-between-songs-in-mpc.patch >From e2855c6493d8d0ab06a97452b567e87701754601 Mon Sep 17 00:00:00 2001 From: john muhl Date: Sat, 28 Sep 2024 19:11:03 -0500 Subject: [PATCH] Add ability to crossfade between songs in 'mpc' * lisp/mpc.el (mpc-cmd-crossfade): (mpc-toggle-crossfade): New function. (mpc-crossfade-time): New option. (mpc-mode-menu): Add menu item to toggle crossfade. (Bug#73891) --- lisp/mpc.el | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/lisp/mpc.el b/lisp/mpc.el index 9905e3aa554..01876bf230b 100644 --- a/lisp/mpc.el +++ b/lisp/mpc.el @@ -883,6 +883,11 @@ mpc-cmd-update (defun mpc-cmd-tagtypes () (mapcar #'cdr (mpc-proc-cmd-to-alist "tagtypes"))) +(defun mpc-cmd-crossfade (&optional arg) + "Set duration of crossfade to `mpc-crossfade-time' or ARG seconds." + (mpc-proc-cmd (list "crossfade" (or arg mpc-crossfade-time)) + #'mpc-status-refresh)) + ;; This was never integrated into MPD. ;; (defun mpc-cmd-download (file) ;; (with-current-buffer (generate-new-buffer " *mpc download*") @@ -918,6 +923,11 @@ mpc-data-directory "Directory where MPC.el stores auxiliary data." :type 'directory) +(defcustom mpc-crossfade-time 3 + "Number of seconds to crossfade between songs." + :version "31.1" + :type 'natnum) + (defun mpc-data-directory () (unless (file-directory-p mpc-data-directory) (make-directory mpc-data-directory)) @@ -1188,6 +1198,8 @@ mpc-mode-menu :selected (member '(single . "1") mpc-status)] ["Consume Mode" mpc-toggle-consume :style toggle :selected (member '(consume . "1") mpc-status)] + ["Crossfade Songs" mpc-toggle-crossfade :style toggle + :selected (alist-get 'xfade mpc-status)] "--" ["Add new browser" mpc-tagbrowser] ["Update DB" mpc-update] @@ -2428,6 +2440,12 @@ mpc-toggle-shuffle (mpc-cmd-random (if (string= "0" (cdr (assq 'random (mpc-cmd-status)))) "1" "0"))) +(defun mpc-toggle-crossfade () + "Toggle crossfading between songs." + (interactive) + (mpc-cmd-crossfade + (if (alist-get 'xfade mpc-status) "0" mpc-crossfade-time))) + (defun mpc-stop () "Stop playing the current queue of songs." (interactive) -- 2.46.2 --=-=-= Content-Type: text/plain john muhl writes: > Tags: patch > > Another small addition for mpc so that you can toggle the > crossfader. > > p.s. I noticed the use of (cdr (assq 'etc ...)) throughout and > guessed that was because mpc predates alist-get but if there is a > preference I can change it to match the other mpc-toggle-* > functions. --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 19 17:41:02 2024 Received: (at 73891) by debbugs.gnu.org; 19 Oct 2024 21:41:02 +0000 Received: from localhost ([127.0.0.1]:44978 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t2HC2-0005vS-6r for submit@debbugs.gnu.org; Sat, 19 Oct 2024 17:41:02 -0400 Received: from fout-a3-smtp.messagingengine.com ([103.168.172.146]:55823) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t2HBy-0005un-M0 for 73891@debbugs.gnu.org; Sat, 19 Oct 2024 17:41:00 -0400 Received: from phl-compute-01.internal (phl-compute-01.phl.internal [10.202.2.41]) by mailfout.phl.internal (Postfix) with ESMTP id 4418313801E1; Sat, 19 Oct 2024 17:40:29 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-01.internal (MEProxy); Sat, 19 Oct 2024 17:40:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pub.pink; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1729374029; x=1729460429; bh=zHOGEzo9aI u0tYmfNPHwdLILPTOk8R4phKfenBn8fVk=; b=hkrgYOwRQGLcmKNYY+wyxVGdzA jF92qdsDRQ14iZ1cpaC4rcnre9r6CukR9zC2HkDh7PZfikPcx5KrgaWUXib4CmZT M8A1dDdol+BCx1118aB7Xigzh7yHXzJYqjL3ef+KogtVY6QRwL4qBJrKhL1sXsRh CcFS3DVEYZYiH0MAQ6ec7WmAokqlzl7QE+o8vBhB2OdUkhylkFhcDechZBLAYUDJ qUt1pv/jX/LJ0AZPNAPwhxMYCn0zirk3NogXQB0XSspa1dV+LEVEB4x0ojM+VuGB U71h/jmXMcaY0/bNv5CfhSxzlWxOyqgKBcBpSrFVjI7TfgAAMPeazwT5g1zA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1729374029; x=1729460429; bh=zHOGEzo9aIu0tYmfNPHwdLILPTOk 8R4phKfenBn8fVk=; b=JPPf7/fAX61hLoVLmb3q5n3dIyZvIIFb4PkxsE+BOhY2 T9SOxVC0vJUagxmK3pNFgkp4y/RPq4m0IMeuTU8W25M430UsaNqIh1OJzrjTweSH i7CQLgMy1QDeyR5mMm8/x7aih1oFKruw6SyFJYeHbt93tvm5df0Mcqq2QxSQJdm4 vD6UHgnovSLsd8rKEPTQx4BDUjkjaaauS0tdcvopp2CGBD4BIFP+v9SSMKLWr59I Vdo+/OM3HoifZoKUzI/YuiHMZ/h3Yb3RRFI+9cAHNFGdNja+F5O0zGirLr8R0gY+ WppAwz+TAzqqRBZlQgkYnobCoPuNWW08GRInjZi79g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvdehiedgtdduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhephffvvefujghffgffkfggtgesmhdtreertdertden ucfhrhhomhepjhhohhhnuchmuhhhlhcuoehjmhesphhusgdrphhinhhkqeenucggtffrrg htthgvrhhnpeffudeltdffhfejudehgefhfeeltdefteffgfdtveelieduheeuffdujeev ffdvtdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe hjmhesphhusgdrphhinhhkpdhnsggprhgtphhtthhopedvpdhmohguvgepshhmthhpohhu thdprhgtphhtthhopehmohhnnhhivghrsehirhhordhumhhonhhtrhgvrghlrdgtrgdprh gtphhtthhopeejfeekleduseguvggssghughhsrdhgnhhurdhorhhg X-ME-Proxy: Feedback-ID: i74194916:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 19 Oct 2024 17:40:28 -0400 (EDT) From: john muhl To: 73891@debbugs.gnu.org Subject: Re: bug#73891: [PATCH] Add ability to crossfade between songs in 'mpc' In-Reply-To: <87plnvvl48.fsf@pub.pink> (john muhl's message of "Sat, 19 Oct 2024 16:27:51 -0500") References: <87y12jvl9n.fsf@pub.pink> <87plnvvl48.fsf@pub.pink> User-Agent: mu4e 1.12.1; emacs 31.0.50 Date: Sat, 19 Oct 2024 16:40:27 -0500 Message-ID: <87a5ezvkj8.fsf@pub.pink> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 73891 Cc: Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-=-= Content-Type: text/plain Err. I guess it should have a NEWS entry too. Sorry for the flood. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Add-ability-to-crossfade-between-songs-in-mpc.patch >From 984eccb981127b417fd883e03e4cd7ab38baa06c Mon Sep 17 00:00:00 2001 From: john muhl Date: Sat, 28 Sep 2024 19:11:03 -0500 Subject: [PATCH] Add ability to crossfade between songs in 'mpc' * lisp/mpc.el (mpc-cmd-crossfade): (mpc-toggle-crossfade): New function. (mpc-crossfade-time): New option. (mpc-mode-menu): Add menu item to toggle crossfade. (Bug#73891) --- etc/NEWS | 5 +++++ lisp/mpc.el | 18 ++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/etc/NEWS b/etc/NEWS index a889528ab6a..cfc5a8e1785 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -582,6 +582,11 @@ a desktop notification when the song changes, using customized using the new user options 'mpc-notifications-title' and 'mpc-notifications-body'. +*** New user option 'mpc-crossfade-time'. +When non-nil, MPC will crossfade between songs for the specified number +of seconds. Crossfading can be toggled using the command +'mpc-toggle-crossfade' or from the MPC menu. + * New Modes and Packages in Emacs 31.1 diff --git a/lisp/mpc.el b/lisp/mpc.el index 9905e3aa554..01876bf230b 100644 --- a/lisp/mpc.el +++ b/lisp/mpc.el @@ -883,6 +883,11 @@ mpc-cmd-update (defun mpc-cmd-tagtypes () (mapcar #'cdr (mpc-proc-cmd-to-alist "tagtypes"))) +(defun mpc-cmd-crossfade (&optional arg) + "Set duration of crossfade to `mpc-crossfade-time' or ARG seconds." + (mpc-proc-cmd (list "crossfade" (or arg mpc-crossfade-time)) + #'mpc-status-refresh)) + ;; This was never integrated into MPD. ;; (defun mpc-cmd-download (file) ;; (with-current-buffer (generate-new-buffer " *mpc download*") @@ -918,6 +923,11 @@ mpc-data-directory "Directory where MPC.el stores auxiliary data." :type 'directory) +(defcustom mpc-crossfade-time 3 + "Number of seconds to crossfade between songs." + :version "31.1" + :type 'natnum) + (defun mpc-data-directory () (unless (file-directory-p mpc-data-directory) (make-directory mpc-data-directory)) @@ -1188,6 +1198,8 @@ mpc-mode-menu :selected (member '(single . "1") mpc-status)] ["Consume Mode" mpc-toggle-consume :style toggle :selected (member '(consume . "1") mpc-status)] + ["Crossfade Songs" mpc-toggle-crossfade :style toggle + :selected (alist-get 'xfade mpc-status)] "--" ["Add new browser" mpc-tagbrowser] ["Update DB" mpc-update] @@ -2428,6 +2440,12 @@ mpc-toggle-shuffle (mpc-cmd-random (if (string= "0" (cdr (assq 'random (mpc-cmd-status)))) "1" "0"))) +(defun mpc-toggle-crossfade () + "Toggle crossfading between songs." + (interactive) + (mpc-cmd-crossfade + (if (alist-get 'xfade mpc-status) "0" mpc-crossfade-time))) + (defun mpc-stop () "Stop playing the current queue of songs." (interactive) -- 2.46.2 --=-=-= Content-Type: text/plain john muhl writes: > And the patch... > > [2. text/x-patch; 0001-Add-ability-to-crossfade-between-songs-in-mpc.patch]... > > > > john muhl writes: > >> Tags: patch >> >> Another small addition for mpc so that you can toggle the >> crossfader. >> >> p.s. I noticed the use of (cdr (assq 'etc ...)) throughout and >> guessed that was because mpc predates alist-get but if there is a >> preference I can change it to match the other mpc-toggle-* >> functions. --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 19 22:31:45 2024 Received: (at 73891) by debbugs.gnu.org; 20 Oct 2024 02:31:45 +0000 Received: from localhost ([127.0.0.1]:45275 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t2LjN-0002HI-3T for submit@debbugs.gnu.org; Sat, 19 Oct 2024 22:31:45 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:62140) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t2LjL-0002H5-59 for 73891@debbugs.gnu.org; Sat, 19 Oct 2024 22:31:43 -0400 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 36A52441859; Sat, 19 Oct 2024 22:31:13 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1729391471; bh=t5HPm4hE1NUiGcfT9lzzEFjT51qhatgLM2+heVlUmVc=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=iPQ10otXiBMtxKLhMygng86MXKQ0TmlrHG0yPlK499GKkgO2Ee7M42ec48T9oiXtY CKXS49GfEkXVDDq6bhflpqJ5g3bqFv3ZqjWItVq1bVw7f+WhIHTH1wtt3pCIRg+BSp FyP0pNtTWqU6iWOP2eQuLLxidb//8zjt05hcdODNt/p55YO9HoU0rotL47qFGLgpeK nl0yi93Pl0o9Dk6z8FYpPSz1QrPk0AZ2oXL9lCTd9HZlOx7GoE8Pno0ZkejLq5gQvU mcZQsg90auiJq6NLwLlmC4TDBv/8R16P/DlhEIXi7j3zi29BoTKMrXSlBKwaYl0bSA w4KeulBpnB+XQ== Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id D65C544183F; Sat, 19 Oct 2024 22:31:11 -0400 (EDT) Received: from pastel (69-196-161-60.dsl.teksavvy.com [69.196.161.60]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id AF8E312041B; Sat, 19 Oct 2024 22:31:11 -0400 (EDT) From: Stefan Monnier To: john muhl Subject: Re: bug#73891: [PATCH] Add ability to crossfade between songs in 'mpc' In-Reply-To: <87a5ezvkj8.fsf@pub.pink> (john muhl's message of "Sat, 19 Oct 2024 16:40:27 -0500") Message-ID: References: <87y12jvl9n.fsf@pub.pink> <87plnvvl48.fsf@pub.pink> <87a5ezvkj8.fsf@pub.pink> Date: Sat, 19 Oct 2024 22:31:10 -0400 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 73891 Cc: 73891@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) john muhl [2024-10-19 16:40:27] wrote: > p.s. I noticed the use of (cdr (assq 'etc ...)) throughout and > guessed that was because mpc predates alist-get That's right. > but if there is a preference I can change it to match the other > mpc-toggle-* functions. No, no, `alist-get` is fine, thanks. > And the patch... Pushed to `master`, thanks. Stefan From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 21 14:22:29 2024 Received: (at 73891-done) by debbugs.gnu.org; 21 Oct 2024 18:22:29 +0000 Received: from localhost ([127.0.0.1]:53319 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t2x2z-00075n-3Y for submit@debbugs.gnu.org; Mon, 21 Oct 2024 14:22:29 -0400 Received: from fout-a6-smtp.messagingengine.com ([103.168.172.149]:33601) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t2x2t-00075T-D8 for 73891-done@debbugs.gnu.org; Mon, 21 Oct 2024 14:22:27 -0400 Received: from phl-compute-08.internal (phl-compute-08.phl.internal [10.202.2.48]) by mailfout.phl.internal (Postfix) with ESMTP id 1803E138020A for <73891-done@debbugs.gnu.org>; Mon, 21 Oct 2024 14:21:51 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-08.internal (MEProxy); Mon, 21 Oct 2024 14:21:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pub.pink; h=cc :content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1729534911; x=1729621311; bh=WZvROnXSYc HcVq9KhI5Cxuilb0ce5/pnAdUxKKXD5bM=; b=evNHlgyaiJIiGwmRLZVHL/EXxa yvDW49NGxWnEep+xqlMrV5bXepkTvZHTXvRwlZRSkBqi5psungkxb/MfMuBMVb7R 5CiIoVq9TJlLGkvIg8Pbkw3XJiKRu+ycCwr6oLgtPlSlKCFYD6oWnpbfG/Ycp6oO 2g8dEdkFw2HdCO2EvbltZP79hr4vYRg/GEehjPLbSxiY7HolLqoSMqnQb81M8+X1 0r5CQI46XZRIsj2BihlBUQESVrtusZK/IJ2mYXmS1ld9qfSErpSeYaNmcw23kOPr ru3e2wQcU0nTPPwYvPZ78q8w9PMiRMNLz3LCz4matOcywkIc2nBOz+oFoV4g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; t=1729534911; x=1729621311; bh=WZvROnXSYcHcVq9KhI5Cxuilb0ce 5/pnAdUxKKXD5bM=; b=dHroPfl2lLLWCyAT2lHMrc0355hj3sFVAYE6MiLDSFZY VmM5dISdj9TMmccwB+opPutbsfDyUGRExYgtAbKh5h0lRl7uO61md/icpOJWXd/Q ECCx67cjnCg2sizLvLS7kCEOJaoeO59LSbdBF3GIDUEF2/R5M037NVre/wNKNsdF wpOR04mGtUTUJs2kMU4zkEip9mhLBDILa3V2CnRqWA6wPGULiSxDZ58BjwydIFv1 yiX5uc5ZjiHL2LjcHNXvRNSfZa3cSlON7aR4xQeg/6Ta68JYQ6W85grtgg/+i42T KYOqORklcfLP0E1KjtbPUzpsf/+p6GbgnWsqUX7QYg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvdehledguddvgecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecunecujfgurhephffvuf gjfhgffffkgggtsehttdertddtredtnecuhfhrohhmpehjohhhnhcumhhuhhhluceojhhm sehpuhgsrdhpihhnkheqnecuggftrfgrthhtvghrnhepvdekheeuieetledtfeekueetje ffveeggeeggefhkeelgedufedttdejledufffhnecuvehluhhsthgvrhfuihiivgeptden ucfrrghrrghmpehmrghilhhfrhhomhepjhhmsehpuhgsrdhpihhnkhdpnhgspghrtghpth htohepuddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepjeefkeeluddqughonhgv seguvggssghughhsrdhgnhhurdhorhhg X-ME-Proxy: Feedback-ID: i74194916:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for <73891-done@debbugs.gnu.org>; Mon, 21 Oct 2024 14:21:50 -0400 (EDT) From: john muhl To: 73891-done@debbugs.gnu.org Subject: Re: bug#73891: [PATCH] Add ability to crossfade between songs in 'mpc' In-Reply-To: (Stefan Monnier via's message of "Sat, 19 Oct 2024 22:31:10 -0400") References: <87y12jvl9n.fsf@pub.pink> <87plnvvl48.fsf@pub.pink> <87a5ezvkj8.fsf@pub.pink> User-Agent: mu4e 1.12.1; emacs 31.0.50 Date: Mon, 21 Oct 2024 13:21:49 -0500 Message-ID: <87iktlgvuq.fsf@pub.pink> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 73891-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Thanks. Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" writes: > john muhl [2024-10-19 16:40:27] wrote: >> p.s. I noticed the use of (cdr (assq 'etc ...)) throughout and >> guessed that was because mpc predates alist-get > > That's right. > >> but if there is a preference I can change it to match the other >> mpc-toggle-* functions. > > No, no, `alist-get` is fine, thanks. > >> And the patch... > > Pushed to `master`, thanks. > > > Stefan From unknown Mon Jun 16 23:40:58 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 19 Nov 2024 12:24:28 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator