saugns v0.4.0 -- now good for soundscape audio scripts

Discuss anything new and newsworthy! See http://planet.linuxaudio.org and https://libreav.org/news for more Linux Audio News!

Announcements of proprietary software may fit better in the Marketplace.


Moderators: raboof, MattKingUSA, khz

Post Reply
joelkp
Established Member
Posts: 13
Joined: Sun Jun 23, 2019 11:11 am
Location: Sweden
Has thanked: 1 time
Been thanked: 5 times
Contact:

saugns v0.4.0 -- now good for soundscape audio scripts

Post by joelkp »

My "SAU language" and saugns program (wiki page here) is becoming more interesting for making soundscapes lately, with v0.4.0, though I think it's still too unexpressive for music in general.

It's far, far more minimalist than all the popular languages for writing sounds or music in (which may in part change later). Currently, it's not for live coding, but only for writing audio scripts that then play (or can be converted to normal audio files). Abstractions are still lacking in the language, yet some interesting things can be made in short scripts.

Here's a soundscape in < 80 characters, which uses the newly added 2nd audio generator type "R" (Random segments generator). (Changing a phase offset, from "p0/4" to "p2/4", would also make for a fairly different sound.)

Code: Select all

'f=10/3
Rcos mg f$f t60 p[Wsin r10 a4 p[Wsin r-2.r+2[Rlin mt p0/4 f20*$f]]]

(Rendering. I've not previously put up rendered audio, but recently did so in posting a bit on Fosstodon here.)

Above, both wave oscillators ("W") and random segments generators are used. "R" supports several types of randomness connected by the chosen line type, and this script uses both "g" (the "mg" part -- my fast soft-saturated Gaussian approximation -- and "t" (the "mt" part), a constrained random value distribution which always cycles to and from zero, but randomly flips polarity, which when connected by smooth lines seems good for nested modulators.

I made "R" more featureful than I thought I'd do beforehand, but in testing I found that various more sounds could be made with short scripts with more types added. E.g. using the Gaussian mode "g" for a low-frequency carrier is like a shortcut for getting more dynamic range to the sound, beyond sounding "right" in some more specific cases.

I mentioned my program a few years ago in my introduction, though little discussion came of it (neither here nor elsewhere) back then. Now it felt like time to see if there's any more interest, given the program is getting more capable now.

Basslint
Established Member
Posts: 1511
Joined: Sun Jan 27, 2019 2:25 pm
Location: Italy
Has thanked: 382 times
Been thanked: 298 times

Re: saugns v0.4.0 -- now good for soundscape audio scripts

Post by Basslint »

So cool, thanks! Made an openSUSE package for it. Only two things, from the perspective of a packager.

  1. In the Makefile it would be better for us packagers if instead of
    PREFIX = /usr/local
    you wrote:
    PREFIX ?= /usr/local
  2. /usr/share/examples is not owned by any system package by default and this creates some problems. It would be better if you put the examples in /usr/share/saugns/examples

Thank you again :D

The community of believers was of one heart and mind, and no one claimed that any of his possessions was his own, but they had everything in common. [Acts 4:32]

Please donate time (even bug reports) or money to libre software 🎁

Jam on openSUSE + GeekosDAW!
joelkp
Established Member
Posts: 13
Joined: Sun Jun 23, 2019 11:11 am
Location: Sweden
Has thanked: 1 time
Been thanked: 5 times
Contact:

Re: saugns v0.4.0 -- now good for soundscape audio scripts

Post by joelkp »

Basslint wrote: Sun Jan 29, 2023 11:41 am

So cool, thanks! Made an openSUSE package for it. Only two things, from the perspective of a packager.

  1. In the Makefile it would be better for us packagers if instead of
    PREFIX = /usr/local
    you wrote:
    PREFIX ?= /usr/local
  2. /usr/share/examples is not owned by any system package by default and this creates some problems. It would be better if you put the examples in /usr/share/saugns/examples

I've made those changes now in the current "stable" branch (so it will be in the next version). Well, #2 was a bit more involved; the "share/examples/..." pattern is the proper way to do it on BSDs (where there's a special examples dir just like there's a special doc dir), so I wanted to keep that working, too. Now I've added a check for the existence of share/examples under the install prefix in the Makefile, and if it doesn't exist, then the other option is used instead.

Thanks for making a package. I had a look at the files in it, out of curiosity. I think the license string should be LGPL-3.0-or-later, not GPL-3.0-or-later. Otherwise it seems good as far as I can tell (and the extracted x86-64 binary happened to also work on my Arch Linux system).

I thought of making and submitting packages to Linux distros and BSDs I use earlier, but didn't get to it. I worried -- probably far too much -- that pushing people to use my program, and then making changes that break old scripts for it, may piss people off. But I've heard so little from people using it, before and during the great syntax change rampage of some previous versions, that it's probably a silly concern.

A new language change in "stable" now is that "W" and "R" can be written in scripts without a label after, to use a default wave or line type. (This makes the shortest scripts producing sound those 1-character strings.) Next up may be adding a more conventional noise generator, no frequency or phase parameters (just amplitude), with several colors of noise to choose from.

Basslint
Established Member
Posts: 1511
Joined: Sun Jan 27, 2019 2:25 pm
Location: Italy
Has thanked: 382 times
Been thanked: 298 times

Re: saugns v0.4.0 -- now good for soundscape audio scripts

Post by Basslint »

joelkp wrote: Wed Feb 01, 2023 9:19 am

I thought of making and submitting packages to Linux distros and BSDs I use earlier, but didn't get to it. I worried -- probably far too much -- that pushing people to use my program, and then making changes that break old scripts for it, may piss people off. But I've heard so little from people using it, before and during the great syntax change rampage of some previous versions, that it's probably a silly concern.

I think adopting semantic versioning is the best thing to do, in these cases. So no compatibility breaks between minor versions, only major versions.

But as a developer myself, I understand the need for breaking compatibility between minor versions too, when the software has not reached 1.0.0 IMHO it can be forgivable :D

The community of believers was of one heart and mind, and no one claimed that any of his possessions was his own, but they had everything in common. [Acts 4:32]

Please donate time (even bug reports) or money to libre software 🎁

Jam on openSUSE + GeekosDAW!
joelkp
Established Member
Posts: 13
Joined: Sun Jun 23, 2019 11:11 am
Location: Sweden
Has thanked: 1 time
Been thanked: 5 times
Contact:

Re: saugns v0.4.0 -- now good for soundscape audio scripts

Post by joelkp »

I've put out v0.4.0c, adding some more to the randomness features (R violet noise modes, and a uwh line type with noise). There's now an examples page which shows some short scripts and accompanying rendered audio which can be played. To grow over time...

Basslint wrote: Wed Feb 01, 2023 12:29 pm
joelkp wrote: Wed Feb 01, 2023 9:19 am

I thought of making and submitting packages to Linux distros and BSDs I use earlier, but didn't get to it. I worried -- probably far too much -- that pushing people to use my program, and then making changes that break old scripts for it, may piss people off. But I've heard so little from people using it, before and during the great syntax change rampage of some previous versions, that it's probably a silly concern.

I think adopting semantic versioning is the best thing to do, in these cases. So no compatibility breaks between minor versions, only major versions.

But as a developer myself, I understand the need for breaking compatibility between minor versions too, when the software has not reached 1.0.0 IMHO it can be forgivable :D

Currently, it's more as if I'm adding a "0." prefix to a semantic version number, except sometimes there's more breakage. I think it may take some time before the version number increases close to v1.0.0. There's a lot missing compared to the somewhat vague "vision" I have. For one major part of it, I added a Codeberg issue in case anyone wants to discuss eventually adding looping and/or sequence generator features.

Next in the shorter term, I don't know about adding the simpler N noise generator I mentioned in my previous post. Maybe I'll focus on other things first, like tweaking the wave oscillator, maybe adding more features for it (PM feedback is also missing).

joelkp
Established Member
Posts: 13
Joined: Sun Jun 23, 2019 11:11 am
Location: Sweden
Has thanked: 1 time
Been thanked: 5 times
Contact:

Re: saugns v0.4.0 -- now good for soundscape audio scripts

Post by joelkp »

I've found and fixed a curious bug which kept a few features and scripts using the R generator from working, when saugns was built using clang rather than gcc on x86-64 in particular (no problem on x86). Though when I say fixed, I don't really understand it -- the new code should give an equivalent result as far as I know, but clang's optimizer disagrees even if used with the lowest level.

v0.4.0d also adds 2 more noisy line types.

And a little change which may affect packaging, I replaced the GPL + LGPL COPYING file with the usual pair of files, mainly to fix what's auto-listed on some websites.

Finally, something which would be good to have some feedback on. The stable branch (and website) now differs in the set of waveforms available by name for the W oscillator. Most of the new ones are less useful for PM, though ean (evenangle, idea from here) could work in many places (otherwise tri is the second-most used waveform in my own scripts after sin). One type was removed. Thoughts on these or other wave types? For LFO, I think more types may be interesting, and further uses could come along later (frequency filters are still missing, but eventually should be added).

Post Reply