Convert a table to values (for a discrete Value List)

General Discussion about Plogue Bidule

Moderators: vincent@plogue, davidv, seb@plogue

jersmi
Posts: 3407
Joined: Tue Apr 19, 2005 4:18 pm
Location: Oakland, California

Convert a table to values (for a discrete Value List)

Postby jersmi » Sat Aug 19, 2017 2:16 am

Trying to think of a way to generate a list of values from a table (to put it another way, the Y values) to paste into a discrete Value List (to use as envelopes, gestures for midi pitchbend or whatever).

I have a wacky workaround using the LUT, which now looks like the Fir Table might be better just because it's a table with 4096 values. Then I have to copy/paste the bidule into a text editor and strip out all the parameter text and insert semicolons.... there has to be a better way! Help?

boonier
Posts: 982
Joined: Wed Sep 14, 2005 6:34 am
Location: Brighton, UK

Re: Convert a table to values (for a discrete Value List)

Postby boonier » Mon Aug 21, 2017 3:58 am

Hey Jersmi, are these tables that you've hand-drawn, as in, is that your preference?

Fairly recently I used Csound to create tables, saved them with ftsave (opcode), which spits out a text file of values. From there it is pretty simple to turn them into an array in Sublime Text, which you can use with Python to generate the bidule xml, as a preset file, or a layout. Thinking about it, there is probably a more elegant way of doing that with less steps, directly in the CsoundQT IDE (as Python runs directly in that).

Another possible way - off the top of my head - could be to paste the xml into Sublime again, like you have done, and do a regex search for a pattern and extract the values, and transpile them in the xml for the Discrete Value list. Once you have this setup it would be quick to repeat......

jersmi
Posts: 3407
Joined: Tue Apr 19, 2005 4:18 pm
Location: Oakland, California

Re: Convert a table to values (for a discrete Value List)

Postby jersmi » Mon Aug 21, 2017 2:04 pm

boonier wrote:Hey Jersmi, are these tables that you've hand-drawn, as in, is that your preference?

Well, by fortune I am a visual kind of person, so I really do like a good GUI....

Because of my bad fortune (one might ask why oh why did I stick with Bidule), my favorite solution would be if Seb could make a discrete LUT (or graph by some other name, with some longer tables) and some way to drive it (Accum or Counter -- maybe even built in to the table?).

boonier wrote:Fairly recently I used Csound

I've only dabbled in CSound, certainly aware of its place in the world, its history and power....

boonier wrote:there is probably a more elegant way of doing that with less steps

Less steps is what this post was about. :)

boonier wrote:Another possible way - off the top of my head - could be to paste the xml into Sublime again, like you have done, and do a regex search for a pattern and extract the values, and transpile them in the xml for the Discrete Value list. Once you have this setup it would be quick to repeat......

I'm not too far from here right now, and since I'm not making that many presets, I find it about as easy to paste the values directly back to the Value List text area.

boonier
Posts: 982
Joined: Wed Sep 14, 2005 6:34 am
Location: Brighton, UK

Re: Convert a table to values (for a discrete Value List)

Postby boonier » Thu Aug 24, 2017 11:04 am

Jermsi - not sure I fully understand what you're trying to do sorry

Seb - I noticed when playing with the LUT that it has the double click functionality to make log/exp curves, but there seems to be an issue with making a exponential curve. The second point jumps abruptly:

expcurve.png
expcurve.png (153.59 KiB) Viewed 242 times

boonier
Posts: 982
Joined: Wed Sep 14, 2005 6:34 am
Location: Brighton, UK

Re: Convert a table to values (for a discrete Value List)

Postby boonier » Thu Aug 24, 2017 11:08 am

Code: Select all

<Parameter id="0" userMin="-1" userMax="1" lockedForRandom="false" mutationFactor="0.1">0.0</Parameter>
<Parameter id="1" userMin="-1" userMax="1" lockedForRandom="false" mutationFactor="0.1">0.368600</Parameter>
<Parameter id="2" userMin="-1" userMax="1" lockedForRandom="false" mutationFactor="0.1">0.369322</Parameter>
<Parameter id="3" userMin="-1" userMax="1" lockedForRandom="false" mutationFactor="0.1">0.370046</Parameter>
<Parameter id="4" userMin="-1" userMax="1" lockedForRandom="false" mutationFactor="0.1">0.370770</Parameter>


I even tried starting value 0.0001 as I know exponential fns get all antsy if you feed them 0.

Ps. this is the latest Bidule

seb@plogue
Site Admin
Posts: 9587
Joined: Tue Mar 02, 2004 7:23 pm
Location: Montreal
Contact:

Re: Convert a table to values (for a discrete Value List)

Postby seb@plogue » Thu Aug 24, 2017 1:09 pm

I'll look into it.

jersmi
Posts: 3407
Joined: Tue Apr 19, 2005 4:18 pm
Location: Oakland, California

Re: Convert a table to values (for a discrete Value List)

Postby jersmi » Thu Aug 24, 2017 1:32 pm

boonier wrote:Jermsi - not sure I fully understand what you're trying to do sorry

Thanks for pursuing this, boonier! I want to get LUT "Y" values into a Discrete Value List.

LUTtoList.png
LUTtoList.png (85.49 KiB) Viewed 238 times

boonier
Posts: 982
Joined: Wed Sep 14, 2005 6:34 am
Location: Brighton, UK

Re: Convert a table to values (for a discrete Value List)

Postby boonier » Thu Aug 24, 2017 3:41 pm

I guess there could be a save button much like the Map which spits out a text file. You'd still have to cut and paste it

Thinking of which you could set up something that accums through the LUT into Map and then you can save the file out from there.

We can't do any strings concatenation into a pmod into a value list as far as I know. Having some embedded Lang within bidule, like Python for example and and api to script it, would mean potentially loads of stuff could be done without Seb having to get involved.

jersmi
Posts: 3407
Joined: Tue Apr 19, 2005 4:18 pm
Location: Oakland, California

Re: Convert a table to values (for a discrete Value List)

Postby jersmi » Fri Aug 25, 2017 4:52 pm

Yeah, the map save is probably as close as it gets. Some kind of discrete graph or LUT would be the most awesome. Hope that's not too much trouble.


Return to “Bidule General”

Who is online

Users browsing this forum: No registered users and 4 guests