hi, sometimes when i am generating tones with reajs, i do something and then my counters stop counting and where before i was getting sound, suddenly i do not. Can anyone tell me why the x counter is not moving in this code, and why the y is not doing anything either? Sometimes i end up with code that just doesn't move, and i go through it one line at a time and check for mistakes and check for logic, and everything checks out. can someone tell me why this doesn't work? it was working a minute ago, and because the reajs editor is just really really hard to manage code with, i forgot what change i made that caused "ReaJS Freeze" This happens to me a lot, when my variables dont move. often it is because of a missing semicolon. but other times, i can't find the problem. Code:
For an effect like this that is supposed to generate audio without incoming MIDI events or audio, you will need to have the track on which the effect is, on record enable. (And maybe the input monitoring needs to be on too.) edit : There appears to be some other problem in the code too, though. It is producing wildly loud output samples. Those sound like there's just some clicking going on. The x variable changes values as expected as long as I have the track on record enable. edit2 : Somewhat improved version : Code:
edit: thanks something i can't understand right now is why when i adjust the frequency, the tone changes in big blocks instead of continuously. especially if the calculations are supposed to be happening at sample rate. can you try playing with the freq a bit and offer a theory why the intervals are stepped in tone and not continuous? here is the sound i am talking about. in the higher frequencies, you only get like 5 tones to describe thousands of values while adjusting the frequency:
I looked at your saw generator using the oscilloscope, and i noticed that the last step in the saw was a little attenuated. same with the first step. so I created a cheat whereby the steps in the saw wave are noted, and created a little logic for attenuating the last and first step in each saw wave. still the frequency changes sound chunky. Give it a shot. one thing i am mortified about is that high frequency stuff can't really be described by only a few samples. scary stuff because like how does any digital audio sound realistic? I guess high frequency stuff in digital audio is really low frequency if you consider how few samples are being used to describe that stuff. Code:
i guess i need to cave and study your library. i thought i would be able to learn more of what i dont know from a brute force method of inventing the wheel from scratch but now im curious what blep means ;) i do find it more difficult to reverse engineer other ppls code though.
--------------------- -Luke 1994 6-speed Supra BPU+FMIC+aquamist 1991 Galant VR-4 Turbo-AWD daily driver 2002 Audi S4 Avant
how do you band limit a step? is it sort of when you cause each step to advance at a separate rate? (assuming step means increment of a computational waveform)
In this case a step is the discontinuity in the waveform, e.g. the reset point of a saw, or when a square wave goes from high to low, or when a triangle changes direction, etc. If you create perfectly band-limited square wave by adding up sines (i.e. the Fourier series), then you will notice ringing ("bumps") around the discontinuities. The ringing is most present immediately around the discontinuity, further away from it quickly decreases. It turns out that only the ringing immediately around the discontinuity is important. So to construct a band-limited step you have to make sure that the ringing is there. A polyBLEP is a function that approximates this ringing.
--------------------- "True peace is not merly the absence of tension: it is the presence of justice..."