If you have a problem or need to report a bug please email : support@dsprobotics.com
There are 3 sections to this support area:
DOWNLOADS: access to product manuals, support files and drivers
HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects
USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here
NEW REGISTRATIONS - please contact us if you wish to register on the forum
Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright
Phase input for Razorblade Wave Read?
18 posts
• Page 1 of 2 • 1, 2
Phase input for Razorblade Wave Read?
A possibly ignorant, ingrate, foolish question for the DSP egg-spurts around here -
Is it possible to give the brilliant Wave read system put together by tula and Spogg (with input from nix and kg_is_back) a phase input? Would be really interesting to use some of the ESQ-1 / SQ-80 waveforms in FM Carriers.
I actually experimented with saving some of them as .txt and float arrays to use with the Wave Table Read osc, but of course without the additional processing many don't sound right and don't change at different points on the kybd. The ones that do sound more or less right are still fun to play with being phase modulated, though. The phase input also allows for PWM (with a pair of oscs), which of course with other than saw waves is really just a very pleasant swirling phase sound; more effective on some shapes than others. Sometimes sounds a bit like a Leslie speaker. And 'PW' being swept by an EG can also sound quite nice.
Is it possible to give the brilliant Wave read system put together by tula and Spogg (with input from nix and kg_is_back) a phase input? Would be really interesting to use some of the ESQ-1 / SQ-80 waveforms in FM Carriers.
I actually experimented with saving some of them as .txt and float arrays to use with the Wave Table Read osc, but of course without the additional processing many don't sound right and don't change at different points on the kybd. The ones that do sound more or less right are still fun to play with being phase modulated, though. The phase input also allows for PWM (with a pair of oscs), which of course with other than saw waves is really just a very pleasant swirling phase sound; more effective on some shapes than others. Sometimes sounds a bit like a Leslie speaker. And 'PW' being swept by an EG can also sound quite nice.
Website for the plugins : http://kbrownsynthplugins.weebly.com/
- k brown
- Posts: 1198
- Joined: Tue Aug 16, 2016 7:10 pm
- Location: San Francisco, CA USA
Re: Phase input for Razorblade Wave Read?
Not easy to understand this schematic..
But here's a little fix, it might work, but maybe not perfect..
Not sure i keep the benefit of using double precision counter.. But is this really needed ?
But here's a little fix, it might work, but maybe not perfect..
Not sure i keep the benefit of using double precision counter.. But is this really needed ?
- Attachments
-
- SQ Wave Reader With Phase.fsm
- (1.25 MiB) Downloaded 1323 times
- Tepeix
- Posts: 361
- Joined: Sat Oct 16, 2021 3:11 pm
Re: Phase input for Razorblade Wave Read?
Yeah, I don't understand it either
Your mod mostly works.
Does PW/PWM with the saw wave. PWM (with PW at 50%) on the 'SAW 2' wave sounds very Hammond / Leslie-like
FM (audio rate modulation of phase) behaves very differently from a regular sine osc, and at moderate amounts creates some very sharp edges on the waveform. Almost looks like a Casio Phase Distortion wave.
In use, would have to switch between your phase input version and the original when the one-shot waves are selected - for some reason it results in double hits (with varying delay between hits) on the one-shot waves! But one wouldn't be PWM-ing or FM-ing those waves anywho.
Still very useful, thanks for having a go!
P.S. - What's your concern about the double precision mode - CPU load?
Your mod mostly works.
Does PW/PWM with the saw wave. PWM (with PW at 50%) on the 'SAW 2' wave sounds very Hammond / Leslie-like
FM (audio rate modulation of phase) behaves very differently from a regular sine osc, and at moderate amounts creates some very sharp edges on the waveform. Almost looks like a Casio Phase Distortion wave.
In use, would have to switch between your phase input version and the original when the one-shot waves are selected - for some reason it results in double hits (with varying delay between hits) on the one-shot waves! But one wouldn't be PWM-ing or FM-ing those waves anywho.
Still very useful, thanks for having a go!
P.S. - What's your concern about the double precision mode - CPU load?
Website for the plugins : http://kbrownsynthplugins.weebly.com/
- k brown
- Posts: 1198
- Joined: Tue Aug 16, 2016 7:10 pm
- Location: San Francisco, CA USA
Re: Phase input for Razorblade Wave Read?
Hum that's strange, i'm not very experimented in osc phase..
But maybe the difference is because my design could only do with the range input (0-1)..
Seeing more, classic osc provide a range, but it's more to know what value give this phase, and they are not limited to this range..
So here's an upgrade, now we could input any value and it loop from 0 to 1.
But maybe the difference is because my design could only do with the range input (0-1)..
Seeing more, classic osc provide a range, but it's more to know what value give this phase, and they are not limited to this range..
So here's an upgrade, now we could input any value and it loop from 0 to 1.
- Attachments
-
- SQ Wave Reader With Phase v2.fsm
- (1.25 MiB) Downloaded 1305 times
- Tepeix
- Posts: 361
- Joined: Sat Oct 16, 2021 3:11 pm
Re: Phase input for Razorblade Wave Read?
I don't really follow what you're saying, but this version still double triggers the one-shot waves, and the FM is maybe worse; more symmetrical, but with deeper, narrower spikes:
Testing the FM is simple. In the screenshot you see an amp marked FM; it's input is just connected to the output of a sine oscillator. The SQ osc sine is at wave index #2
To test the one-shots, they are #54 thru 74.
PW still works properly.
Testing the FM is simple. In the screenshot you see an amp marked FM; it's input is just connected to the output of a sine oscillator. The SQ osc sine is at wave index #2
To test the one-shots, they are #54 thru 74.
PW still works properly.
Website for the plugins : http://kbrownsynthplugins.weebly.com/
- k brown
- Posts: 1198
- Joined: Tue Aug 16, 2016 7:10 pm
- Location: San Francisco, CA USA
Re: Phase input for Razorblade Wave Read?
I’m a bit late to this party because I’ve been building a new PC, with all that entails.
I’d love to know what the ASM is doing to the integer and fractional values because I’m incapable of interpreting ASM code. Having messed about with it I would say it seems to work, with the limitations that Kevin refers to.
The DX system uses what they call a “phase accumulator” which is a fancy name for an index counter. The index step size, with no modulation, determines the base frequency. For modulation you could perturb the step size or add to and subtract from the index. The important thing is that the index counter wraps around so it never goes out of bounds for the waveform table. This means that for high levels of modulation you get a “wave folding” effect.
Another thing to consider is the modulating waveform’s symmetry. When you mix sinewaves, you always get a symmetrical waveform. If you have asymmetry, the base pitch of the carrier will shift with the level of modulator, because it will spend more time at a higher or lower frequency, depending on the type of asymmetry. I know this from my own experiments ages ago!
Double precision index counters are needed to play longer samples and aren’t needed for short wav clips and single cycle waves. If you don’t use double precision, when the index value gets really high the resolution limitation of 32 bit comes into play, so the integer index will no longer produce equal sized steps. That means that if you play a longer sample it will go out of tune as it plays through beyond a certain point. I first came across this when I was developing my granular stuff which could load and play longer wav files.
I’d love to know what the ASM is doing to the integer and fractional values because I’m incapable of interpreting ASM code. Having messed about with it I would say it seems to work, with the limitations that Kevin refers to.
The DX system uses what they call a “phase accumulator” which is a fancy name for an index counter. The index step size, with no modulation, determines the base frequency. For modulation you could perturb the step size or add to and subtract from the index. The important thing is that the index counter wraps around so it never goes out of bounds for the waveform table. This means that for high levels of modulation you get a “wave folding” effect.
Another thing to consider is the modulating waveform’s symmetry. When you mix sinewaves, you always get a symmetrical waveform. If you have asymmetry, the base pitch of the carrier will shift with the level of modulator, because it will spend more time at a higher or lower frequency, depending on the type of asymmetry. I know this from my own experiments ages ago!
Double precision index counters are needed to play longer samples and aren’t needed for short wav clips and single cycle waves. If you don’t use double precision, when the index value gets really high the resolution limitation of 32 bit comes into play, so the integer index will no longer produce equal sized steps. That means that if you play a longer sample it will go out of tune as it plays through beyond a certain point. I first came across this when I was developing my granular stuff which could load and play longer wav files.
-
Spogg - Posts: 3358
- Joined: Thu Nov 20, 2014 4:24 pm
- Location: Birmingham, England
Re: Phase input for Razorblade Wave Read?
Here's what do the asm code : the input phase is converted in int and frac, like for a delay,
then we only keep the frac.
(cvtps2dq xmm1,xmm1; = convert to int (round), cvtdq2ps xmm1,xmm1; = reconvert to float (because we could not subtract an int from a float) subps xmm0,xmm1; frac=phase-int.)
This way the frac is always 0 to 1 and loop when exceed. I think it's symmetrical, but maybe i must abs ??
Then i multiply this number with the size of the current mem.
Then i take the result of the counter, int and float and add it to the phase.
Now if the result exceed the size of the mem it subtract this size to it.
(as the phase could only be 0 to size, it never exceed and loop well like this)
Then again, the int and float is separated.. With the same Technic than a delay,
( y=x x-0.49999997; round(x) ; y-x= frac. x= int.)
But i have yet to understand what happen with FM. Maybe just multiply the phase by 0.5 ? Or maybe something might be done to reverse the phase when negative ?
But if the precise counter is not needed they might be simpler way to do this...
then we only keep the frac.
(cvtps2dq xmm1,xmm1; = convert to int (round), cvtdq2ps xmm1,xmm1; = reconvert to float (because we could not subtract an int from a float) subps xmm0,xmm1; frac=phase-int.)
This way the frac is always 0 to 1 and loop when exceed. I think it's symmetrical, but maybe i must abs ??
Then i multiply this number with the size of the current mem.
Then i take the result of the counter, int and float and add it to the phase.
Now if the result exceed the size of the mem it subtract this size to it.
(as the phase could only be 0 to size, it never exceed and loop well like this)
Then again, the int and float is separated.. With the same Technic than a delay,
( y=x x-0.49999997; round(x) ; y-x= frac. x= int.)
But i have yet to understand what happen with FM. Maybe just multiply the phase by 0.5 ? Or maybe something might be done to reverse the phase when negative ?
But if the precise counter is not needed they might be simpler way to do this...
- Tepeix
- Posts: 361
- Joined: Sat Oct 16, 2021 3:11 pm
Re: Phase input for Razorblade Wave Read?
Would like to test it, but where is the file with FM out ?
- Tepeix
- Posts: 361
- Joined: Sat Oct 16, 2021 3:11 pm
Re: Phase input for Razorblade Wave Read?
Here is my 2ct:
I totally agree with Spogg's comments regarding the precise counter. We could safely replace it by a simple counter for the present application.
I also agree with Tepeix' phase code v2. I am attaching my own version with comments (primarily for my own benefit, because otherwise I won't know what the heck all that is about by next week). It is almost identical to Tepeix' code.
So the remaining mystery are those FM spikes and double triggers that k brown is observing. Could we have the schem to see what`s going on?
I totally agree with Spogg's comments regarding the precise counter. We could safely replace it by a simple counter for the present application.
I also agree with Tepeix' phase code v2. I am attaching my own version with comments (primarily for my own benefit, because otherwise I won't know what the heck all that is about by next week). It is almost identical to Tepeix' code.
So the remaining mystery are those FM spikes and double triggers that k brown is observing. Could we have the schem to see what`s going on?
- Attachments
-
- Add_Phase_to_Index.fsm
- (1.08 KiB) Downloaded 1300 times
-
martinvicanek - Posts: 1328
- Joined: Sat Jun 22, 2013 8:28 pm
Re: Phase input for Razorblade Wave Read?
Thanks all for gnawing at this - can't follow the discussion as it's far above my head, but here's the little test schem using the Razorblade osc.
It's interesting that the deep spikes with FM only occur when taking the output from the osc directly. If taken from the output of the stream subtract used to do the PW with a pair of osc, the spikes are gone, but the FM forms flat spots that FM with regular sine oscs doesn't have.
The included iFFT Osc from the Analog Kit has an 'Add Phase' module between the Counter and the Interpolated Read; might be some clues there?
It's interesting that the deep spikes with FM only occur when taking the output from the osc directly. If taken from the output of the stream subtract used to do the PW with a pair of osc, the spikes are gone, but the FM forms flat spots that FM with regular sine oscs doesn't have.
The included iFFT Osc from the Analog Kit has an 'Add Phase' module between the Counter and the Interpolated Read; might be some clues there?
Last edited by k brown on Sun Aug 27, 2023 9:37 am, edited 1 time in total.
Website for the plugins : http://kbrownsynthplugins.weebly.com/
- k brown
- Posts: 1198
- Joined: Tue Aug 16, 2016 7:10 pm
- Location: San Francisco, CA USA
18 posts
• Page 1 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 4 guests