From the original SynthMaker forum (2004–2014), with its members’ names and dates.
manambruster ·
Hi
Can I access to the int value of a sample in a wav file and then copy it to a Integer component? I am trying to do a Convolution reverb with SM and I need to load the impulse response recorded as .wav.
I want to load all the samples from this wav in separated Integer components, so they can be more than 1000.
How can I do that?
Thank you very much
Alex
oddson ·
Sounds very ambitious...
I don't know if S|M is up to the math processing... the code module does not take array input. (I don't really understand the process all that well so I don't know if it can be done on not.)
For the specific question you've asked: see the component reference (on the download page) for the Wave File and Wave Read components.
EDIT - on second thought that won't do it. How many samples will the wave file have? (Max?)
You may be able to use the Mem to Float Array Min/Max primitive with 1 as the 'average over' input... if you limit the impulse signal to a reasonable number.
oddson ·
You may be able to use the Mem to Float Array Min/Max primitive with 1 as the 'average over' input... if you limit the impulse signal to a reasonable number.
Yes... that seems to work
The wave loader is lifter out of the wave player.
The min and max arrays should be the same given the bin size is 1.
manambruster ·
Thanks for your interest oddson!
I have done the same
But I think that this don´t work as I was wondering.
I want to access to the integer value of a sample, with this I can only know the number of samples that has a .wav file. Every connector in my graphic shows the same number 7633, that is the number of samples of my wav file.
With the wave loader you have made mem component, that is an array of 7633 floats, if I want to know the value of each of this float, how can I do this??
oddson ·
The float arrays contain all the sample values...
The min and max arrays should be the same given the bin size is 1.
The component is intended to give min/max values for bin ranges. But if you set the bin to 1 you get each sample value. Just don't do it an a large wave file or everything would grind to a halt.
oddson ·
You need to understand how the Array components work and how to extract values from them.
Page 90 of the component reference (see downloads page) orTHIS PAGE of the WIKI will show you how the 'Float Array Get At' component extracts single values from an array.
But you might want to know that S|M does not have FFT/iFFT abilities that would allow you to implement convolution at this time. So if that's your only interest in SM you will likely be disappointed.
manambruster ·
Thank you oddson
Yes, I have finally obtained the float value with the get at component and all works well.
I have done the convolution algorythm in SM adding and multiplying integer components and it works too!
In a few days I think that I could show you all ensambled and a first version of my convolution reverb is going to be ready
oddson ·
I thought that convolution involves EITHER shifting to the frequency domain (hense requiring FFT/iFFT) OR brute-forcing through each sample in the time domain -- that is for an m-size impulse you need an m-order FIR... which would be way too expensive to do (and virtually impossible without array input in the code module).
So what am I not understanding??? 😕
manambruster ·
Yes oddson, you are right
I am using the bruteforce way... 😕
Here you can see how I am doing things, but it doesn´t work yet, I have to fix it a lot...
http://www.megaupload.com/?d=TXTUK06J
This is a module who makes convolution between an imput signal and the 256 first samples from a .wav
The bruteforce scheme is not from me, is capsLock who has done the hard work, it is a small module that operates with 64 coefficients. I am trying to load the .wav samples in different modules, but it is going to be very hard for me
If I want to convolve a signal with a impulse response from a reverb...
for a 5 second reverb -> 44.1k * 5 sg= 220500, divided by 64 = 3446 modules , this example consists only on 4 modules. But if I arrive to make it works it is going to be possible, if my cpu supports it...
manambruster ·
Hey
When I was connecting my module number 6 (convolution for 6x64 coefficients) a compilation error shows me this message:
CComp::CompileAll> error:: codeInit>40000
has anybody had the same compilation error? What´s the meaning of?
Is now the moment to jump throw my window?
Thanks....
ronaldpassion ·
i am still waiting and searching about convolution idea...
really promise concept!
best regards
Wrote something here? To have a post removed or your name hidden, write to [email protected].