Since i can copy only a part of one bitmap, to another bitmap, can i do the same for sample music, like just play from 5. second to 10. second if a ninja kills a samurai in ninja vs samurai game? Are there functions that allow manuvering with parts of samples?
@frizider2 I've never really heard of anyone "filmstripping" their sounds, and I don't really think there would be much advantage in doing so. Sounds can vary a lot between themselves, while images are more simple, so filmstripping several actions of the same sprite leads to a smaller image size than saving them all separately.
I have an odd problem. When i put the midi in an if statement it only plays when the if statement is incorrect. im so confused. is there any way around this?
Hey first of all i've to say thank you. This tutorial is the best i've seen on the net. i'm spanish but it's so clear i can understand almost everything.
For those who have the same problem than me (the program doesn't crash but can't hear anything), here is the sollution:
Copy this code before loading the midi or the sample.
I got all the code and have double checked to make sure that everything is right. The program opens but nothing happens. I tryed set_volume() but that didn't help. PLEASE HELP!
you might check your set_volume function. If the program isn't crashing when you try to play then it should have loaded in correctly. Are any other sounds working?
This has been flagged as spam show
when my midi plays it only plays the first second then repeats real fast
kelly2000398 4 months ago
when my midi plays it only plays the first second then repeats real fast
kelly2000398 4 months ago
when my midi plays it only plays the first second then repeats real fast
kelly2000398 4 months ago
when my midi plays it only plays the first second then repeats real fast
kelly2000398 4 months ago
hmm, i don't seem to be able to play the sound in the game....
i get no errors, it just doesn't play...
any suggestions?? :S
retromelon123 8 months ago
I hate your videos.........Im getting no sleep, because I cant stop watching them :)
Nikon05 11 months ago
Since i can copy only a part of one bitmap, to another bitmap, can i do the same for sample music, like just play from 5. second to 10. second if a ninja kills a samurai in ninja vs samurai game? Are there functions that allow manuvering with parts of samples?
frizider2 11 months ago
@frizider2 I've never really heard of anyone "filmstripping" their sounds, and I don't really think there would be much advantage in doing so. Sounds can vary a lot between themselves, while images are more simple, so filmstripping several actions of the same sprite leads to a smaller image size than saving them all separately.
CoderRach 11 months ago
I have an odd problem. When i put the midi in an if statement it only plays when the if statement is incorrect. im so confused. is there any way around this?
TheMenkin 1 year ago
@TheMenkin Your if logic must be wrong, then.
LusikkaMage 1 year ago
@TheMenkin Check your equal signs. = is setting a value, == is comparing two.
DrunkenWaffle 2 months ago
Episode 1 has 25,000 views, yet this one only has under 3,000.
>.>
dukie67 1 year ago
Comment removed
AnewBANDareHERE 1 year ago
Hey first of all i've to say thank you. This tutorial is the best i've seen on the net. i'm spanish but it's so clear i can understand almost everything.
For those who have the same problem than me (the program doesn't crash but can't hear anything), here is the sollution:
Copy this code before loading the midi or the sample.
install_sound(DIGI_AUTODETECT, MIDI_AUTODETECT, "A");
Hope this help.
Bye!
DIOSMELO15 1 year ago 4
@DIOSMELO15
Thank You very much, I had the same problem as many others who posted here, that code really helped fix it!
enigmax91 1 year ago
I got all the code and have double checked to make sure that everything is right. The program opens but nothing happens. I tryed set_volume() but that didn't help. PLEASE HELP!
Wazzup800 2 years ago
Where are you post to put the sound and bitmaps so you only have to put the name and tag like she did?
ReGretDeath 2 years ago
What do you mean tag?
For these videos, I have the BITMAP and MIDI objects in main, and I call the functions to use them somewhere in main since this is a small game.
LusikkaMage 2 years ago
please help i get this error when i try to debug..
Unhandled exception at 0x100347d9 in AllegroTutorial1.exe: 0xC0000005: Access violation reading location 0x0000000c.
code is as shown
play_sample( sound, 255, 128, 1000, true );
its inside the while loop for the ESC key i beleave was in tutorial 2?
load sample is under the BITMAP *buffer
and the volume is in the while loop under the play_sample
and destroy_sample is under destroy_bitmap
Any ideas what i did wrong??
McClover 2 years ago
"how much mountain dew was I on when I wrote this script"
A question every programmer asks themselves at least once... ;)
TheReasonWhyGuy 2 years ago
hey, i got my sound set up and programmed in, but i can't hear it. its a mid. help plz and thank u
deebeast3 2 years ago
you might check your set_volume function. If the program isn't crashing when you try to play then it should have loaded in correctly. Are any other sounds working?
LusikkaMage 2 years ago
MIDI *Main = load_midi("SOUND/Main.mid");
set_volume( 255, 255);
play_midi(Main, true);
then there is more code, but this is just the sound parts. thanks for help.
is this right?
deebeast3 2 years ago
sorry about posting this on wrong video but i noticed it during this video.
I get an error on Load_image function :(
here is the log for that particular error.
20 C:\Documents and Settings\***\Desktop\C++ Game\init_allegro.cpp `load_image' undeclared (first use this function)
bc0wful 2 years ago
Load_Bitmap(...) ?
LusikkaMage 2 years ago
Does any one know where I can get good .midi files?
And Great video! :)
SpooksDragonFable 2 years ago
Your videos have taught me more than 2 years sitting in programming class. THANKYOU!
lemonadeaz92 2 years ago 3
WHEE!
MrOnix9009 2 years ago
I suddenly have the urge to favorite a lot of these tutorials :) this is kinda how you do
BITMAP *picture
FONT *font
type thing, thanks for clearing the sound one up XD
Donutslayer7 2 years ago
The function to stop MIDI playback is stop_midi() - have a look in the Allegro manual, Music routines chapter.
Toumaz 2 years ago
Okedokey, thanks.
LusikkaMage 2 years ago
Hopefully I won't get a big Michael Jackson debate in the comments for this video.
(Hint hint: Will be removed kthx)
LusikkaMage 2 years ago
Nice
lotios611 2 years ago