First time here? Check out the FAQ!
x

Why the inconsistent naming convention in the VCS widget 'select from list'?

0 votes
666 views

Hi everyone,

Sometimes Kyma uses the entire file name in the 'select from list' widget and other times it simply provides a number (see below). I was thinking this was related to metadata, and maybe it still is, but after playing with the sound a bit I noticed some interesting, inconsistent results.

My parameter field looks like this:

And the resultant VCS widget is this: 

If I evaluate the code to get the full path name that doesn't change anything in the VCS but if I add another sample file like this:

Then this is the resultant VCS (which Is what I would like from the first scenario):

What's interesting is that it doesn't always work this way- sometimes adding another sample file doesn't change the VCS to providing the file names. I can't seem to locate a specific reason as to why.

This is just a small example of a larger sound with a lot of 'select from list' widgets so the inconsistencies can make it difficult to navigate. 

Any thoughts or suggestions on this? Thanks in advance!

asked Jul 15, 2019 in General by will-klingenmeier (Adept) (1,270 points)

2 Answers

0 votes
 
Best answer

The algorithm for shortening fileNames for auto-labeling is to remove any common prefixes. (It's based on the idea that you what you really want to see is how those fileNames differ from each other). When you concatenated the Draining Water sample, you introduced a fileName that did not share the Armenian Elevator prefix with all the others, so it was necessary to include more of the fileName (in order to differentiate between them).

If you want to use your own labels, there is still a way to do it (it's just not as automatic as checking the Autolabeling box). Unlock the VCS, select the Index widget; then in the Virtual Control Surface Editor Options popup, select 'Set tic marks and labels'. Select Code as the way you want to set the labels; then click Edit. Now you can write Smalltalk code to return a collection of Strings. These will become the labels on your fader (or the names in your Select from a List widget). Alternatively, you could select List as the way you want to specify the labels; then you can type in (or copy paste) the names that you want for each entry, one entry per line.

answered Jul 16, 2019 by ssc (Savant) (126,300 points)
selected Jul 16, 2019 by will-klingenmeier
Thank you! Interesting and good to know about the auto-labeling. That all makes sense and works nicely.
0 votes
I'm not sure what types of values that input box takes (assuming it's probably MultiSampleSoundCloud or somesuch similar).

However, the `sampleFileNamesInSameFolder` method returns an `OrderedCollection` object... so when you also add another string to the end of that `OrderedCollection`, I suppose it's getting to a different section of code than when you just have the value of the `OrderedCollection` returned from sending `sampleFileNamesInSameFolder` to `'Armenian Elevator 01'`. Play around with `CMD-Y` (Edit... Evaluate) to determine the difference between when it's doing what you want, and when it's doing what you don't want, and you might find that it's giving you something different between both cases... then you can more easily form it into the shape that you'd like it to be, correctly.

Hopefully that explanation wasn't *too* convoluted, and you understood what I mean.

If you like, I'm happy to dig into the specifics... so maybe if you say exactly what you put in when you get what you want and vice versa... for example, which prototype is it, where do you put the message send to `sampleFileNamesInSameFolder` etc? :)
answered Jul 16, 2019 by julian-leviston (230 points)
edited Jul 16, 2019 by julian-leviston
Thanks for your response. I suppose that's my whole question and situation with this- the results are inconsistent. I would like the the entire file name to be in the drop down widget every time. It seems odd that having a single sample file after the curly braces would prompt all the files to be fully named in the VCS and having just the code in curly braces doesn't.
In your screenshots, you show a SampleFileNames parameter field, but which Sound class is it? Knowing this will help us track down why it behaves differently when you concatenate another fileName onto the end. In the Auto-labelling on VCS widgets, we automatically shorten the fileName so you don't end up with a super wide label on the fader; evidently there is a different path through the fileName shortening code. Knowing which Sound this is would help us track down where that is happening. Thanks, Will!
Thanks! In this particular case it's the MultiSampleCloud.
...