Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (7th_zorro, Ayumi, AndrewAMD, Quad), 1,014 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 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: 929
Spirit Offline

Moderator
Spirit  Offline

Moderator

Joined: Sep 2003
Posts: 929
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 | chip programmers | 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