First time here? Check out the FAQ!
x

Is it possible to define the widget type and range using smalltalk?

+2 votes
1,241 views
Is this possible? Something like: 'hotvalueName' asHotValue widgetType: 'rotary' rangeMin: 0 rangeMax: 10 rangeStep: 0.

I know I can define widget types in the global map but I think it would be practical to use smallTalk too do it, especially for Sounds involving replication.

Thanks!
asked Oct 16, 2015 in Capytalk & Smalltalk by kymaguy (Virtuoso) (10,580 points)

2 Answers

+1 vote
Yes! I love Kyma!

I found out today that you can use the MIDIMapper Prototype to pass a !HotValue a VCS range!

If you would like a !Speed control displayed as a fader with a range of -1 to 1 you put into the Map:

!Speed is: ((`Speed ) displayAs: #fader; min: -1 max: 1).

After a few checks i figured out this will not work if you generate your !HotValue in a Script right to the MIDIMapper. I also doesnot work anymore when i edited the range manualy in the VCS Editor.

 

Cheers

Christian
answered Oct 17, 2015 by christian-schloesser (Adept) (2,920 points)
edited Oct 17, 2015 by christian-schloesser
nice! thanks christian! too bad it doesn't work with a script..
It would have been a nice workaround .. but maybe SSC has a better idea.
Sometimes those features are already there and i just don't know how to use it.

Most of the times i generate or "Build" my sounds with the help of a script at the right.

That is because with the help of smalltalk i can create complex structures with just some lines of code. I can write comments and have a big overview of all my !HotValues and ?GreenVariables.
I think it is a very transparent approach for bigger projects and for later use.

It would come in very handy if we could somehow declare the default VCS features of a Generated !HotValue in those scripts too. (including type, range, grid, affected by preset, affected by dice).
me too, I tend to use scripts more and more, especially when heading for encapsulation I do nearly all the development using scripts. I agree with you about the overview, but most of the time when experimenting I don't want to put in every hotValue twice (once in the parameter as variable, once in the script). I think I asked that before, but is there a way to gather all hotValues of a Sound? or is there some workaround you can suggest?
You can get a list of the EventValues in a Sound by selecting a Sound in the Sound Browser and looking in the Description area at the bottom of the Sound Browser, by hovering over a Sound in a Sound file window, or by selecting a Sound and choosing Get Info from the Info menu.

(This last option was temporarily broken in Kyma 7.04f1 or earlier.)
Thanks for pointing that out again, nice feature!
This is useful. You can then use a text editor with GREP to process the text and turn it quickly into a version for Scripted class development.

http://www.anybrowser.org/bbedit/grep.shtml
http://ryanstutorials.net/linuxtutorial/cheatsheetgrep.php

I use BBEdit to do that. It can transform the list of EventValues into the format of

HotValue: !HotValue

which you can then paste into your variable supplying script.
Do you use "grep" on the Kyma Sound file?
No. I copy the list of EventValues displayed in the SoundBrowser as SSC mentions above and then manipulate it in a text editor to quickly make a list that removes all the ! adds a : and then adds a copy of the EventValue with the ! appended. This quickly creates a list that you then paste into the Kyma script.
Ahh. Thanks for clearing that up!
I was already wondering since the Kyma Sound files seem to have their own undocumented  proprietary format.

Of course it would be nice to get a parser to "batch process" Kyma Sound files with a Tool with some smallTalk code.
To change for example every !HotValue into a ?Variable and add a Script Prototype at the right which reflects those changes as an argument in the  start (HotValue: !HotValue) section of the new generated sound. ;-)
Maybe SSC can help us with a hint or two.
Best
Chris
Thanks, Cristian, that seems like a nice workaround!
This kind of batch processing would be a great improvement!
Also I'm still interested on defining widget type and range using smalltalk ;)
For some reason I couldn't find the "ask a related question" link earlier. Oops. Anyway, I've asked a related question here (https://kyma.symbolicsound.com/qa/3555/how-you-create-fader-labelled-with-changeable-list-filenames)
0 votes

In relation to the comments thread -- here is an example of the Grep process I used in BBEdit.
The first step is to replace all the exclamation marks with nothing. Then use this Grep to create a list ready to paste into your Script which passes the hot values to the green Variables in the rest of the Sound. You would normally do this when developing a Sound for the Class builder. 

We are developing lots of Kyma Classes at http://www.neverenginelabs.com - please drop by the site to find out more.

 

answered Oct 26, 2015 by cristian-vogel (Master) (8,440 points)
...