-
1 Attachment(s)
Sample 'set Volume' bug?
Hi
I think i have found a bug with the 'set sample volume' command ( see .mfa attachment at ottom of post )
...
The Application is simple:
- The player allways moves to the right, colliding with 4 Barricade Instances on the way.
- When Player Collides with a Barricade a sample "Bash 1" should play and sample volume of "Bash 1" is set to 0.
But althought i set the specific Sample Volume to 0 for each Collision, some of the Collisions still produce Samples wich can be heard ( their Volume is not set to 0 ).
Can someone pleace confirm this?
EDIT: And also the Player looks like hes making a jump in his movement when Colliding with the first Barricade.
-
I think you have to set sample volumes at Start of Frame. Haven't tested this but remember having problems with it ages ago and this should be the solution.
EDIT: or at least before the sample is actually triggered
-
1 Attachment(s)
If you use a value of some kind,.it will work. It's a bug in MMF and has been for awhile. Here's a work around. Run the frame as normal and the second time the objects that's moving comes around press the spacebar before the object collides with the other object or even when or does collide with the object.
-
I think i get how this works now, im pretty sure of it.
It seems like when MMF2 is reffering to a Sample Instance, it is always reffering to the first Instace ( and only the first ) in the Channel que regardless.
...
For example i have this Event:
- Uppon pressing SpaceBar
--> Play Sample "Bonus3"
--> Set Volume of "Bonus3" to 0
If i press 'Spacebar' three times in a row, the Sample "Bonus3" will play on:
Cannel#1
Cannel#2
Cannel#3
But only the very first "Bonus3" Sampel in the que will get muted ( in this case the Sample on Channel#1 ).
...
Im very convinced this is how it works, but if anyone have a different oppinion on this pleace feel free to chip in.
-
SolarB, setting Sample Volume prior to playing the Sample doesnt affect the Sample at all.
-
I didnt uderstand....when u set the volume to 0 you trying to stop this sample? I have not yet started working with sounds, but when you play a sample that have 3 seconds..when finished it sample dont stop?
i'm confused, i'm sorry
-
Ill make a crystal clear example of the problem i am experiencing in a minute.
In the mean time try to understand this:
- MMF2 have 32 Audio Channels
- Each Channel can only play 1 Sample at a time
- When you use the 'Play Sample' action, MMF2 automatically finds the first empty Audio Channel and plays the Sample there ( Im guessing it starts checking at Channel#1 and goes up ).
Pleace do correct me if im wrong.
-
1 Attachment(s)
OK so here is the example ( see .mfa attachment at bottom of post ).
It has only 1 relevant Event 'Uppon pressing Speace' wich plays a specific Sample, and sets the specific Samples Volume to 0.
Further there are Counters displaying data about Audio Channels 1 - 4.
Specifically the data displays #1 if there is a sample playing on the Channel or not ( 0/ 1 ), and #2 the Channels Volum level ( 0 - 100 ).
...
What you can see from the example is that when you play a Sample, MMF2 automatically finds the first empty Channel and plays the Sample on that Channel.
The Event plays the Sample in the first empty Channel, but only changes the Volume of Channel#1.
-
1 Attachment(s)
Here is a better example ( see bottom of post for .mfa attachment ).
- Press "CTRL" to play Sample "Bonus2" 4 times.
- Press "SPACE" to set Sample "Bonus2" Volume to 0 ( mute ).
...
It seems that the Action 'Set Sample Volume' is somewhat flawed.
'Set Sample Volume' allways points to Channel#1 regardless of what Channel/s the Sample is being played on, so for Applications with multisamples ( checked by default in MMF2 ) this Action is missleading and bugged.
-
It may be a bit late (and of course it's always better to use different channels) but the problem can be solved by using:
+on event:
--> stop sample
--> play sample
--> set sample volume