For Programmers: Free Programming Magazines  


Home > Archive > Java Help > February 2007 > which Java audio function to use?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author which Java audio function to use?
Richard

2007-02-28, 10:09 pm

Hello,
I'm trying to write Java code that will create a single audio file
(eg .avi or .mpg) that produces a sequence of DTMF tones, like that used on
a telephone, corresponding to what the user types in. Eg if they want to
dial '245833', they would enter each digit 2-4-5-8-3-3 into the online form,
hit enter, and the script would create a single file that when run outputs
the corresponding DTMF tone sequence. Is there a Java function that can do
this? or part of this? Otherwise what language would you suggest would be
best to implement this function on eg C#, .Net, etc?

Regards,

Richard



Andrew Thompson

2007-02-28, 10:09 pm

On Mar 1, 1:33 pm, "Richard" <dcrai...@iimetro.com.au> wrote:
> Hello,


HELLO, Hello, hello.. did you really
believe this question desrved posting
across the five groups..
(aus.computers.java, alt.comp.lang.java,
alt.comp.lang.javascript, comp.lang.java.api,
comp.lang.java.help) ?

Note that I cannot post to 5 groups at once
(I am apparently not as important as you),
so I am dropping the first two, though note
the only group in the major hierarchy of big
8 newsgroups is the last one, so I will direct
follow-ups to c.l.j.help only. Also, GG will
not allow me to post to 'comp.lang.java.api')

> I'm trying to write Java code ..


Note that Java and JavaScript are entirely
separate languages, so that would be another
reason for dropping the third of the groups to
which you posted.

>...that will create a single audio file
> (eg .avi or .mpg)


Why the heck would you want to put something
that is (AFAIU) purely sound, into a file type
made for video or animations?

Formats or type wav, au, rmf, aif or mp3 are
more specific to sound.

>..that produces a sequence of DTMF tones,


For simple tones, you might even be able to
do it using MIDI (Music Instrument Digital
Interface).

>..like that used on
> a telephone, corresponding to what the user types in. Eg if they want to
> dial '245833', they would enter each digit 2-4-5-8-3-3 into the online form,
> hit enter, and the script ..


To do this from 'a form on a web page'
would require a Java enabled server.

Java does not have 'scripts', but compiles
to binaries that require a JVM, either on
the server, to deliver ready made sounds to
the end user, or a JVM on the client, for
allowing the user themselves to make the
tones, without requiring the sound files
to be 'pushed' from the server.

>..would create a single file that when run outputs
> the corresponding DTMF tone sequence. Is there a Java function that can do
> this? or part of this?


Here is some code to make a simple tone.
<http://groups.google.com/group/comp...programmer/msg/
bba25f0e91409898>
Java would also provide the functionality to
write the tone(s) out as one of a couple of
sound based media types, such as wav, au, or
RMF. The JMF API might also offer MP3 format
on a limited variety of platorms, but it
would be safest to stick with simpler types.

Your apparent lack of experience in Java
would suggest you are best off hiring
someone to code this for you. The Java
sound API is not something suited to
beginners in Java.

Andrew T.

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com