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?
Convert a table to values (for a discrete Value List)
Moderators: vincent@plogue, davidv, seb@plogue
Re: Convert a table to values (for a discrete Value List)
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......
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......
Re: Convert a table to values (for a discrete Value List)
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.
Re: Convert a table to values (for a discrete Value List)
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:
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:
Re: Convert a table to values (for a discrete Value List)
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
-
- Site Admin
- Posts: 9695
- Joined: Tue Mar 02, 2004 7:23 pm
- Location: Montreal
- Contact:
Re: Convert a table to values (for a discrete Value List)
I'll look into it.
Re: Convert a table to values (for a discrete Value List)
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.
Re: Convert a table to values (for a discrete Value List)
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.
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.
Re: Convert a table to values (for a discrete Value List)
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.
Who is online
Users browsing this forum: Bing [Bot] and 2 guests