Gamestudio Links
Zorro Links
Newest Posts
No connection to MT4
by JeyKey II. 11/22/26 10:49
MinMax function on History t6 file
by LucasJoshua. 11/21/26 14:28
What are you working on?
by rayp. 11/20/26 18:10
FXCM => AVA Trade Plugin???
by Martin_HH. 11/17/26 17:02
contractUpdate() is filtering if >2 rows
by mistery. 11/09/26 12:06
New Zorro version 3.15
by jcl. 11/09/26 09:24
Removing outliers from files
by jcl. 11/04/26 10:30
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
3 registered members (JeyKey II, Martin_HH, EW_bytes), 41,857 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EvanTJ, rht, MaliceTheMaker, Haitao_Ren, JimSimons
19250 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
code wav => mid #297812
11/10/09 01:52
11/10/09 01:52
Joined: Sep 2009
Posts: 155
France
ayks Offline OP
Member
ayks  Offline OP
Member

Joined: Sep 2009
Posts: 155
France
hi,
i found this code in aum66 (its for stop a wav with a slow descent of the volume)

Quote:
var loop_handle;
var loop_volume = 100;
sound atmosphere_wav = "atmosphere.wav";
function loop_startup()
{
loop_handle = snd_loop(atmosphere_wav, 80, 0);
while (!key_f) {wait (1);}
while (loop_volume > 1)
{
snd_tune(loop_handle, loop_volume, 0, 0);
loop_volume -= 0.5 * time_step; // 0.5 = vitesse de fondu
wait (1);
}
snd_stop (loop_handle);
}


but looks like it works only with .wav and not with .mid, tried to change some things like media instead of sound but it dont works.
i got a normal "wrong type invalid file".

so my question is : is there a solution with only some change to make it work for .mid and if yes, which one.
thx

Re: code wav => mid [Re: ayks] #297818
11/10/09 03:16
11/10/09 03:16
Joined: Jul 2008
Posts: 553
Singapore
delinkx Offline
User
delinkx  Offline
User

Joined: Jul 2008
Posts: 553
Singapore
well, snd_loop takes a SOUND structure. and the file formats supported here is .wav and .ogg. Media play supports more file types.

the fastest solution is to convert ur midi file to wave. u can use audacity (opensource) to do this.


A7 commercial Team / VC++ 2008 Pro
homepage | twitter | facebook
Re: code wav => mid [Re: delinkx] #297833
11/10/09 09:21
11/10/09 09:21
Joined: Sep 2003
Posts: 938
Spirit Offline

Moderator
Spirit  Offline

Moderator

Joined: Sep 2003
Posts: 938
Better convert it to ogg, that takes up less space.

MID is not a sound format but an instrument format.

Re: code wav => mid [Re: Spirit] #297844
11/10/09 11:17
11/10/09 11:17
Joined: Sep 2009
Posts: 155
France
ayks Offline OP
Member
ayks  Offline OP
Member

Joined: Sep 2009
Posts: 155
France
ok thx for the tips, i will try audacity now and will edit then for say the result.

i tried to convert to my .mid to .wav yesterday with an online converter but i got something like 17mo for a 7ko mid oO

hope i can convert mid to ogg with audacity.
and tx for the last info about mid :l

edit damn, both in normal quality take too much space, i will try to find a way to do it with mid -.

re-edit : i finally did it, not with a converter but with a direct record with audacity, cause looks like he has some problem with mid..


Last edited by ayks; 11/10/09 12:51.

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1