Using Scripts to Build Audulus Patches

SO …

For a long time I have been impressed with @jjthrash’s ability to procedurally generate splines into wavetables. And this thread is to allow for more aspects of script-generated Audulus files to be explored.

The discussion that ensued from the thread on my spline tutorial really got the wheels turning and it quickly grew to more than just custom waveforms.


It turns out that the Audulus file format is very script friendly and, with a few basic tools, a lot of the tedium of manually placing points in splines or wiring switches can be alleviated with scripts.

I had an absolutely elucidating afternoon with my good friend Gabriel Gilder who, up until recently, was a professional ruby programmer. And, as he explained how JSON worked to standardize how data is used, the possibilities of what can be achieved in Audulus using the tools scripts could provide readily became apparent.


Some of the possible uses for scripts:

-precise custom waveforms
-encoded melodic sequences
-expedited element placement of modules
-wiring of complex switches and the like
-enhanced circuit modeling


This cries out for a more systematic approach to understanding. And while such an approach is not well suited for those starting Audulus or who are unfamiliar with the basics of programming languages, it provides those of us looking to develop better tools without spending minutes on end wiring up multiplexors only to discover we missed one somewhere.

7 Likes

Here is @Paulinko’s video tutorial on using @jjthrash’s GitHub

3 Likes

I’ve moved the project to its own GitHub repo here: https://github.com/jjthrash/audulus_wave_table

The old repository was more of a junk drawer anyway. :slight_smile:

4 Likes

Updated that. I also got schooled yesterday on what exactly GitHub is and how kind of amazing it can be.

2 Likes

So I’m starting to think of this “wavetable” tool as more of a “spline builder” tool, since that’s what appears to be more interesting to people here anyway. As such, I’m considering actually designing it as a tool.

One of the things I’m interested in is new inputs. What about CSV files? For those who don’t know, these are easy-to-process spreadsheets. The idea would be to accept a CSV file as input, where each row corresponds to a point in the spline, and each column corresponds to X (0…1) and Y (0…1).

This could let you build your own wavetables using a spreadsheet program.

Would anybody use this? What would you use it for?

3 Likes

I think CSV’s would be super helpful for people not as familiar with how to code. I am definitely familiar with CSV from my previous life in retail and think it would be fun to play with. I think this approach could also find a use in calibrating the ES-8 inputs and outputs as it simplifies the process of making a calibrated response curve.

To explain further, when using envelope generators and filters filters in Audulus, you don’t always get clean volt per octave tracking. But with a voltage meter and the zero cross node, you can make a table of voltage to frequency. The arduous part is then making an equation that describes that curve, but with a spline-building too you could just scale the data and let the spline interpolate for you.

3 Likes

Yes, a CSV spline or node builder would be awesome. With a spreadsheet you could do all sorts of calculations and logic that can be more cumbersome in Audulus. Being able to translate that to splines would be awesome. :blush:

3 Likes

Thank you, I updated the video to include the link to your new repository.

2 Likes

Yes, JSON is the defacto storage method for app structures unlike xml which is very verbose, JSON is compact. I am definitely investing time into learning how to understand and manipulate JSON structures. Very glad you opened this thread.

@jjthrash definitely opened the door to being able to extend the capabilities of Audulus with his wavetable patch script.

2 Likes

One of my TODOs is to break the patch-building code out into its own library so you can do other things. Hopefully that will pave the way for making other interesting things. I’ve found it super handy for wiring the 8x8 Conway’s Game of Life patch, which has hundreds of connections.

Another TODO is possibly to document the JSON format, but that’s a little harder to do.

2 Likes

I’ve started writing up changes I want to make here: https://github.com/jjthrash/audulus_wave_table/issues

Feel free to add your own ideas and discuss them there.

1 Like

Would this be a library of objects for coding in Ruby?

1 Like

It can be. As I mentioned, I’d like to split that out, but for now since I haven’t, adding ideas for a general library would be great.

2 Likes

@jjthrash there’s a rubypico app for iOS but I must be doing something wrong as I can’t get new code to run.

Here’s the instructions for adding GitHub access to it.

2 Likes

I’ve created a GitHub repository for Audulus 3 SVG Icons and graphics issues. It includes some svg icons I’ve created and Audulus patches for them. Not all of the icons are useful as some are for exploring the issues surrounding the impact on performance with svg files in Audulus patches.

We’re fortunate to have an app developer in @taylor who can straddle both vector graphics and the music/DSP worlds so the issues I raise are directed at my fellow users who might not be as familiar with them and their effects plus for my own edification.

1 Like

@robertsyrett mentioned in one of his videos that he might do something on vector graphics. I would definitely be interested in that. This winter I sewed some custom cases for my instruments. I like the idea of custom graphics for my favourite synth patches. I also mentioned in the AUv3 discussion thread that finding a way to encourage people to have some control over graphics without sacrificing the aesthetic theme of Audulus would be a very cool feature for the AU release.

1 Like

I think the Audulus developers have to strike a balance between giving users access to being able to add vector graphics and any extra support headaches associated with doing so.

If some users have unrealistic expectations and find the process of custom icons too daunting or they create svg files that are too complex which leads to poor patch performance and disgruntled users who give bad App Store reviews, it will undermine their attempts to foster positive growth for Audulus.

Perhaps the easiest solution would be a separate app which could take users custom graphics and convert it using various templates into viable SVG graphics for Audulus?

This would facilitate ease of use, compatibility, independence, self expression, and optimize compatibility with Audulus.

The how long is the coast of England question is a good way to conceptualize the complexity and “size” of vector graphics.

2 Likes

One thing I notice with the custom built blocks in Reaktor, is I tend not to bother with the ugly ones (for better or worse). Ugly designs don’t seem to proliferate. It is like there is a natural curating process that happens, where the modules with the prettiest lights (and intelligent algorithms) seem to do well. On the other hand, it takes quite a bit of knowledge to produce a proper low CPU complex/useful module, so anyone that makes graphics for these already has enough good sense to produce a nice object.

2 Likes

GUI design and the inner workings of apps have equal weight now more than ever. On development teams there are frequently people who focus on one of these aspects of development exclusively.

2 Likes

Cool stuff people! I’m excited to see what everyone does with the sample node in Audulus 4 - you’ll be able to store data like with the spline node but do it much easier.

That said, one use that people haven’t talked about much so far is using the spline node for arp tables, and lookup tables in general?

You could make these little discrete steps that get referenced on sample/totalSamples intervals. You could even use it to make a more efficient quantizer probably? Just spitballing.

1 Like