From the original SynthMaker forum (2004–2014), with its members’ names and dates.
exonerate ·
i've got quite a few wave's in text format and i was wondering how to go about geting all 256 points of the wave into the float array component, i know you can use the loop component to set a value at each index, but it seem that this way you can only set the same value for each index.
but obviously each point of the wave is different so i want to create an array containing the 256 different points. i know you can just connect the text file to the wavetable component and then to the wave read to create the wave, but i'm looking for the ability to be able to just call upon different points from different array's and then combine them to create complex waveforms.
it's going to be a ball ache if i have to set the values all individualy, and to be honest i'm not sure if it's even going to be worth doing.
is there an easier way of doing this?, and better still is it worth while?
i'd apreciate any advice, and to be honest i'm not sure if this aproach would have any benifit to just creating wave's in the wave drawmodule.
BasherT ·
Hi
I think it is possible to build a schematic that will speed the process of creating an array. I have an idea based upon the wave loader from the wiki but to help you further I need to understand the format of your txt file so that I can try to build a parser. Can you post an example txt file?
As to whether your idea is worthwhile? I have no idea but sometimes trying something for the hell of it is half the fun
oddson ·
What would make this a lot easier is array math components. Loops are too slow.
matti ·
exonerate wrote: i've got quite a few wave's in text format and i was wondering how to go about geting all 256 points of the wave into the float array component, i know you can use the loop component to set a value at each index, but it seem that this way you can only set the same value for each index.
How about a Float Array Section. Connect your string to it and extract 256 samples.
exonerate ·
thank's for the reply's guy's ,
i must have been really tired last night, cos i've had a bash at it today and i've done what i wanted to do, which was to place each point of a text wave into it's own index in an array,
here's a picture of the schematic.....
as you can see it was just a simple case of connecting the loop to both the get at component and the array.
so the loop cause's the get at component to go through each of the point's in the wave and pass them to the array, and at the same time the array is saving each point into a separate index, simple!!
there's also a get at component after the array, so now i can use that to extract each separate point of the text wave.
here's the osm if anyone want's to have a look
http://www.sharebigfile.com/file/78646/wavearray-osm.html
also here are just a few text wave's from my toolbox, there all in side there own module's ready to plug and play.
http://www.sharebigfile.com/file/78653/waves-osm.html
basherT thank's for offering to help if you still want the text file's i've posted them above.
matti ·
The method i ment was to treat the string as an array in the first place. Because you can do that in SM. I made a demo of it. It is a lot simpler than extracting the data from the text file one row at a time(well i saw that was automated, but still)
It's at the bottom there.. You get the same result with a lot less going on. Or you could just use the string primitives as your array modules(no real need for the array section). Make calculations on them with the array math primitives. Like this:
exonerate ·
ah yes, that is a lot simpler
at the time of working this out i was sure that i needed an array.
my thinking was that i needed the array to pass the point's to the wavetable component. but i see that the section module can be used for that and then i can use the get at component to extract point's from that for further processing.
mind you thinking about it i probaly will need an array because after i've extracted lot's of different point's with the get at they then become normal floats which can't be connected to the section component and it seem's that you can't collect them together with the text component.
so i think that the only way to do that would be to use an array to collect all the point's and then connect to the wave table to create the wave.
basicly my idea now is to be able to create random waveforms with the click of a button, by using lot's of different text wave's and then randomly extracting point's from each wave and then bringing them altogether in an array connected to a wavetable.
i'm thinking that the new random component will help with this by sending random number's to the index of the get at component.
right my mind is working at a hundred miles an hour now, i was just thinking that once each point has turned into a normal float i'm going to struggle getting them into an array, so instead of using the get at to extract point's i'm going to use section set to one sample then it's going to be easier to connect everything up to the wavetable.
right i'm going to start on this now, thank's for the tip's matti they should help me in my quest, cheers
Wrote something here? To have a post removed or your name hidden, write to [email protected].