News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu

SOUND and ENV, how they work?

Started by ArtemKuchin, 17:44, 21 January 19

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ArtemKuchin

I am running WINAPE emulator and reading CPC464 user instructions.
I want to make a sound envlope that rises volume, sustains it a liitle and lower volume
10 ENV 1,10,1,5,10,0,5, 10,-1,520 SOUND 1,125000/5000,1000,1,1
From what i understand  line 10 defined an envelope which
1) Rises volume for 10 steps by  1, each step is 5/100sec, total 0.5s
2) Sustains volume for 10 steps by  1, each step is 5/100sec, total 0.5s
3) Lowers  volume for 10 steps by  1, each step is 5/100sec, total 0.5s

line 2 plays sound with such envelope and it does steps exactly as specified,so, after envelope finished it countinues playing quietly for 8.5 seconds.
So, sound playing time should match the envlope time (unless i want somespecifal effects), right?
Also, i dont' understand why step size is -127 to 127 if spet size specifies change in volume which can be only from 0 to 15.

ANother question:
If i change line 10 to

10 ENV 1,100,10,1,1,-15,1
From my undestanding it should create a pulsing effect for one second and then drop volume to zero. but no, it countinues sound with
pretty loud volume. Why?


Fessor

#1
For your first question:
Its the length-parameter of the Sound Command.Length=0 uses the duration of the ENV, and a negative value defines how many times the ENV would be repeated.

For your second question:
ENV 1,100,10,1,1,-8,1Your definiton have not ended on volume level 15

ArtemKuchin

Thank you for reply.
You helped me a lot pointing to how volume argument works. I skipped that in the description thinking that nothing special is there, just 0-15 volume.
Well, i stilll a little lost about how volume work within an envelope.
example:
ENV 1, 100, 1,1
It says make 100 steps of volume up.If i start at 0 then i goes like 1... 15, then what? 0...15 again? and again and again and finishes on unknown volumeORit rises to 15 and no more.Same question goes to negative steps.. 15...0 then 15 again or stick to 0 ?
From tests it seems like it is circular 0...15,0...15,0...15 and bacwards the same 15..0,15...0,15,...correct?


Fessor

It cycles around like VOLUME MOD 16 or VOLUME AND 15.
After 100 steps of adding 10 to the volume Level in your ENV you would have virtually Volume level 1000 which gives MOD 16 or AND 15 a resulting Volume Level of 8 after the first sequence is done.




remax

#4
You mean that we can't push the knob to 16 if we need that extra push over the cliff ? :(


Brain Radioactivity

Powered by SMFPacks Menu Editor Mod