The Daily Click ::. Forums ::. Klik Coding Help ::. A sound question
 

Post Reply  Post Oekaki 
 

Posted By Message

Tristan Clark



Registered
  28/07/2003
Points
  159
21st October, 2004 at 18:20:56 -

Hi guys,
I'm making a program sorta like fruityloops, where you can map out a beat using various wave files. Problem is, I have no idea how you can open up a file selector in the program in order to find a wave file. Is this possible? Otherwise, are there any other alternatives?

Cheers.

Edit: I've just discovered the File object. It looks like it might be able to do what I want, but I can't quite figure it out. Here's what I want it to do:
1. When you click on Button 1, the file selector will open, looking only for .wav files (ive figured out this much).
2. Once you've selected a wav file, I would like the Button (or text object, doesn't matter) to change to the name of the file, and I'd like the DMC object to change the file it's using to the one you've just selected.

Image Edited by the Author.

 
n/a

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
22nd October, 2004 at 04:04:51 -

To change the DMC's current file:

DMC2 > Sample, Open sample = FileSelReturn$( "File" )

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

Tristan Clark



Registered
  28/07/2003
Points
  159
22nd October, 2004 at 04:40:14 -

Ok, thanks, that's gotten it a step further.
Now, though, the sounds themselves are very distorted - it seems like it's something to do with the DMC object. Is there an ideal setting for frequency/volume/channel etc?

Alternatively, I have it working with the DirectShow object, but it wants me to load the wave file every time I play it, which obviously slows the computer down and causes delays in the sound. Is there any way to load it onto the object and keep it there? I've never had this problem when playing music thru DirectShow.

Image Edited by the Author.

 
n/a

Tigerworks

Klik Legend

Registered
  15/01/2002
Points
  3882
22nd October, 2004 at 09:32:36 -

Maybe the wav codecs are too exotic. Try converting them to PCM (sound recorder in Windows can do this)

 
- Tigerworks

jpSoul



Registered
  25/10/2003
Points
  1714
23rd October, 2004 at 16:59:57 -

When you use WAVE files with DMC2, first don't forget to convert them into ADPCM !!
It is about 2 x more little, and dmc2 can read them as good as a normal PCM wave file

 
n/a

Tristan Clark



Registered
  28/07/2003
Points
  159
23rd October, 2004 at 17:57:56 -

The problem is, this program is all about other people recording and inserting their own wave files - and it's for kids aged about 8-12, so I don't think they'll know how to compress a wave file. Thanks anyway tho.

 
n/a
   

Post Reply



 



Advertisement

Worth A Click