shithub: rc

Download patch

ref: 9985addd01611707400ea0d840819af260154e40
parent: 8de9a4a06d6d5cc8246464f3835cfe885cf6efcc
author: qwx <qwx@sciops.net>
date: Mon Sep 4 21:13:12 EDT 2023

fn: change pplay default font to a smaller one

--- a/fn
+++ b/fn
@@ -2,9 +2,9 @@
 # playback samples from microphone (needs setup)
 fn admp{ dd -bs 4x441 </dev/audio >/dev/audio }
 # decode audio files(s) and visualize with pplay(1)
-fn pcm{ @{o=(); while(~ $1 -?) o=($o $1) && shift; play -o /fd/1 $* >[2]/dev/null | audio/pplay -b $o}}
+fn pcm{ @{font=/lib/font/bit/terminus/unicode.12m.font; o=(); while(~ $1 -?) o=($o $1) && shift; play -o /fd/1 $* >[2]/dev/null | audio/pplay -b $o}}
 # same, without temporary variables (???)
-fn ppcm{ *=($*($#*) $* $#*) play -o /fd/1 $1 >[2]/dev/null | audio/pplay -b $*(2-$*($#*)) }
+fn ppcm{ @{*=($*($#*) $* $#*) font=/lib/font/bit/terminus/unicode.12m.font play -o /fd/1 $1 >[2]/dev/null | audio/pplay -b $*(2-$*($#*))} }
 # convert a wolf3d digital audio lump
 fn wpcm{ audio/pcmconv -i u8c1r7000 -o s16c2r44100 <$1 >/dev/audio }
 # indispensible