Page 1 of 1

Posted: 09 Jul 2008, 22:04
by bsork
Inspired by ethnix73 (see http://www.sensomusic.com/forums/viewtopic.php?id=844), I have created a patch that lets you define a list of "sounds" using either a normal sampler, a grain sampler, or MIDI one at the time. A "sound" (or entry as I've called in the patch), is for instance a file number with play mode, pitch, reverse on/off, start/end points, and level.

Even if the play list idea is of no interest to you, you might find some use for the sub-patch/script that maintains the list. With it, you can store sets of parameters within a single array, and add or truncate entries at the end, as well insert, update and delete entries from the array.

(...and if anyone thinks this last bit looks like some home-brew SQL, there's also a select button within the patch :P...)

Posted: 10 Jul 2008, 00:31
by moody33
Thanks for the script ! It rocks!
I don't know if will use the patch, but the script is already in my favorite.

I was asking Oliver about a module that could record values each time they change and then write them in txt file. Do you think that you could make one? A kind of "trace value" module with the ability to save as text file?

Thanks.

Posted: 10 Jul 2008, 08:14
by bsork
Thanks, I appreciate that it's appreciated! And I'm not sure if will use it myself - not in it's present incarnation anyway.

I don't think it would be hard to create such a module. Somewhere in the Demo folder, there's a script with an example of how to read and/or write to a text file (I don't quite remember), that I could use as a starting point. I think the parameter list could look something like this:

write (switch)
filename (txt)
datavalmode1..4 (off, write, check)
dataval1..4 (data)
textvalmode1..2 (off, write, check)
textval1..2 (txt)
arrayvalmode1..2 (off, write, check)
arraytval1..2 (array)

I guess having more than 1 value input would come in handy? You could for instance have some time info (seconds, bar/beats, position or whatever) as val1 with valmode1 = write, while the other value(s) are checked for any changes. When changes occur, a new line would be written to the file. I think I'll go for semi-colon to separate the values on each line. Text values would also be enclosed in double quotes, while array index numbers and a colon would precede the actual value.

That should cover most situations, wouldn't it?

Posted: 10 Jul 2008, 09:29
by senso
as usual, Bsork a master piece. You're a killer man!

Posted: 10 Jul 2008, 11:57
by moody33
Woooo..Bjork! I wasn't asking for a very complex script!
I only want 1 value input with change detection . Then the script should write values like this ( without comma) :

0
12
45
78
99

I plan to use the list combo to read the file ( Oliver plan to write a string to integer module wich one is needed to convert text infos ) after saving it in a text file . After, I want to copy paste into the list combo module.

Of course, feel free to imagine more complex things! I like it ! Your suggestion could be very useful . it's up to you , if you have time of course.

Thanks

Posted: 10 Jul 2008, 12:13
by bsork
OK, I think I'll start with the simpler script you're asking. Most of it can be reused for something more elaborate, and maybe I even get around to write something that goes the other way..? That is, reads from a text file and output data.
moody33 wrote:Woooo..Bjork
BTW, even if I'm going to be on Iceland in a couple of weeks, I'm neither Icelandic, female, famous nor a talented singer... ;)

Posted: 10 Jul 2008, 12:13
by ethnix73
Thanks Bsork...My patch is not yet ready.

Posted: 10 Jul 2008, 12:17
by bsork
Hi Ethnix73, I would like it if you uploaded the patch to the add-ons when it's finished. Your angle on solving the issue is so different from mine that I think it's really worthwhile to have both solutions available.

Posted: 10 Jul 2008, 12:25
by moody33
Good idea for "the thing that do the other way"!

What? You're not Bjork? What a shame. I was searching other script request only for talking to you my princess...
I'm sad now.

Posted: 10 Jul 2008, 12:53
by bsork
There, there... You'll get over it in time. :)

Posted: 10 Jul 2008, 23:51
by bsork