Lets say I make a sound, using many oscillators in many different ways (additively, fm, am, subtractively using filters) and forming a sound. Is there a way to save this complex waveform in an array and use it as a single waveform / sound?
I was thinking to take out the sine waveforms of the final sound via fft~ and form a waveform somehow, by using the
[; waveform sinesum * * *... (
object.
Is this too much? Is there a simpler way to do this?
-
Save a created sound !? (Out of many oscillators).
-
Yes. If all the oscillators are harmonically related, then you can record a single cycle using [tabwrite~]. Ideally you'd pick a frequency in which the wavelength is a power-of-two number of samples if you want to use [tabosc4~] (make sure you add three extra samples for the 4-point interpolation).
Otherwise, you can just sample it like you would any other sample (again, using [tabwrite~]). Then, read it back using two [tabread4~]s, one offset a bit from the other, and cross-fade between the two. You can use a single [phasor~] for both [tabread4~]s, just make sure one is offset with [+~ ] and then run through [wrap~].
-
To tell the truth I didn't quite catch the offset / cross fade / 2 phasor~ part of the second solution.
Anyway. All the oscillators are controlled by a single midi keyboard so they are harmonically related.
So, I need a midi note that, when recorded, the number of positions in the array, that consist a period, is a power of two...?
So, I have:
44100 samples/sec
c = 343 m/s (sound speed) and
T= l/c .( l is the wavelength ).
Also use an array with [(power-of-2) + 3] points ..ex.size = 515
I have to use this data to find the midi note I need, so to have clear waveform? It sounds a little bit more complicated than described. Do you have any suggestions? Maybe already known settings?
Do I have any mistakein my thought?