Kyma Forum
  Tips & Techniques
  Creating a "preset" button to set event values in VCS

Post New Topic  Post A Reply
profile | register | preferences | faq | search

next newest topic | next oldest topic
Author Topic:   Creating a "preset" button to set event values in VCS
AlanMJackson
Member
posted 05 October 2014 19:59         Edit/Delete Message   Reply w/Quote
Hi,

I want to build a "synth" in kyma that would be particularly good for tweaking live. I'm using this little project to learn about kyma - I'm a newbie so apologies if I'm asking basic questions.

This synth will have an ADSR envelope for it's amplitude. I want to create a kind of "preset" button in the VCS that when I click it, it will set the Attack, Decay, Sustain and Release to specific values.

I've tried using a SoundToGlobalController sound.

I put in the Value field:

code:

!Sw01

true: (1)
false: nil


and in the GeneratedEvent field:

code:

!Attack

If I use a toggle control for !Sw01 then when I check it the attack fader is set to 1. When I uncheck it the attack fader is set to 0. But I can't then move the fader myself any more.

I suspect the SoundToGlobalController is constantly scanning the value of Sw01 and so is constantly setting the attack fader to either 1 or 0. What I'm really wanting to do is just trigger once of the click event of a button.

Also I can't work out how I assign values to multiple faders (the decay, sustain and release faders).

I'm probably thinking about this all the wrong way - any advice very gratefully received!

thanks,

Alan



IP: Logged

gustl
Member
posted 06 October 2014 02:10         Edit/Delete Message   Reply w/Quote
Hi Alan,

You're right. A GeneratedEvent can't be moved in the VCS.
You could use this in the value field of the SoundToGlobalController:
!Sw01 true: (1) false: !AttackVCS

Now you have a second fader (AttackVCS) which is active if the switch is off.
I guess there is a better way to do it but it might get you started..

Hope the charcoal business is going well

IP: Logged

AlanMJackson
Member
posted 06 October 2014 03:30         Edit/Delete Message   Reply w/Quote

When you say...

quote:
Originally posted by gustl:

A GeneratedEvent can't be moved in the VCS.

...is that because my code is continually re-sending the value to the VCS fader or are you saying that once a fader has been set by code, however that happens, it gets latched and can never be used manually?

Are VCS controls inherently uni-directional? You can either set them from code (so they are displays only) or set them from the VCS by hand, but never both?

Cheers,

Alan

PS. The British summer isn't officially over for another couple of weeks. Despite that, my fellow citizens appear to have packed their BBQs away for the winter and the bottom has fallen out of the charcoal market.

IP: Logged

gustl
Member
posted 06 October 2014 05:36         Edit/Delete Message   Reply w/Quote
Hi Alan,

I think it's because it is constantly resending but I could be wrong..
Seems like it's not possible to have both with the same fader for now..
But maybe some other folks around here have an idea?

ps. Damn it, I hold so many shares on this, I'm counting on you!

IP: Logged

ChristianSchloesser
Member
posted 06 October 2014 17:40         Edit/Delete Message   Reply w/Quote

TriggeredSoundToGlobalControllerDemo.kym

 
The TriggeredSoundToGlobalController has an AllowLiveOverride parameter.
I use it to create buffers etc. to store values of HotValues independent from the current VCS preset and also to copy selected Values from one preset to another. This might be a bit advanced for the beginner but works very well.
Another option i use for envelopes etc. is to save them in VCS presets in a separate layout. If you put a "smooth: !SmoothTime s" behind the values you can morph between your settings saved in the VCS presets.
The VCS presets in general are very powerful in combination with separate layouts. Don't forget that you can save,load and randomize(roll dice) via MIDI and OSC.


All the best
Christian

[This message has been edited by ChristianSchloesser (edited 12 October 2014).]

IP: Logged

gustl
Member
posted 07 October 2014 13:57         Edit/Delete Message   Reply w/Quote
Thanks Christian, I didn't realize this module until now - really handy

IP: Logged

CharlieNorton
Member
posted 09 October 2014 14:43         Edit/Delete Message   Reply w/Quote
Alan: Welcome to the community!
Everybody: Interesting thread! Lots to try out!!

thanks

Charlie

IP: Logged

AlanMJackson
Member
posted 11 October 2014 17:14         Edit/Delete Message   Reply w/Quote
Thanks for that Christian, the TriggeredSoundToGlobalController looks really useful.

I'm guessing that it only allows you to affect one variable? I guess I could get the effect I'm looking for by having several of these all using the same trigger. Which would mean, to have 4 "presets" for ADSR I would need 16 TriggeredSoundToGlobalControllers. I'm wondering if there's not a simpler way (in code?).

I haven't learnt much smalltalk yet, but in pseudo-code this is what I'm trying to do:

code:

on_button_click:
attack = 0.01
decay = 0.01
sustain = 1.0
release = 0.5



[This message has been edited by AlanMJackson (edited 11 October 2014).]

IP: Logged

gustl
Member
posted 12 October 2014 02:46         Edit/Delete Message   Reply w/Quote
Hi Alan,

You just need 4, one for each parameter. Then use:
(!Button1 * Value1) + (!Button2 * Value2) + (!Button3 * Value3)...

Hope that helps

Edit: Or use a Fader for the Presets and an array:
!Preset of: #(Value1 Value2 Value3...)

[This message has been edited by gustl (edited 12 October 2014).]

IP: Logged

AlanMJackson
Member
posted 12 October 2014 05:49         Edit/Delete Message   Reply w/Quote
Thanks Gus, yes of course, great idea.



IP: Logged

SSC
Administrator
posted 12 October 2014 09:53         Edit/Delete Message   Reply w/Quote
And don't forget about the VCS presets (you could capture the settings of all the EventValues at once using the snapshot and then switch between the presets using the arrow keys, MIDI Program Change, or the InterpolatePresets Sounds).

IP: Logged

AlanMJackson
Member
posted 12 October 2014 19:19         Edit/Delete Message   Reply w/Quote
The VCS presets will come in useful. They will be great for returning the whole synth sound back to a specific known state. I imagine they'll work a lot like "patches" in a traditional synth.

What I want to do is create controls that are useful in the context of using a synth for live improvisation. So instead of loading a patch, these modular "preset" buttons just modify one aspect of the sound. I'm trying to create buttons that are at a slightly higher level of abstraction than the underlying, more traditional controls. I'm explaining this badly. Examples might help.

A traditional analog synth might have ADSR controls. These give a good level of control but can be hard to set in a live situation. A few ADSR preset buttons could change between several useful envelope shapes.

I want to try and do the same thing for several other aspects of the sound - the filter, pitch bend range, spread and detune of oscillators, delay, distortion etc.

The one I'm stuck on at the moment is a button to change between poly and mono modes (which I've mentioned in another thread, http://www.symbolicsound.com/cgi-bin/forumdisplay.cgi?action=displayprivate&number=7&topic=000581). I've tried using two midi voices, one monophonic and one polyphonic, but they seem to interact with each other so neither receives all the midi events.

Cheers,

Alan



IP: Logged

AlanMJackson
Member
posted 12 October 2014 19:25         Edit/Delete Message   Reply w/Quote
Using the TriggeredSoundToGlobalControllers Christian mentioned and the button code Gus wrote I've now got several ADSR preset buttons working nicely - and I can still over-ride them using the Attack, Decay, Sustain and Release faders. Thanks!

IP: Logged

All times are CT (US)

next newest topic | next oldest topic

Administrative Options: Close Topic | Archive/Move | Delete Topic
Post New Topic  Post A Reply

Contact Us | Symbolic Sound Home

This forum is provided solely for the support and edification of the customers of Symbolic Sound Corporation.


Ultimate Bulletin Board 5.45c