Hello from a Swedish hobby programmer

Why not tell us a little bit about yourself? Welcome to the community!

Moderators: 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:

Hello from a Swedish hobby programmer

Post by joelkp »

Hello!

I've been interested in sound since childhood, but I'm not a musician. I've also been a hobby programmer since my teens, and experimented for some years with making my own filters/"effects".

On and off, I've worked on making a command-line audio synthesis program. (Currently, it basically provides a simplistic scripting language for tone generation with FM/PM/AM support, though I hope to one day make it expressive enough to actually use to write music with.) After first releasing it in 2012 (but failing to get the word out about it), and then time passing, and then cleaning up the code over the last year and a half, I decided it's about time to explore communities and see if there's any interest.

Actually, I first signed up for the wiki, since it seems contributions are welcome, in order to add the link, but the password email came in completely blank (same thing after trying to get the wiki to send a new password).

Anyway, this place also seems like a start for exploring what's "out there", in terms of communities. I don't know much about what audio-related communities there are - apart from KVR Audio, where I discussed DSP effects and such programming a bit over a decade ago (as the audio-programming newbie I was, and still am compared to many developers there). Since then, I've moved on to using open source OSes (not only Linux but also the BSDs). KVR Audio is still a good place to revisit for more mainstream stuff, I think, but here you have a focus on open/free/libre software.

I'm also looking for some inspiration and ideas, though I don't actually have a clear aim regarding what I hope to discuss. But after a pretty depressed period, I figure it's about time to get "unstuck", and for a start that means looking around.

In terms of music, I'm largely uninterested in most of what's produced and what's popular, though I like various kinds of electronica (including the video game music of the 16-bit era).
User avatar
Michael Willis
Established Member
Posts: 1451
Joined: Mon Oct 03, 2016 3:27 pm
Location: Rocky Mountains, North America
Has thanked: 69 times
Been thanked: 164 times
Contact:

Re: Hello from a Swedish hobby programmer

Post by Michael Willis »

Hi joelkp! This is a good forum for discussing those kinds of things. Just recently there was a thread that had some commentary about people with a disposition to "tinker". You are exactly that kind of person.

Here we have a variety of people who are interested in audio production, composition, musical performance, and developing software to facilitate those things. I myself have interests in all four of those areas.

Like you, I started out programming as a hobbyist in my teens. Over the last couple of years I have recaptured the simple enjoyment of those early hobbyist days by working on an audio effect plugin. Even though I started out knowing almost nothing about developing DSP plugins, I was able to do it with a lot of help and collaboration from people on this forum. I would love to see you do a similar thing with your FM/PM/AM synth project; if you make it available as a JACK application or VST/LV2 plugin, plenty of people here would at least try it.
CrocoDuck
Established Member
Posts: 1133
Joined: Sat May 05, 2012 6:12 pm
Been thanked: 17 times

Re: Hello from a Swedish hobby programmer

Post by CrocoDuck »

Hi!
joelkp wrote:Anyway, this place also seems like a start for exploring what's "out there", in terms of communities.
In terms of Audio algorithms and programs, the Faust mailing list is quite active and very supportive. If you ever used Faust, or you are interested into it, you could find many interesting technical stuff in there.

As you are writing a command line synth, you might want to also get involved in the live coding communities, such as Sonic Pi, Super Collider, Pure Data, Tidal Cycles. You could lurk around to see whether your software can fill a certain niche.

You could also checkout Juce and CSound communities in case you might find something in there.
User avatar
bluebell
Established Member
Posts: 1910
Joined: Sat Sep 15, 2012 11:44 am
Location: Saarland, Germany
Has thanked: 111 times
Been thanked: 116 times

Re: Hello from a Swedish hobby programmer

Post by bluebell »

joelkp wrote:Hello!

I've been interested in sound since childhood, but I'm not a musician. I've also been a hobby programmer since my teens, and experimented for some years with making my own filters/"effects".

On and off, I've worked on making a command-line audio synthesis program. (Currently, it basically provides a simplistic scripting language for tone generation with FM/PM/AM support, though I hope to one day make it expressive enough to actually use to write music with.) After first releasing it in 2012 (but failing to get the word out about it), and then time passing, and then cleaning up the code over the last year and a half, I decided it's about time to explore communities and see if there's any interest.
Have you tried https://vcvrack.com/ ?

If you like it then you may contribute code/plugins.

Linux – MOTU UltraLite AVB – Qtractor – http://suedwestlicht.saar.de/

User avatar
Linuxmusician01
Established Member
Posts: 1526
Joined: Mon Feb 23, 2015 2:38 pm
Location: Holland
Has thanked: 756 times
Been thanked: 137 times

Re: Hello from a Swedish hobby programmer

Post by Linuxmusician01 »

joelkp wrote:On and off, I've worked on making a command-line audio synthesis program.
Welcome!

Have you heard of csound? It's some sort of programming language, text based, for audio creation. Might be just your thing. :)
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: Hello from a Swedish hobby programmer

Post by joelkp »

Currently, it - saugns - supports ALSA and OSS (on Linux). I haven't actually used JACK yet. It seems like the point - the added capability - would be routing around the audio output. For now, my program simply gives the option of writing a 16-bit WAV file for further use.

I plan to keep it minimalistic, and as far as plugins go, a likely future (after further development, to make it worthwhile) is to turn most of the program into a library for use in audio programs, e.g. input plugins for media players. I.e., the language is meant to become a kind of "audio format", for which the current program would then be a pretty simple player.

But I also ultimately aim for the language to be good for composing electronic music in - while still parsing fast and rendering with reasonable resource use. (I'm not a composer, though I hope to come up with a syntax that can easily express e.g. the kind of electronica-like background music I remember from some of my dreams. My unconscious mind is far more accomplished at producing music than my conscious person. :) I wonder, but do not presume, whether I can invent a language that bridges the gap in expressiveness.)

The language could already work like an audio format, but it would really suck to compose music in it, because higher-level abstractions are missing (in addition to some further types of audio generation) - while basic things, like how timing works, are there.

Note: While the scripts in 'examples/' work and are meant to show syntax and basic features, those under 'devtests/' are a mix of things which work, drafts for changed syntax, and those called 'music' are old tests not really well-named. ;)

The current design is very simple, and to extend the language cleanly, redesigning will be needed for the core of the program - parser semantics, handling of its output and how the audio generator works. A main question is, which way to go? (I'd like to keep it simple, but it will need to become a different simple.) And so, I think it's time to look around and compare notes (so to say) before continuing.

Early on, I avoided csound and its more recent relatives simply in order to start from scratch and come up with something new - and fairly "retro". But years have passed, I've revisited and cleaned-up my old stuff, and now that I have a start of my own... Maybe I can make something of a synthesis instead of a simplistic antithesis.

A quick list of new and old to-do's:
- Greatly re-work the parser and code using its output. (Surrounding low-level stuff has however been cleaned-up.)
- Adding a syntax for ADSR envelopes. (Currently, there's only the simple "value slope", each use of which does one timed change for a parameter.)
- There's no frequency filtering. (How to design it truly well on your own without advanced math? That's a problem I had with DSP a decade ago, and then I left it "for later".)
- The square, saw, etc., waves are still naive. (To do better.)
- Adding noise generation. (Certainly white, perhaps also the types "above" and "below" in the spectrum of 5 noise types.)
- Abstractions, so that sounds can be re-used and varied in a script without lots of copy-pasting.

How much can competently be squeezed into a small program? That's a long-term question.

Currently looking at

For white noise, xorshift32 seems the best RNG algorithm choice based on this.

I'm also looking at Blargg's old code and info largely related to 8-bit console sound emulation. That's one approach to good-sounding square waves and more, though I'll look elsewhere as well.
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: Hello from a Swedish hobby programmer

Post by joelkp »

I've now written a page describing how to use the syntax of my program, hopefully user-friendly.

That's hopefully a better introduction to it than the technical plans of the previous post.

If people try it out, I'd like feedback on basic things, like details of the syntax. While partly a matter of taste, small details are pretty simple to change, and better to do it earlier than later (after the language becomes more widely used, if that happens).


I'll have to think about the design in relation to csound, SuperCollider and others. There's an extreme difference in complexity compared to my program, which currently compiles into something around 40-70KB large. (The old 2012-04-01 version, named "sgensys", was significantly smaller, but it really needed a big refactoring and general lift in code quality.)

Perhaps basic parts of nowadays conventional designs - like generalizing types of things generated into unit generators - can be redone in a simple way, e.g. if noise and/or envelopes are added.

I plan to do further design changes in smaller steps, at least initially. And I think that even with redesigns that add further layers in-between text crunching and audio generation, I can keep it below 100KB - though that may change if/when the language or audio generation capabilities are substantially extended.
User avatar
khz
Established Member
Posts: 1648
Joined: Thu Apr 17, 2008 6:29 am
Location: German
Has thanked: 42 times
Been thanked: 92 times

Re: Hello from a Swedish hobby programmer

Post by khz »

joelkp wrote:Actually, I first signed up for the wiki, since it seems contributions are welcome, in order to add the link, but the password email came in completely blank (same thing after trying to get the wiki to send a new password).
@raboof can you tell us how a user can edit the wiki? Thank you.
Or write raboof a PM.
. . . FZ - Does humor belongs in Music?
. . GNU/LINUX@AUDIO ~ /Wiki $ Howto.Info && GNU/Linux Debian installing >> Linux Audio Workstation LAW
  • I don't care about the freedom of speech because I have nothing to say.
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: Hello from a Swedish hobby programmer

Post by joelkp »

I didn't try sending a PM until a while ago, but it seems I don't have the user permission.

Meanwhile, I've written a usage page, and made some minor changes to the program and expanded the syntax page. (It seems writing pages meant to be read by others helps clarify basic ideas. I've twice adjusted syntax details in order for the description of the syntax to make more sense. ;) )
Post Reply