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.

Work in Progress / Enhanced Audio Plugin v1.55 (beta testing)

Author
Message
Torrey
18
Years of Service
User Offline
Joined: 20th Aug 2004
Location: New Jersey
Posted: 24th Jul 2006 13:03 Edited at: 26th Jul 2007 21:47
Welcome to the beta testing thread for the next release of EAP. There have been so many changes plus improvments that I've lost track during the development of it. If you'd like to get an idea of what the old version supported as far as audio formats go then check out this link.

Here's the current list of things added to this release:

- The MP3 decoder has been changed so there is more support for different types of MP3s, and also MP3s will be seekable.
- Speex support added.
- CD audio support added.
- MIDI support added.

The reading of metatags in Vorbis and MP3s are still pending.

Here's the current list of commands for v1.55:

LOAD AUDIO audio index number, filename
DELETE AUDIO audio index number
PLAY AUDIO audio index number
STOP AUDIO audio index number
PAUSE AUDIO audio index number
RESUME AUDIO audio index number
LOOP AUDIO audio index number
AUDIO VOLUME audio index number, volume (integer ranging from 0 to 100)
*NOTE: volume 0.0 = silence, 1.0 = maximum volume (default)
AUDIO PAN audio index number, pan (float)
*NOTE: pan -1.0 = left, 0.0 = center (default), 1.0 = right
AUDIO PITCH SHIFT audio index number, pitch shift (float)
*NOTE: pitch shift range 0.5 to 2.0
GET AUDIO VOLUME audio index number (returns float)
GET AUDIO PAN audio index number (returns float)
GET AUDIO PITCH SHIFT audio index number (returns float)
AUDIO PLAYING audio index number (returns true or false)
AUDIO SEEKABLE audio index number (returns true or false)
AUDIO LENGTH audio index number (returns number of frames in the streaming sound or returns 0 for not seekable)
AUDIO POSITION audio index number (returns current position in frames)
AUDIO SET POSITION audio index number, position
AUDIO USE DEVICE device (1 = winmm, 2 = DirectSound)
AUDIO EXIST audio index number (returns true or false)
AUDIO WHITE NOISE audio index number
AUDIO PINK NOISE audio index number
AUDIO GET RATE audio index number (returns the integer rate)
AUDIO GET CHANNEL COUNT audio index number (returns audio channel count)
AUDIO GET OUTPUT BUFFER PTR audio index number (returns dword pointer to the audio stream data buffer)
AUDIO GET OUTPUT BUFFER SIZE audio index number (returns an integer of the audio stream data buffer size)

MIDI Commands

LOAD MIDI AUDIO midi audio index number, filename
PLAY MIDI AUDIO midi audio index number
STOP MIDI AUDIO midi audio index number
PAUSE MIDI AUDIO midi audio index number
RESUME MIDI AUDIO midi audio index number
LOOP MIDI AUDIO midi audio index number
AUDIO MIDI EXIST midi audio index number (returns true or false)
DELETE MIDI AUDIO midi audio index number

CD-Audio Commands

AUDIO CD TRACK COUNT (returns total number of tracks on cd)
AUDIO OPEN CD DOOR
AUDIO CLOSE CD DOOR
AUDIO CD PRESENT (returns true or false)
AUDIO CD PLAY cd track number (return -1 if error)
AUDIO CD STOP
AUDIO CD PAUSE
AUDIO CD RESUME

Hopefully I got them all! The trigger zone commands have been removed in this release. In the near future I'll be submitting my application to try and get approved by Creative so that I can use their SDK for EAX. Remember that this is still in beta process and more commands are planned to be added in the coming weeks.

Attached is the current compile as of Monday July 24th, 2006 @ 6am EST. Since this is a beta test there is no fancy installer or keyword file. Place the DLL in your plugins-user directory. Also, make sure to uninstall the old version before testing this one, otherwise you'll have command conflicts.

Attachments

Login to view attachments
Jack
18
Years of Service
User Offline
Joined: 4th Oct 2004
Location: [Germany]
Posted: 24th Jul 2006 14:16
Good work.
- Another ingenious contribution

Ill test it later.

Chris Franklin
17
Years of Service
User Offline
Joined: 2nd Aug 2005
Location: UK
Posted: 24th Jul 2006 14:39
Woah nice!

How about

Audio Open dvd Tray
Audio close dvd Tray



Platformer Compo!
WHITEKNUCKLE IS BACK! Check the wip boards for more info
Torrey
18
Years of Service
User Offline
Joined: 20th Aug 2004
Location: New Jersey
Posted: 24th Jul 2006 14:45
Quote: "Woah nice!

How about

Audio Open dvd Tray
Audio close dvd Tray"


You just reminded me of something! In that posted compile it assumes the CD drive is D:. I forgot to change that into a function so it's customizable. I'll fix that later and post up. Keep on testing.

Chris Franklin
17
Years of Service
User Offline
Joined: 2nd Aug 2005
Location: UK
Posted: 24th Jul 2006 14:51

Thanks sounds great

It's really really useful as well have a beer

Platformer Compo!
WHITEKNUCKLE IS BACK! Check the wip boards for more info
CuCuMBeR
19
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Turkey
Posted: 24th Jul 2006 20:09
Well, does AUDIO GET RATE command give you the BitRate or the SampleRate? seems like it gives the bitRate is it?
Also i might be wrong cause i tried with only 1 layer2/3 file but AUDIO GET OUTPUT BUFFER SIZE seems to return the bitRate only too..
Torrey
18
Years of Service
User Offline
Joined: 20th Aug 2004
Location: New Jersey
Posted: 24th Jul 2006 23:46
Quote: "Well, does AUDIO GET RATE command give you the BitRate or the SampleRate?"


That would be the sample rate. I would have preferred to get the bit rate, but its retrieval is nowhere to be found in the library.

Quote: "Also i might be wrong cause i tried with only 1 layer2/3 file but AUDIO GET OUTPUT BUFFER SIZE seems to return the bitRate only too.."


The return is the correct buffer size, I hacked up the library to insert the output buffer it uses to a structure that is referenced to the index number you supply when loading the audio file.

Torrey
18
Years of Service
User Offline
Joined: 20th Aug 2004
Location: New Jersey
Posted: 26th Jul 2006 16:33
bump, was hoping to get more feedback before I toss out the next beta.

Morcilla
19
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 26th Jul 2006 17:33 Edited at: 26th Jul 2006 17:33
Looks useful!

I agree with Phaelax:
Quote: "
What about a command like this:

bytes[] data = getPcmData(audio index number)

Gets an array of currently decoded bytes from the sound's output stream, thus allowing us to throw it into an FFT and making some fancy visuals.
"


If we could have a function that returns values based on current music frequencies playing, that would make your plugin rock!

Maybe you can find this link useful:

How To Use Sound To Drive Computer Animation
Torrey
18
Years of Service
User Offline
Joined: 20th Aug 2004
Location: New Jersey
Posted: 27th Jul 2006 07:24
I just got an interesting idea involving the plugin command:

AUDIO GET OUTPUT BUFFER PTR

The idea I'm going to toy with tonight is changing this command to something like "AUDIO SET OUTPUT BUFFER" that a user could call before loading audio. This command would have one parameter which would be the pointer to a memblock that the user created. Using dbpro's memblocks would make it directly possible from the user program to access the data contained in the stream and create whatever fancy effects he/she wanted to off it. Hopefully this test works out good, because it would save a lot of time and trouble for others.

Duffer
19
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 27th Jul 2006 09:10
@ Torrey,

Any chance of adding commands to play tailored notes and/or voices created in DBPro and maybe commands to combine into sound files?

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
Torrey
18
Years of Service
User Offline
Joined: 20th Aug 2004
Location: New Jersey
Posted: 27th Jul 2006 12:03
Quote: "Any chance of adding commands to play tailored notes and/or voices created in DBPro and maybe commands to combine into sound files?"


What do you mean by voices created in dbpro?

Duffer
19
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 27th Jul 2006 12:44
@ Torrey - just sounds...

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
Torrey
18
Years of Service
User Offline
Joined: 20th Aug 2004
Location: New Jersey
Posted: 27th Jul 2006 13:12
I haven't tried creating sounds with dbpro, but I'm sure if you saved the file with the correct filename extension and loaded it with the plugin it'd play. I don't know if you're familiar with this plugin or not, but it plays lots of different types of media.

Van B
Moderator
20
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 31st Jul 2006 12:56
I think Duffer means being able to play at the preset note frequencies easily. Like the frequencies aren't straightforward, in VSD I stored them in an array and referenced them with their octave and note as a little bit of text.

If you could say, assume that each sample is in note C, then playing that sample in note D# should be possible.

I have some great ideas for music software - this plugin would make life so much easier for me, once you add the analysis stuff and if you added the note offsets especially.

Aegrescit medendo
BillR
19
Years of Service
User Offline
Joined: 19th Mar 2003
Location: United States
Posted: 3rd Aug 2006 14:47
@Torrey - what would really be great is a MIDI POSITION command. So we could tell where the MIDI song is while playing to sync events to for demos and such.
Torrey
18
Years of Service
User Offline
Joined: 20th Aug 2004
Location: New Jersey
Posted: 3rd Aug 2006 15:17
Quote: "@Torrey - what would really be great is a MIDI POSITION command. So we could tell where the MIDI song is while playing to sync events to for demos and such."


The plugin has this feature already, it just needs to be put as an export and added to the string table.

Torrey
18
Years of Service
User Offline
Joined: 20th Aug 2004
Location: New Jersey
Posted: 3rd Aug 2006 19:00
I have a question to ask this community about the ID3v1 and ID3v1.1 tags in MP3 and OGG files. To ask this the easy way, what would be the best way to return these values back to dbpro? Keep in mind that if a media file contains any tags more than likely there are more than one. The one idea that currently comes to mind is to create something similar to dbpro's checklist commands.

Joe Cooning
19
Years of Service
User Offline
Joined: 29th Mar 2003
Location: United States
Posted: 3rd Aug 2006 19:28
Do you think you can try making a command that can return a list of midi events (the notes and such).

Dr Manette
16
Years of Service
User Offline
Joined: 17th Jan 2006
Location: BioFox Games hq
Posted: 28th Aug 2006 04:43
Would a command to save the audio be possible? I've been trying to save music I load off a cd with my program, but i just can't find a way. There's a save sound, but no save music.

Bio Fox...four guys, one computer, games like nobody's business.
Cash Curtis II
17
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Corpus Christi Texas
Posted: 28th Aug 2006 05:28
Dr Manette, it's not that simple. The audio has to be encoded, and that's not the same as just saving it.


Come see the WIP!
EsteemDE
17
Years of Service
User Offline
Joined: 5th Aug 2005
Location:
Posted: 28th Aug 2006 05:51
Are you ever going to add the ability to save in some of these formats? Such as the free non license formats (like OGG and WAV)?

Current Project - Dark NET System Framework DLL
Percentage - 14%.......Lines of Code - 9,171
This Info Updated - 6/18/06 12:10pm
Aaron Miller
16
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 28th Aug 2006 07:38
IMAGE 02
19
Years of Service
User Offline
Joined: 4th Sep 2003
Location: Leeds
Posted: 23rd Oct 2006 20:56
i had trouble upgrading to 1.55 cant get the command to work what have a done wrong :-(
thanks in andvance

eddie

IMAGE is EVERYTHING
IMAGE 02
19
Years of Service
User Offline
Joined: 4th Sep 2003
Location: Leeds
Posted: 23rd Oct 2006 22:16
can you check each channel to see how quiet or laoud a sound is so i could make a graphic equalizer effect out of sprites or somthing.

if not would love to see that

IMAGE is EVERYTHING
IMAGE 02
19
Years of Service
User Offline
Joined: 4th Sep 2003
Location: Leeds
Posted: 23rd Oct 2006 23:02
what is needs is to be able to measure the channel levels, that will be cool and then i can do my visuals reacting to the music xxx

IMAGE is EVERYTHING

Login to post a reply

Server time is: 2022-11-29 08:43:38
Your offset time is: 2022-11-29 08:43:38