I am so new to music creation (just five months into the hobby) that I have enjoyed reading the different forums here with wide-eyed interest. I just learned about these Modular Synths, and I thought that would be a great thing to implement in ChucK. After all, the pieces are there. What we don't have is a connection matrix.

I have been trying to think of a way to ChucK up Ugens dynamically from a MAUI interface, but have yet to discover the way. Does anyone have any ideas? One thought was to put a slider at each output and each input, then let there be say 20 integer settings on the slider. If you slide to a certain value, you unChucK from where you were and ChucK to your new connection. Any thoughts on this?

Modular synthesis is already directly ingrained into ChucK. With a modular synthesizer you pass a sine wave generator to and LFO to the output. This is the same way I think when designing a ChucK program.

Modular synthesis is already directly ingrained into ChucK. With a modular synthesizer you pass a sine wave generator to and LFO to the output. This is the same way I think when designing a ChucK program.

Good point. And why make a GUI for it when others have done that so well? It was a bad idea, oh well.

Well, i was thinking of a way to do something at least somewhat like a modular synth as another part of my guitar lab program, or possibly as a separate application. Now that I think of it more, if the architecture were fixed, but general enough to be useful, then I could switch feedback paths in or out with toggle switches.

perhaps a feedback architecture of two or three stages would work, with a scroller made of buttons selecting what ugen goes into each feedforward and feedback block. I could put this at the output of the guitars for making special effects. hmmm... that would be a big project to add...

One thing that's not quite related to GUI part of this kind the project is that.. designing a modular synth in ChucK also means a tool that we can remodel or mess around without having to add new shred just to change the patch. So that we can have a running shred that we can ask it to chuck / unchuck / change send volumn while it is running by any kinds of control we can plug in.

I'm having this in my head: On a modular project, we can divide the module into parts like this:

1. The main modular synth. It can be a class that when initialized, it manages all the task needed to do all the chucking / unchucking / etc.. for the UGen, and we can control that from function calls from outside.

2. Interfacing module. This help connect the modular module with the outside world. For example, with MIDI controllers / joystick, keyboard, MAUI, OSC, etc.. so that we can design how we can control the modular synth from these controllers.. which is gonna be fun heheheh.

3. Some other tools that we'd like to connect to the main modular synth.. for example, Analog-style sequencer (which sends out audio signals, not just control signals), and tools to help connect between different instant of modular synths! hahaahh.

Okay... that's all for today ^_^
i'll try to practice by working on the first (1) part soon.

OK, well, one major obstacle is the patch panel. We could make some kind of secret code with say, scrollers and node numbers - that might work, then you just click a few times to put your sinosc output node on node 3, then click a few more times to put your LPF input on node 3, etc. But that would be difficult to ChucK properly. Or there are other cryptic methods like that.

Rather, why not use a fixed architecture - one that is an old standby for this kind of thing, and is both general and flexible. One such architecture appears in the image below that I sketched up quickly:

Here on the left we have the guitar outputs of Guitar lab, or perhaps a source synth. Each of the UGEN blocks is a scroller that you can select sinosc, sawosc, lpf, bpf, etc. All the simpler ugens, not instruments. There are on/off buttons for each feedback path, plus not shown are scrollers for gain and "parameter" where parameter could be frequency or delay or whatever.

I think for this project concept we have to realize that we are not trying to build another G2 modular or something - that has been done and done very well. We should examine our motivations for doing this before we do it. kijjaz mentions the possibility of modifying already-running shreds this way, which is fun. I would like to make a distortion playground for Guitar Lab. Maybe someone else has other motive.

Still, for this one I'm thinking that it might be best to begin with a clean slate and not try to make a Guitar Lab bolt-on module. It would be complex enough on its own.

Here the input and output nodes are specified by a slider, and all the various parameters for the various oscillators are shown on sliders. To get a different type of oscillator (SawOsc, SqrOsc) you click on the label button that says "SinOsc" at the top. We could have three or four such oscilaltors on the panel

Still, I don't know how the ChucKing would work. I certainly hope that for ten nodes to ten other nodes we don't need to write 100 chucking equations then pick the best one? There must be something better than that...

One thought was to put a slider at each output and each input, then let there be say 20 integer settings on the slider. If you slide to a certain value, you unChucK from where you were and ChucK to your new connection. Any thoughts on this?

Thanks for the history photo, Kassen. Well, good that you mention that because once I had the GUI started I decided to add some basic functionality for a group of four oscillators as shown below.

I also made the attached 11 second song of me manually sweeping an oscillator. There is something to that ability to gradually adjust parameters while hearing the sound that is appealing. Much better than editing a text file for parameters repeatedly when trying to get sounds out of something.

I think the controls are all obvious from the image. I have a lot more work to do before releasing the source code, but I'll get to that soon.

Oh, and by the way, the secret to the ChucKing and unChucKing mystery was to use a Gain block for each wire. That way outputs and inputs can all be adjusted separately as you move the sliders.

Synth_Lab_Test.mp3

Description:

Test of oscillator, manually sweeping SinOsc 0 from 0 to 1 kHz and back. It works!

and I would like all references made when the variable is zero to go to the phasor, 1 to the sinosc, etc. Is there some way to use references or some other language feature to accomplish this? Otherwise I have to write a bunch of if statements all over the code, it would be quite messy.

Oh right you are, kijjaz, it is fun to play with. I figured out a work-around for the ugen switching problem and put in the changes. This brings the work to a good stopping point, so I'm posting the source code for all to enjoy.

I find that having the node numbers on sliders is no real inconvenience, and ChucK keeps up with all the ChucKing and unChucKing with every slider move or ugen change. Note that you can change ugens by clicking on the button at the top of the slot. It will cycle through all of the related ugens. For example under oscillators each osc can be any of the six types of oscillator.

Also you can change the number of any ugen type at the very very top of the source code file, where it says:

I find that 10 nodes with 3 of each type is OK, but you may have other preferences. Aside from all of the above, the use of this application is fairly obvious. Please let me know if something doesn't work right or if you have a wish list for Synth Lab. I'll try to add features as time and motivation permit. Enjoy.

One thing that's not quite related to GUI part of this kind the project is that.. designing a modular synth in ChucK also means a tool that we can remodel or mess around without having to add new shred just to change the patch. So that we can have a running shred that we can ask it to chuck / unchuck / change send volumn while it is running by any kinds of control we can plug in.

As it turns out, kijjaz, that is accomplished by button and slider watching shreds. Every time the user interacts with the controls, one of the shreds activates and changes that parameter. The system therefore responds dynamically to user input, which is sweet indeed. You can hear blips and boops and wavy sounds as you adjust the controls. In this way you can sort of "play" it like an instrument.

By the way, it is not perfect, I'm finding that with all the node switching and stuff, sometimes the simulator goes silent and needs to be restarted. I am still doing test runs to try to identify the behavior so I can resolve the issue. If anyone notices such problems, would you post here about it? Thanks.

Wow! .. That's a very good-looking GUI! ..
It's gonna be one great tool to play with soon!

hmm it sounds cute ^_^"

Yes, I imagine that once you guys get MAUI powers you'll be making all kinds of cool GUIs. It's so easy to do and gives the user a variable control interface.

Right now I've added the gain modules and fixed some minor issues. I find that sometimes Synth Lab loses it's connections somehow, so for the moment I recommend restarting it whenever that happens. I'm not sure where the problem is and I want to try to fix it before releasing code again.

Here is another release of Synth Lab. It has several new features including the following.

Fixed bug where Synth Lab lost its connections. Although it appears to be more solid now, there are times after moving sliders and pressing buttons that I have to wait 20 or 30 seconds for Synth Lab to "catch up" and make the correct sound. Not sure why this is. For now, if Synth Lab gets lost, wait about 30 seconds.

Added self-destruct button to close all windows and end program, very handy since there are so many windows and you used to close them all manually.

Now that I have many of ChucK's Synthesizer-like elements in place, I feel that Synth Lab needs a sequencer of some sort. Naturally, I would like to use a Boolean sequencer, but I'm still unclear of how to set up the inputs and outputs. I'll give it some thought. Any suggestions?

Now i'm thinking about programming a module that can receive notes from other sources in the computer..
hopefully by OSC.
so maybe we can send frequency value, velocity, gate on/off between shreds or between different programs..
so that you don't have to put everything in the SynthLab but instead make SynthLab ready to receive the data from any other sources.

Then we develop the other sources afterwards..
for example, some different kinds of sequencers and signal generator.
(and absolutely Boolean Sequencing Engine!)
and make it communicate with SynthLab through OSC.

Now i'm thinking about programming a module that can receive notes from other sources in the computer..
hopefully by OSC.

That sounds like a great idea, kijjaz. One thing is that I have been thinking of learning to play guitar and it would be nice to bring that into ChucK somehow. Other possibilities would be interfacing to a keyboard to create a classic synthesizer, or interfacing to other ChucK stuff. I'm sure you have a clearer picture of it than I do, so please continue to brainstorm about it as the ideas pop into your head.

I just created a kind of sequencer sort of in Synth Lab. It is really just a counter, composed of SqrOsc's passed thru HalfRect's, and each oscillator is half the frequency of the previous one, forming a binary count. I made the number of bits configurable and the number of counters configurable so users have the greatest degree of flexibility. The HalfRect's make the waveform of the counter outputs be either zero or one in value, so you can just feed them into a gain block and set .op(3) to get the multiplier which actually performs a NAND function due to the zero values. You can also add the bits with a .op(1) or subtract them with .op(2).

After NANDing some counter outputs, I modulate an oscillator on a 1,000 times gain boost of the NANDed signal to create a sine wave, and I adjust the gain of the gain blocks that perform the NANDing to get different frequencies for different output terms of the truth table. Finally a little reverb and a BPF give the SinOsc output some character.

This method of creating a sequencer is interesting because it does not require me to put any code in the time loop of the program, so the CPU is not burdened very much. In fact, unlike Guitar Lab which is up against CPU limitations on many machines, Synth Lab runs without quirks even when I have FireFox and iTunes running at the same time. I guess the STK instruments are complex and require a lot of CPU bandwidth.

Oh, I almost forgot. The attached audio file is 14 seconds of Synth Lab going beep-bop to the tune of the new counter-based sequencer.

I will post the code after I add some more features and play with it some more to test it for quirks. Stay tuned for more fun with Synth Lab!

This morning I put in a WahWah on the filters, but unfortunately had to spork shreds that cycle every 0.1::ms. There is some delay in the user interface due to this, but it's worth it to have WahWah. Maybe I can increase the time between cycles or something. Anyway, I made a little 14 second song of some underwater bubbling sounds, attached.

To create this sound I made a ring of three SinOsc's with frequency modulation, set their gains so they oscillated at low frequencies, then fed their output into the WahWah inputs of three BPF's. I set their Q's to 20 and then I connected three bits of the counter to the BPF inputs and sent the BPF outputs to the DAC. Oh, and to stimulate the oscillation I put a weak feedforward connection from the three counter bits to the three SinOsc's.

It made all sorts of weird sounds until I got it right. The trick was to increase the number of nodes and gains available so that I could let the oscillators run slow, but then multiply their outputs by 100 or so to drive the WahWah frequencies properly. I had to use 15 nodes and 8 gains, which is going up against the limit of the resolution of my screen.

Fortunately in a few hours of playing around, not once did Synth Lab lose it's connections so I think I have that bug fixed. I'm having a great time with this little project and I hope you are enjoying it too!

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot vote in polls in this forumYou cannot attach files in this forumYou can download files in this forum

Please support our site. If you click through and buy from our affiliate partners, we earn a small commission.