Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / music fade in/out

Author
Message
Wik
21
Years of Service
User Offline
Joined: 21st May 2003
Location: CT, United States
Posted: 10th Aug 2003 21:03
i don't think its possible but, can u have it so music fades out and then a different music file fades in? i no u can do this with .wavs but can u do it w/.mid

tahnk u
Intel P4 2.66 GHz (533MHz), Radeon 9000pro 60Gb hd...Self-Built
Hamish McHaggis
22
Years of Service
User Offline
Joined: 13th Dec 2002
Location: Modgnik Detinu
Posted: 10th Aug 2003 22:48
I got this from a few posts down . It's a secret command, but doesn't work with .mid, just .mod and .mp3. You could probably get a convertor somewhere.

SET MUSIC VOLUME music number, volume

cuRant PRogekt: a three-de map editer
Why the hell'd you ask me for crying out loud!?!
Athelon XP 1400 Plus - Nvidia Geforce MX400 - 256mb RAM
Mentor
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 10th Aug 2003 22:53
midi hasn`t got a volume command, its the way it was made originaly, get a converter and make it into mp3 or wav or something more flexible (mid`s are small though, something you might like to remember if you plan to sell the finished thing over the net),cheers.

Mentor.

John H
Retired Moderator
22
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 11th Aug 2003 02:02
Try making it a 3D sound and gradually moving it away from the user.

RPGamer

Current Project: Eternal Destiny
Porting all files to my new computer
Mentor
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 11th Aug 2003 16:22
@RPGamer: that would be a good except you can only load wav as 3d sounds, so if you converted it to wav you could lower the volume anyway, remember it just fakes 3D, moving a sound away lowers the volume on both channels based on the distance to the scource, there is no sound ACTUALY being moved away, it`s easy to get carried away and apply real world physics or vice versa sometimes, I must admit I was guilty of saying (without thinking as someone pointed out some weird stringy clouds) "thats a lousy texture, it ought to bigger!" , it gets us all you know, it`s when you go shopping and start thinking

gosub canned_meats
canned_meats:
if tin$="corned beef"
for i=1 to wanted
load "corned beef",trolley
next i
return

then you KNOW you`re overdoing it and need a break .

Mentor.

empty
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 11th Aug 2003 18:40
Quote: "
midi hasn`t got a volume command, its the way it was made originaly
"

Midi has got a volume command. Control Number 07: Channel Volume (formerly known as Main Volume)

I awoke in a fever. The bedclothes were all soaked in sweat.
She said "You've been having a nightmare and it's not over yet"
Wik
21
Years of Service
User Offline
Joined: 21st May 2003
Location: CT, United States
Posted: 11th Aug 2003 19:58 Edited at: 11th Aug 2003 19:59
whered u find that?


and wats the syntax?

Intel P4 2.66 GHz (533MHz), Radeon 9000pro 60Gb hd...Self-Built
empty
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 11th Aug 2003 20:16
No, I meant the MIDI specifications allow you to change the volume. DB doesn't unfortunately.

I awoke in a fever. The bedclothes were all soaked in sweat.
She said "You've been having a nightmare and it's not over yet"
Mentor
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 11th Aug 2003 21:17
but the FORMAT doesn`t have instructions for global volume since it is a script that selects and plays specified musical notes at a specific pitch/frequency, with some added instructions for attack and decay, which is why as a playback stream it has no volume setting, the instruction you list is for midi hardware, like the volume control on your radio it has no effect on the actual instructions, just on the amplifier settings, you COULD recomile a script to play softer, but I never saw any software to do that, try to find some that resaves midi at another volume setting, you won`t!, there is some difference between the midi standard for hardware and the midi instruction set for playing music, the raw instruction sequence is stripped of any commands intended for MIDI consoles and synthesisers, that was one of the reasons it was adopted for home computers, since it is just a script to play music, it is very compact, and back when a good home computer had only 64k it allowed you to store some decent game music in very small files, it`s a pity they never thought to give us control of the audio mixer in windows though, you could have turned the output down on the midi hardware channel if the audio chipset supported it, that would had the same effect, cheers.

Mentor.

empty
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 11th Aug 2003 22:10 Edited at: 11th Aug 2003 22:14
Quote: "
but I never saw any software to do that, try to find some that resaves midi at another volume setting, you won`t!
"

I will and I have. Actually any decent Midi-Sequencer can do it.

Quote: "
there is some difference between the midi standard for hardware and the midi instruction set for playing music, the raw instruction sequence is stripped of any commands intended for MIDI consoles and synthesisers
"

With "midi instruction set for playing music" you mean standard midi files? If so then your statement is wrong since SMFs can contain all information the midi specification provides.


It is possible to create fades in midi files but they have to be defined in the midi file already .
It would be possible to create fades in run-time. Either- as you mentioned- with the Windows Mixer; that would only work if the soundcard supports it (most do). Or the playback engine controls the volume settings for each MIDI channel. This wouldn't be simple to implement, yet it is possible.

I awoke in a fever. The bedclothes were all soaked in sweat.
She said "You've been having a nightmare and it's not over yet"
Mentor
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 11th Aug 2003 23:27
ok I checked and stand corrected, it was the midi chips in 8 bit machines like the C64 I was thinking of, they had no way to alter the playback volume during play, I knew I had programmed and learnt that MIDI couldn`t be altered, nowdays PC`s are able to handle that sort of thing and I suspect (since all the stuff I just read was about MIDI 2.x etc), that it was maybe added some time during it`s early history, I am pretty sure from stuff we did that MIDI din`t have a way to alter the volume early on, it was just a way to send note data from device to device (hence all those knobs for settings on older midi stuff), nowdays they seem to have enough data to cover everything. live and learn

Mentor.

empty
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 11th Aug 2003 23:45 Edited at: 12th Aug 2003 00:56
Even with Midi 1.0 you could alter volume settings (although a lot of old synths didn't support this nor a lot of other things).
BTW a good source is http://www.midi.org.
(Don't wanna sound like a know-all but working with Midi and stuff is part of my job).

I awoke in a fever. The bedclothes were all soaked in sweat.
She said "You've been having a nightmare and it's not over yet"
Wik
21
Years of Service
User Offline
Joined: 21st May 2003
Location: CT, United States
Posted: 12th Aug 2003 03:41
r u talking about setting the volume 4 the hole thing or just at the moment?

sorry i really don't understand wat u guys r talking about. all i no is that midi is a music format and can't have words/voices

Intel P4 2.66 GHz (533MHz), Radeon 9000pro 60Gb hd...Self-Built
chilledoutjohn
21
Years of Service
User Offline
Joined: 10th Aug 2003
Location:
Posted: 16th Aug 2003 14:58
Basicly the computer has lets say its own keyboard (sythisiser) built in. a midi file tells the computer what keys to press, what sounds (voices) to use at what time. thats why its got that old game sounding quallity. Because in escence all the computer is doing is playing a keyboard there is no way you can have voices. As the file is basicly a list of comands a computerised sheet of music its lovely and small genius! and to my knowledge thats what a midi file is

Mr Underhill
22
Years of Service
User Offline
Joined: 23rd Apr 2003
Location: The Forgotten Worlds...
Posted: 16th Aug 2003 20:14
DBPro can make music (including Midi's ) louder or softer, but DBC can't for some odd reason...

"You're drawing too much attention to yourself, 'Mr.Underhill'!" - Aragorn (Strider)

Login to post a reply

Server time is: 2025-05-19 16:17:29
Your offset time is: 2025-05-19 16:17:29