Jump to content
Video Files on Forum ×

Undertanding the pitch, filter and amp envelopes.


dc2k

Recommended Posts

I guess the main question I am wondering is: 

How is the time calculated between levels?

 

For example in the screen capture below, for the filter envelope:

 

the initial level is set to 0

attack time is 60

attack level is 127

 

So how long in seconds is 60?

I'm guessing this calculated relative to the preceding and succeeding levels because if the initial level is set to 127, it will just skip the attack time altogether, no matter what it is set at.

 

Then the other thing confusing me is with the the pitch and amp envelopes.

If I set the same parameters say for the amp envelope:

 

the initial level is set to 0

attack time is 60

attack level is 127

 

That attack time is not equal to the attack time for the filter envelope.

Same thing happens with the pitch envelope.

 

I've been playing around with these envelopes for days trying to figure out what's happening.

Tried googling it and all you get is the same info about asdr and nobody says how time is calculated relative to the data points either side of it.

I also think asdr must be for analogue synths, right and not so relevant to these digital synth params?

 

Or can anyone recommend a book which explains this?

 

qF6ftOu.png

Link to comment
Share on other sites

Sorry if my response is not a great help.

 

A quick google suggests that the "time" in ADSR envelopes is commonly milliseconds, but NOT ALWAYS (either because of inaccuracy, or the use of other units of measure). However, not having a Casio in my hands as yet, it looks as though these values are set at Midi values, dividing the maximum values up in 128 increments. I dont think it is relative - though it could be, and before I confuse matters by making more guesses, I will move on to my main point.

 

Whilst I can understand your desire to know exactly what it is (and indeed I am curious myself now), the fact is that by making changes to the envelope, you should be able to establish for yourself the effect on the sound, particularly at the extreme and near extreme settings. With this in mind, knowing the unit if measurement really doesn't make any difference, as the number then just provides you with a guide to the results you should expect with the values in between. Equally, as you become more familiar with the unit, you will begin to judge quite accurately the effect of small incremental movements. As I say, I do not really think knowing the figures will improve this process very much.

Link to comment
Share on other sites

So, from the info above I guess it seems every synth has their own set timings. I thought it would be a fixed thing.

 

But say if I measured roughly (using a stop watch)  in seconds for the amp attack time if:

 

the initial level is set to 0

attack time is 127

attack level is 127

 

I've done that with a single note depressed and it seems it takes about 9.6 seconds to go from 0 to 127.

 

But surely there must be some standard equation which is used to calculate what the time in seconds would be if say the attack time was set to 64?

 

I've done that and I would have expected it to take maybe ~5 seconds (as 64 is half of 127), but no, it takes about .5 to 1 second.

 

Anyone know?

Link to comment
Share on other sites

Here's another example of something I can't figure out:

 

Two sine waves in a hex layer.

 

Sine wave 1:

 

Initial level: 127

Attack time: 45

Attack level: 0

Decay1 Time: 0

Decay1 Level: 127

Decay2 Time:45

Decay2 Level: 0

 

Sine wave 2:

 

Initial level: 0

Attack time: 45

Attack level: 127

Decay1 Time: 0

Decay1 Level: 0

Decay2 Time:45

Decay2 Level: 127

 

MQmnAlc.png

 

I would expect them to be in sync like sine wave 1 hits 127 while sine wave 2 hits 0 and then that repeats.

But what actually happens is that while sine wave 1 hits 127 the first time, sine wave 2 goes from 0 to 127 in quick succession twice, and then sine wave 1 hits 127 the second time about two seconds later.

 

 

Why does that happen?

Link to comment
Share on other sites

Regarding timing, if I were to speculate, and I love to speculate :) , I would suppose that the timing is related to BPM (Beats per minute) and the number of microseconds assigned to a quarter note by the PX-5s.  In order for the PX-5s to understand it's own midi timing, there is meta-data that is tied to the duration of a quarter note depending on the tempo setting.  This meta data is microseconds.

 

In theory, if you can capture the tempo meta data (using something like Midi OX) when you start a song or a Phrase with the PX-5s as the master, then you can figure out how many microseconds are in a single quarter note for a particular Tempo (BPM).

 

What does as all that mean? Well, continuing to speculate, when we say the BPM range on the PX is 20 to 255 where 20 is the longest time and 255 is the shortest time between quarter notes; and  the interval of an envelope duration is 0 to 127 where 0 is instant, and 127 is the longest interval, we can grade the envelope interval over the BPM which is 255 minus 20 which is 235 steps.  That's about 1.85 envelope time intervals per BPM.

 

The idea would be that the microseconds per quarter note based on the divisions between the minimum and maximum BPM would be the durations used in the envelope time.  Not knowing the microseconds, we can make a pretty good guess that 60 BPM would be 1 quarter note per second.  If we assume that the envelope interval used 4 quarter note durations (no real logic here - 4 just to establish a solid beat) then an envelope setting equal to 60 BPM would be 4 seconds:

 

255-((1.85*envelope interval)) would be the approximate value of the envelope interval to BPM.  The higher the BPM, the lower the seconds should be.  If we always assume there's 60 seconds in a minute, then we can divide that by the BPM and multiply it times our 4 beats to get our duration.  (60/BPM)*4

 

for example, our figures and formulas aren't super accurate, but they'll do. Let's see what are formulas yield for an envelope of envelope interval of 105.  That should be a BPM of about 60:

 

255-(1.85*105) = 60.75.  Let's plug that result into our beat formula to return our seconds. we want to end up with a value of 4

(60/60.75)*4 = 3.95

 

Pretty close.  Now let's see what 127 yields - hopefully it is close the 9.6 seconds dc2k timed above:

 

255-(1.85*127) = 20.05

(60/20.05)*4 = 11.97

 

Close, but off by a couple of seconds.  Maybe if we adjusted the 4 to 3 we'd get closer:

 

8.98 - off by about a second.  So maybe there's some reason in the formulas.  Maybe 3.33 is the golden number.

 

Whatever the case, maybe using the microseconds could produce a fairly accurate representation.  Again, I'm just taking some guesses based on some loose midi functioning ideas.

Link to comment
Share on other sites

woah, thanks for the long reply choppin. Seems to be way above my pay grade to comprehend much of that.

I think I need a degree in something first. :lol:

 

I'm gonna keep reading over it though, maybe it will click.

Didn't think it would be this complicated TBH.

Thought I was asking a newb question. 

Link to comment
Share on other sites

The shorter version:

 

The guess is that the envelope time is related to how the PX-5s would calculate tempo in beats per minute (BPM)

 

We'll assume that it uses the base line of a measure with 4 beats (4 quarter notes).

 

At a rate of 60 beats per minute, we can assume that 1 quarter note is 1 second, so our base line becomes 4 beats in 4 seconds.

 

We try to apply that assumption to the values of 0 to 127 for an envelope setting.  However, the minimum and maximum BPM on the px-5s goes from 20 to 255.  That's 235 steps.  We divide 235 by 127 to get the beats per minute in terms of our 0 to 127 scale.

 

Then we apply the formulas in the previous post to get a rough idea of the seconds.  The goal is to use our base line 4 beats in 4 seconds at 60 BPM and apply it to any new BPM that is derived from our scale.  I talked about microseconds because if we captured those from the px when it is playing a song at a certain tempo, then we would no exactly how long the px considers a beat to be.

 

This is just an idea.  It doesn't mean this is how the durations are timed, but at 3.33333 as a base unit instead of 4, it comes pretty close - at least to your 9.6 at 127 and your 1 second at 64

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.