Omnimaga
Calculator Community => TI Calculators => Axe => Topic started by: Keoni29 on September 24, 2011, 04:34:58 am
-
I want to generate custom waveforms from a wavetable so I want to know how exactly can you controll the frequency acurately since pause gives me very low frequencies.
This is the wavetable of a saw for instance:
_ _ __ __ ____
_ ____ ____ ___ __
I really don't know if this is going to work :P
-
Maybe use a simple for loop for your delay? For loops are pretty fast so it would give you some of the highest control of the possible delay.
-
Is this okay?
Lbl WAVE
.Gbd1WV is the wavetable that consists of 1's and 0's
.r1 is the delay between
.r2 is the amount of waves
for(C,0,r2
for(B,0,31
{Gbd1WV+B}->port
while 1
A+1->A
endif A=r1
end
end
-
Note that you will have to reset A every itteration, or else once it gets to r1, it the while loop will only execute once after that. You could also decide to set A to r1, and decrement A instead of incrementing it, and use an End!IF A, which would make it slightly faster I believe.
-
Lolthatsstupid :) Changed it:
Lbl WAVE
.Gbd1WV is the wavetable that consists of 1's and 0's
.r1 is the delay between
.r2 is the amount of waves
for(C,0,r2
for(B,0,31
{Gbd1WV+B}->port
r1->A
while 1
A-1->A
end!if A
end
end
Will this work?
-
Here's a more optimized version (which will probably allow you to use more precise values for r1)
While 1
GDB1WV
For(32)
{->r3}->Port
r1
While 1
End!If -1
r3+1
End
End!If r2-1->r2
Edit: Removed an unnecessary store instruction
-
Next step: Blending sound. The Idea is that the notes blend even if they're 3 "steps long" and another note from the other channel that is just one step long comes in the second step.
Like this:
|1 ||2 ||3 |
[A-3]
[C-2__________]
|1 ||2 ||3 |
How do I tackle this problem?
I made a white noise generator too with pretty awesome results:
While 1
rand^4->Port
r1
While 1
End!If -1
End!If r2-1->r2
-
I figured that there has to be a 30% duty cycly within a duty cycle to blend the sounds from 3 channels. Can I blend the sounds acurately?