From the original SynthMaker forum (2004–2014), with its members’ names and dates.
laserbeak43 ·
hi i wasn to know if how i can set the frequency range of the square osc module you guys made for me. i was so caught up in ooking at the data sheet for the soundchip that i didnt try to make my own square wave yet but i will once i understand how to set a frequency range.
the tone channels can produce 1024 different
frequencies, ranging from 122Hz to 125kHz.
thanks if you can give me some help i'd apreciate it. i might just need to learn some math it seems but i still wouldnt know where to use the math or why so please. tutor me 🙂[/img]
laserbeak43 ·
ok made my own square wave
not exactly sure how it works but i built it and am still looking at it now as we speak.
-edit1-
whats the number of samples in the int field for?
-just cut the number in half from 256 to 128 is that for visual purposes only? i assume so but it's just an analyser right?
jorge ·
laserbeak43, it's great to see you figuring out stuff like that
whats the number of samples in the int field for?
The analyser compiles machine code corresponding to the poly schematic connected to it. Once the machine code is compiled, the anaylser runs it NS ( NS=number of samples ) times to generate a graph with NS samples.
The display shows the graph with all the samples. The yellow dots are the actual samples and they're connected with a blue line. The best way to understand it is if you try it with just a few samples like 16, 32 etc.
jorge ·
laserbeak43 wrote: thanks if you can give me some help i'd apreciate it. i might just need to learn some math it seems but i still wouldnt know where to use the math or why so please. tutor me 🙂
I'll do my best to try and help you, dont worry about not knowing enough math, hopefully SM will make it easier for you to learn.
laserbeak43 ·
cool thanks for those replies. will look into them some more. do you think you could give me some help on setting frequencies?
and another thing when i turned my square wave into a module the floats were replaced with ins i had added an out too as well. is there a way that i can add the .5 float into the actual module and keep it thereor have phase settings that would keep it at square?
[/img]
jorge ·
here is how I'd fix your schematic:
at the moment, to use the analyser you need to copy and paste the poly section you want to analyse, you cannot share it with the actual synth. That might change in the future to be more flexible.
To add 0.5 to a poly input connector, just connect a float edit with the value 0.5 to it. Poly input connectors add all the values connected to it, that's why you dont have, and dont need a poly adder component.
laserbeak43 ·
but when i make my module the float input.5 and .01 are outside of the actual module
jorge ·
laserbeak43 wrote: but when i make my module the float input.5 and .01 are outside of the actual module
and what is the problem with that?
here is my square module:
and here is how you can analyse it:
I hope this screen captures somehow answer your question, if not please let me know exactly what the problem is.
laserbeak43 ·
just worried about the fact if i phase it too much it wont be a square anymore
jorge ·
laserbeak43 wrote: just worried about the fact if i phase it too much it wont be a square anymore
it wont be a pure square but it will be a pulse with varying width, that's what pwm is. When you add a value to phase, it goes from 0 to 1 and it wraps around the same way that 0 to 360 degrees wraps around. A phase of 1.1 will be the same as a phase of 2.1, 3.1 etc.
laserbeak43 ·
laserbeak43 wrote: hi i wasn to know if how i can set the frequency range of the square osc module you guys made for me
the tone channels can produce 1024 different
frequencies, ranging from 122Hz to 125kHz.
hehehe could use some help on this gonna have another look through the getting started guide. maybe it's in there i think i remember seeing it
laserbeak43 ·
jorge wrote: it wont be a pure square but it will be a pulse with varying width, that's what pwm is. When you add a value to phase, it goes from 0 to 1 and it wraps around the same way that 0 to 360 degrees wraps around. A phase of 1.1 will be the same as a phase of 2.1, 3.1 etc.
sweet thanks
so i can start duplicating these once i get the frequency ranges locked in lol sorry just in a humorous mood thanks for all of your help sincerely
jorge ·
here is how you can convert values from herts to zero-to-one:
in this example 122 Hertz is being converted to 0.00553288 zeroToOne.
laserbeak43 ·
how did you do that math?
jorge ·
laserbeak43 wrote: sweet thanks
so i can start duplicating these once i get the frequency ranges locked in lol sorry just in a humorous mood thanks for all of your help sincerely
You're welcome. SM seems to have an effect on you, maybe it is too colourful 🙂, or is it the bendy links?
laserbeak43 ·
a bit of both hahah it's a really comforting interface to work in. maybe it's because it's all white like the crazy house 🙂
jorge ·
laserbeak43 wrote: how did you do that math?
If 22050 Hz corresponds to 1, 11025Hz corresponds to 0.5, x Hz corresponds to x/22050.
jorge ·
after reading this whole thread once again, I think you might be trying to implement a fixed square wave rather than a pulse with pwm, if that's the case here is how the square module schematic should be:
laserbeak43 ·
just as i saw the mail notification for your post i had just finished mking that with mines. thanks for the reassurance now to take a look at the math example you showed me and figure it out for myself now will the math calculate itself if i were to change the parameters? and where would i assign knobs for the freq and pulsewidth on the floats or the actual freq and pwm inputs(if we were outside of the module)?
laserbeak43 ·
sorry just the freq
jorge ·
laserbeak43 wrote: will the math calculate itself if i were to change the parameters?
Yes, the new values are updated each time there is a change. The green connectors update each time a value changes while the white Poly connectors update 44100 times per second.
laserbeak43 wrote: and where would i assign knobs for the freq and pulsewidth on the floats or the actual freq and pwm inputs(if we were outside of the module)?
it depends on what you're trying to do, if you want to listen to the sound as you play Midi notes, you need to connect the first output of the MidiToPoly to the freq input of the square module. To control the pwm, if you want it to be constant, you can connect a knob straight to the pwm input of the square module. Although the green Float connector works in a different way to the poly connector ( because it updates only once rather than 44100 per second ) each time you connect a green float to a poly there is a conversion happening in the background so the Float data starts working as if it was poly data. In general do your calculations as much as possible with green data and at the end convert it to poly. You cannot convert poly to green float so whenever you have a calculation section that has poly data as input, the whole calculation will have to use poly components.
laserbeak43 ·
added the math is this hooked up right?
laserbeak43 ·
so for that math conversion i just posted.. would i have to use a poly multiply to bond the midi to poly and the calculation and then conect it to the freq?
jorge ·
laserbeak43 wrote: added the math is this hooked up right?
It doesnt look very right, it depends on what you're trying to do.
I think the easiest is if you tell me exactly what you're trying to achieve and I'll post a schematic here.
laserbeak43 ·
heheh soorry well i just want the midi notes to be able to trigger notes within that frequency range and them im gonna export a vsti and test out how it sounds before i go on any further 🙂
jorge ·
ok, so here is how you'd limit the input frequency to be a minimum of 122Hz.
if you also need to know how to create a VSTi from your schematic let me know.
jorge ·
I forgot to say in the previous post that 125Khz is too high a limit, SM only works up to 22050Hz ( assuming you're using a sampling rate of 44100 ), that's why I didnt limit the highest frequency in the schematic of my previous post.
laserbeak43 ·
well its an old ic from the 80s that i am trying to emulate it might be just my ignorane but i really dont thing the sample rate is as high as 441
still trying to find the details onthe samplerate tho
jorge ·
I'm going to sleep in the next 10 min, I'll try to answer the rest of your posts tomorrow.
laserbeak43 ·
thanks alot for your time!!! i'll make only a few posts to not overwhelm you 🙂
Wrote something here? To have a post removed or your name hidden, write to [email protected].