Making Waves

Discussion in 'Java' started by timrobinson@paradise.net.nz, Nov 19, 2005.

  1. Guest

    Hi!

    Can anyone point me to some free java sourcecode
    that writes a stereo sound file that I can play
    on the Windows Media Player?

    All I want is something like:

    .... open file ...
    .... write header ...
    .... for t = 0 to n ...
    .... write left chanel amplitude ...
    .... write right chanel amplitude ...
    .... next t ...
    .... close file ...

    I want to experiment with waveforms,
    envelopes, modulation etc,
    play sounds and write them to a music CD.
     
    , Nov 19, 2005
    #1
    1. Advertising

  2. Roedy Green Guest

    On 19 Nov 2005 04:58:43 -0800, wrote,
    quoted or indirectly quoted someone who said :

    >Can anyone point me to some free java sourcecode
    >that writes a stereo sound file that I can play
    >on the Windows Media Player?


    I show you how to synthetically compose an AU file at
    http://mindprod.com/jgloss/sound.html
    --
    Canadian Mind Products, Roedy Green.
    http://mindprod.com Java custom programming, consulting and coaching.
     
    Roedy Green, Nov 19, 2005
    #2
    1. Advertising

  3. Rhino Guest

    "Roedy Green" <> wrote in
    message news:...
    > On 19 Nov 2005 04:58:43 -0800, wrote,
    > quoted or indirectly quoted someone who said :
    >
    >>Can anyone point me to some free java sourcecode
    >>that writes a stereo sound file that I can play
    >>on the Windows Media Player?

    >
    > I show you how to synthetically compose an AU file at
    > http://mindprod.com/jgloss/sound.html


    The three boxes in the middle of that page stay grey for me, even if I wait
    several minutes. I have the Java 1.5 plugin and nothing is displayed in the
    Java Console. Is the problem at my end or yours?

    Rhino
     
    Rhino, Nov 19, 2005
    #3
  4. "Rhino" <> wrote:

    >> I show you how to synthetically compose an AU file at
    >> http://mindprod.com/jgloss/sound.html

    >
    > The three boxes in the middle of that page stay grey for me, even if I
    > wait several minutes. I have the Java 1.5 plugin and nothing is displayed
    > in the Java Console. Is the problem at my end or yours?


    I suppose the 3 boxes are the 3 <applet>s of the HTML file.

    I have the Java 1.5 plugin too (1.5.0_04 on WinXP). For me it works, the
    three applets show some Java source code. The Java console displays:
    fetching: http://mindprod.com/jgloss/snippets/sound.Tone.java.ser
    fetching: http://mindprod.com/jgloss/snippets/sound.Play.java.ser
    fetching: http://mindprod.com/jgloss/snippets/applet.sound.java.ser

    If you use Windows, I suspect a problem with the network settings of your
    Java plugin. (The plugin has settings separate from those of the browser).
    To check this, open the "Java Control Panel":
    Start -> Control Panel -> Java
    Look for "Network settings" there.

    --
    "TFritsch$t-online:de".replace(':','.').replace('$','@')
     
    Thomas Fritsch, Nov 20, 2005
    #4
  5. Roedy Green Guest

    On Sat, 19 Nov 2005 18:48:37 -0500, "Rhino"
    <> wrote, quoted or indirectly
    quoted someone who said :

    >The three boxes in the middle of that page stay grey for me, even if I wait
    >several minutes. I have the Java 1.5 plugin and nothing is displayed in the
    >Java Console. Is the problem at my end or yours?


    do any applets work for you anywhere? Make sure you have <APPLET tags
    turned on in the Java console in the control panel.

    see http://mindprod.com/jgloss/jre.html#TEST
    --
    Canadian Mind Products, Roedy Green.
    http://mindprod.com Java custom programming, consulting and coaching.
     
    Roedy Green, Nov 20, 2005
    #5
  6. Rhino Guest

    "Roedy Green" <> wrote in
    message news:...
    > On Sat, 19 Nov 2005 18:48:37 -0500, "Rhino"
    > <> wrote, quoted or indirectly
    > quoted someone who said :
    >
    >>The three boxes in the middle of that page stay grey for me, even if I
    >>wait
    >>several minutes. I have the Java 1.5 plugin and nothing is displayed in
    >>the
    >>Java Console. Is the problem at my end or yours?

    >
    > do any applets work for you anywhere?


    Yes, I just looked at several at http://java.sun.com/applets/ and they
    worked fine.

    > Make sure you have <APPLET tags
    > turned on in the Java console in the control panel.
    >

    I have <APPLET> tags enabled - that box was already "on" when I checked the
    settings in the java console.

    The applets on your page still don't display. When I move the mouse over the
    grey applet rectangles, there is a message that says
    "com.mindprod.jdisplay.JDisplay not found" (or words to that effect, the
    message appears only VERY briefly in the status line). That sounds like a
    problem at your end although Thomas' success with seeing the page makes that
    a doubtful assumption....

    > see http://mindprod.com/jgloss/jre.html#TEST


    When I went to this page, it told me that "Your browser is not configured
    properly for Java Web Start *.jnlp and application/x-java-jnlf-file MIME
    types." That can't be the cause of the problem, right? Your applets are not
    using Web Start are they? I installed Web Start at one point and ran a few
    demos with it but only ever use it within the Java Tutorial (where it works
    fine).

    Could this be a version issue with the JRE? I am running 1.5.0, not 1.5.0_x.

    Rhino
     
    Rhino, Nov 20, 2005
    #6
  7. Roedy Green Guest

    On Sun, 20 Nov 2005 15:01:33 -0500, "Rhino"
    <> wrote, quoted or indirectly
    quoted someone who said :

    >Could this be a version issue with the JRE? I am running 1.5.0, not 1.5.0_x.


    This is a puzzle. It works fine for me from 1.5.0_04 and 1.5.0_05 in
    Win98 and Win2K.

    There are no compatibility problems upgrading to 1.5.0_05, only bug
    fixes.

    Give it some time. It has to load the JVM the first Applet it
    encounters. Further, the site is pretty slow.
    --
    Canadian Mind Products, Roedy Green.
    http://mindprod.com Java custom programming, consulting and coaching.
     
    Roedy Green, Nov 21, 2005
    #7
  8. Roedy Green wrote:
    > On Sun, 20 Nov 2005 15:01:33 -0500, "Rhino"
    > <> wrote, quoted or indirectly
    > quoted someone who said :
    >
    >>Could this be a version issue with the JRE? I am running 1.5.0, not 1.5.0_x.

    >
    > This is a puzzle. It works fine for me from 1.5.0_04 and 1.5.0_05 in
    > Win98 and Win2K.


    Same here (works), for 1.5.0_04 in WinXP using Moz. 1.7.2.

    > There are no compatibility problems upgrading to 1.5.0_05, only bug
    > fixes.


    I think Rhino should try one of the 1.5.0_x variants.

    --
    Andrew Thompson
    physci, javasaver, 1point1c, lensescapes - athompson.info/andrew
    Currently accepting short and long term contracts - on Earth.
     
    Andrew Thompson, Nov 21, 2005
    #8
  9. Roedy Green Guest

    On Sun, 20 Nov 2005 15:01:33 -0500, "Rhino"
    <> wrote, quoted or indirectly
    quoted someone who said :

    >When I went to this page, it told me that "Your browser is not configured
    >properly for Java Web Start *.jnlp and application/x-java-jnlf-file MIME
    >types." That can't be the cause of the problem, right?


    That would get you in trouble with SetClock, and the Replicator, but
    not JDisplay which is used throughout the site to display long program
    listings.

    See if you get get the console up there before you load the page to
    see if anything at all appears on it.

    I am sending you mime type "application/java-archive" for the jar. Do
    you have that configured to do something odd?

    What browser are you using? One of the tested ones? at
    http://mindprod.com/jgloss/browser.html
    --
    Canadian Mind Products, Roedy Green.
    http://mindprod.com Java custom programming, consulting and coaching.
     
    Roedy Green, Nov 21, 2005
    #9
  10. Roedy Green Guest

    On Sun, 20 Nov 2005 15:01:33 -0500, "Rhino"
    <> wrote, quoted or indirectly
    quoted someone who said :

    >
    >Yes, I just looked at several at http://java.sun.com/applets/ and they
    >worked fine.


    I looked at those applets. The seem very similar to mine, with the
    except I use jars and they use raw class files.

    I have an idea. Can you see the applet at?
    http://mindprod.com/applets/wassup.html

    If so, the problem is possibly because JDisplay downloads *.ser files
    with mime type "application/x-java-serialized-object".

    Your firewall may be blocking them.
    --
    Canadian Mind Products, Roedy Green.
    http://mindprod.com Java custom programming, consulting and coaching.
     
    Roedy Green, Nov 21, 2005
    #10
  11. Roedy Green wrote:

    > On Sun, 20 Nov 2005 15:01:33 -0500, "Rhino"
    > <> wrote, quoted or indirectly
    > quoted someone who said :
    >
    >>Yes, I just looked at several at http://java.sun.com/applets/ and they
    >>worked fine.

    >
    > I looked at those applets. The seem very similar to mine, with the
    > except I use jars and they use raw class files.


    Sorry to inject this thought here, but someone asked earlier what
    browser you were using, and while a lot of posts have been made
    since, and I don't see the answer.

    What browser? You posting using outlook suggests you use IE,
    is that right? If so, I would strongly advise you to check
    the page in a Mozilla based browser or Opera, before you do
    too much more. IE has a history of creating 'niggling little
    problems' with Java.

    --
    Andrew Thompson
    physci, javasaver, 1point1c, lensescapes - athompson.info/andrew
    Currently accepting short and long term contracts - on Earth.
     
    Andrew Thompson, Nov 21, 2005
    #11
  12. Roedy Green Guest

    On Mon, 21 Nov 2005 03:21:30 GMT, Andrew Thompson
    <> wrote, quoted or indirectly quoted someone
    who said :

    >What browser? You posting using outlook suggests you use IE,
    >is that right? If so, I would strongly advise you to check
    >the page in a Mozilla based browser or Opera, before you do
    >too much more. IE has a history of creating 'niggling little
    >problems' with Java.


    it might be configured to use the ancient old MS java.
    Check tools | internet Options | Java(Sun)
    --
    Canadian Mind Products, Roedy Green.
    http://mindprod.com Java custom programming, consulting and coaching.
     
    Roedy Green, Nov 21, 2005
    #12
  13. Roedy Green wrote:

    > On Mon, 21 Nov 2005 03:21:30 GMT, Andrew Thompson
    > <> wrote, quoted or indirectly quoted someone
    > who said :
    >
    >>What browser? You posting using outlook suggests you use IE,
    >>is that right? If so, I would strongly advise you to check
    >>the page in a Mozilla based browser or Opera, before you do
    >>too much more. IE has a history of creating 'niggling little
    >>problems' with Java.

    >
    > it might be configured to use the ancient old MS java.
    > Check tools | internet Options | Java(Sun)


    Note that it might also be something to do with
    - SP2
    - the MS JVM removal tool
    - MS' latest trick, err 'update'
    - ....

    Checking with a different browser is the quickest
    way to see if it is (yet) an(other) IE/Java problem.

    --
    Andrew Thompson
    physci, javasaver, 1point1c, lensescapes - athompson.info/andrew
    Currently accepting short and long term contracts - on Earth.
     
    Andrew Thompson, Nov 21, 2005
    #13
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. viswanath

    mixing sampled sine waves

    viswanath, May 11, 2004, in forum: VHDL
    Replies:
    1
    Views:
    2,107
    Allan Herriman
    May 12, 2004
  2. pillip

    generating waves

    pillip, Feb 6, 2004, in forum: C Programming
    Replies:
    8
    Views:
    554
  3. ivan

    Saquare waves - embedded

    ivan, Sep 12, 2006, in forum: C Programming
    Replies:
    3
    Views:
    298
    Walter Roberson
    Sep 12, 2006
  4. Albert

    Animating sine waves

    Albert, Jan 18, 2008, in forum: Java
    Replies:
    4
    Views:
    1,319
    Thomas Fritsch
    Jan 20, 2008
  5. Paulo da Silva

    Generating sin/square waves sound

    Paulo da Silva, Dec 30, 2011, in forum: Python
    Replies:
    9
    Views:
    896
    Paulo da Silva
    Jan 2, 2012
Loading...

Share This Page