I learned some sndio and did some FFI in Scheme

This snippet plays a sine wave, and if you structure the code differently it allows you to livecode audio (directly on the audio thread, bytebeat-style). There is a crappy example at the bottom, for use with guile --listen + geiser-connect in another terminal window

I've got some more thoughts in the README, about livecoding audio synthesis approaches

https://patpatpat.xyz/data/schism/

#sndio #scheme #guile #livecoding

I'm still planning a rewrite of #Xsunaba, my #Xephyr #X11 #sandbox utility, and make it less #OpenBSD specific. In the meantime, I've updated the README re:correctly sharing the #sndio #cookie with the sandbox user if you want it to be able to play audio:

https://github.com/morgant/Xsunaba?tab=readme-ov-file#audio

GitHub - morgant/Xsunaba: Sandbox X11 applications on OpenBSD

Sandbox X11 applications on OpenBSD. Contribute to morgant/Xsunaba development by creating an account on GitHub.

GitHub

I had suspected it'd be the case, but I can confirm that #SDL applications that do not require hardware acceleration do run nicely in #Xephyr under #OpenBSD. I was able to play some #IndianaJonesAndTheFateOfAtlantis in #SCUMMVM in my sandboxed environment & user at the end of today's #twitch stream. Sound and all!

I _finally_ fixed my configuration to install my primary user's #sndio cookie for my sandbox user. Must be 'rw' for the user only, otherwise sndio will "fix" and gen a new cookie.

Some cheap work lights with LED bulbs & home-made diffusers, my trusty Logitech C925e webcam and Blue Yeti X mic, a KORG nanoKONTROL2 MIDI controller for per-app audio levels & playback controls, plus a KORG FC6 MIDI foot controller (via M-Audio Uno USB MIDI interface) with KORG PS-2 pedals and some custom scripts abusing #OpenBSD's #sndio #MIDI support. The foot pedals provide system-wide push-to-talk for my mic, plus I have the foot controller configured to switch between virtual desktops. 3/n

Well, I really like #X11 (#Xorg) ... and my son loves #PeppaPig. Which gives me a stupid idea. I could write something called #Xchicken. Make some chicken lay some eggs with mouse clicks on some #XRender surface.

Rough roadmap:
- Draw some chicken and eggs, probably as SVG?
- Reuse code from #Xmoji, add special widget supporting some "layered canvas"
- Implement game logic
- Add sound? (Hm, gotta look into #OSS and maybe #sndio, cause #FreeBSD ... #Linux weirdness maybe later)
- ....?

I'll probably never start though πŸ™ˆ

@limebar Setting it up in #openbsd #audio #audioMonitoring is like this. https://www.openbsdhandbook.com/multimedia/#recording-a-monitor-mix-of-all-audio-playback

After which #ffmpeg #sndio
ffmpeg -f sndio -i snd/0.mon out.ogg

(If I am playing my mic into system sound, I guess I could add -f sndio -i snd/1 to tell ffmpeg to mix my mic)

Multimedia

Handbook for the OpenBSD operating system

FreeBSD Project-packaged Chromium 125.0.6422.76 will default to PulseAudio, if PulseAudio is enabled.

Please test 125.0.6422.76 or greater with FreeBSD 14.1-BETA3 or a release candidate. 14.1 includes significant improvements to audio (release notes are not yet complete).

<https://github.com/freebsd/freebsd-ports/commit/6acad34cb2bc3b858f64724620fd3c11b2a602f3>

<https://www.freshports.org/www/chromium/#history>

<https://www.freebsd.org/releases/14.1R/>

#Chromium #FreeBSD #PulseAudio #sndio #ALSA #audio #sound

@grahamperrin Yeah, latencies issues, resampling issues, volumes issues, conflicts between alsa/oss/pulse, choppy sound... I'm not interested in helping pulseaudio thanks, I left linux 20 years ago, I'm interested in working with OSS and investigating #sndio :)

Going live for today's sabbatical #twitch #stream morning session. Continuing work on new #OpenBSD utility to control #sndio via #MIDI controller (https://github.com/morgant/midisndiokontrol; currently the #Korg #nanoKONTROL2):

https://twitch.tv/makkintosshu

GitHub - morgant/midisndiokontrol: WIP utility to control `sndio` audio levels & multimedia applications under OpenBSD (currently specific to the Korg nanoKONTROL2)

WIP utility to control `sndio` audio levels & multimedia applications under OpenBSD (currently specific to the Korg nanoKONTROL2) - morgant/midisndiokontrol

GitHub

Okay, I've now published the current, _very_ WIP, state of the script that I developed on Friday's sabbatical Twitch stream and improved a bit further yesterday. I introduce a proof-of-concept that allows one to use a MIDI control surface, currently the #Korg #nanoKONTROL2, to control #OpenBSD's #sndio device & application levels & states, plus send standard X11 media application keyboard input:

https://github.com/morgant/midisndiokontrol

In no way is this final, but I will definitely be improving it.

GitHub - morgant/midisndiokontrol: WIP utility to control `sndio` audio levels & multimedia applications under OpenBSD (currently specific to the Korg nanoKONTROL2)

WIP utility to control `sndio` audio levels & multimedia applications under OpenBSD (currently specific to the Korg nanoKONTROL2) - morgant/midisndiokontrol

GitHub