Need a musical Javascript person

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • cgallery
    Veteran Member
    • Sep 2004
    • 4503
    • Milwaukee, WI
    • BT3K

    #1

    Need a musical Javascript person

    In working on my audible bandsaw tension idea, I have hit a stumbling block.

    The chromatic tuner may not be as helpful as I thought. Sensitivity of the mic seems to be one issue (bandsaw blades are quiet). The fact that we're often not adjusting to a pitch you'd tune an instrument to is another. I'm also happy to admit that I'm just not comfortable with some of the concepts, and imagine others would find it just as difficult. Absolute pitch would be handy.

    I looked at the distribution of frequencies on a standard 88-key piano, and thought a possible temporary solution would be to allow users to listen to a key close in freq. to what I'm (at this point) estimating to be appropriate for their blade tension.

    But I need good quality samples. I think I'd want MIDI samples, wouldn't I? I listened to some wav files, but they're pretty poor (background noise, and clipped ends that don't allow enough time for the decay).

    But I can't find a collection of MIDI files that are basically just someone hitting each key on the piano. Would something like this exist? Can I generate it myself? I'd like something that sounds better than a tape recording of a WalMart electronic keyboard.

    Next (and I know this is a long shot), I've never worked in Javascript before. And I've never worked with MIDI or WAV files before, either. I imagine there is little chance that the language is robust enough for me to actually generate a WAV of MIDI file based upon a fundamental frequency with the harmonics, and then play it for the user? I can adapt an algorithm from somewhere else, but basically I'd like to know if the language would allow me to create a buffer that I can fill with data, and then send that buffer to either the MIDI or WAV synthesizers? Or create a temporary file which I would do same? I'm a little out of my element on this one. But I know some of you guys are Javascript pros.
  • Alex Franke
    Veteran Member
    • Feb 2007
    • 2641
    • Chapel Hill, NC
    • Ryobi BT3100

    #2
    Originally posted by cgallery
    But I need good quality samples. I think I'd want MIDI samples, wouldn't I? I listened to some wav files, but they're pretty poor (background noise, and clipped ends that don't allow enough time for the decay).

    But I can't find a collection of MIDI files that are basically just someone hitting each key on the piano. Would something like this exist? Can I generate it myself? I'd like something that sounds better than a tape recording of a WalMart electronic keyboard.

    [snip]

    I imagine there is little chance that the language is robust enough for me to actually generate a WAV of MIDI file based upon a fundamental frequency with the harmonics, and then play it for the user? I can adapt an algorithm from somewhere else, but basically I'd like to know if the language would allow me to create a buffer that I can fill with data, and then send that buffer to either the MIDI or WAV synthesizers? Or create a temporary file which I would do same?
    MIDI is actually pretty simple, and I don't know that it's what you're looking for unless you're only using typical frequencies (like on a piano). All MIDI is, essentially, is a list of what key is pressed, how hard it's pressed, and when it's let go. The computer or instrument translates those events into something you can hear.

    Javascript works on the client computer within a sandbox, so it's not easy to do file operations, etc. I don't think you can create sounds, either, but it would be fun to check into this.

    You might consider using Flash or MS silverlight because they have a bit more flexibility and can probably help with generating files/tones.

    You could also just create wav files on the server with all the tones you're going to need and sever those up as necessary. (This is assuming you know them all in advance.)

    I'm interesting in hearing ideas from the other techies, too... it sounds like a cool idea.
    online at http://www.theFrankes.com
    while ( !( succeed = try() ) ) ;
    "Life is short, Art long, Occasion sudden and dangerous, Experience deceitful, and Judgment difficult." -Hippocrates

    Comment

    • Tom Slick
      Veteran Member
      • May 2005
      • 2913
      • Paso Robles, Calif, USA.
      • sears BT3 clone

      #3
      I don't know if it will be helpful but there are tools that use frequency for properly lubricating equipment such as electric motors. You may be able to reserch the way they operate to develop your project.
      Opportunity is missed by most people because it is dressed in overalls and looks like work. - Thomas Edison

      Comment

      • Alex Franke
        Veteran Member
        • Feb 2007
        • 2641
        • Chapel Hill, NC
        • Ryobi BT3100

        #4
        Here's your flash solution -- use to dynamically play a sound of a given pitch:

        http://www.adobe.com/devnet/flash/ar...nd_generation/
        online at http://www.theFrankes.com
        while ( !( succeed = try() ) ) ;
        "Life is short, Art long, Occasion sudden and dangerous, Experience deceitful, and Judgment difficult." -Hippocrates

        Comment

        • cgallery
          Veteran Member
          • Sep 2004
          • 4503
          • Milwaukee, WI
          • BT3K

          #5
          Originally posted by Alex Franke
          Here's your flash solution -- use to dynamically play a sound of a given pitch:

          http://www.adobe.com/devnet/flash/ar...nd_generation/
          Interesting. During this process someone pointed out an excellent guitar tuner that had great sound, and it was done in flash. I think I'll write the site author and ask him if he'd share his code for the plucked string and maybe I can adapt that.

          I need a compiler for Flash, no? Is Adobe the only player, or are there any open-source products available?

          Thanks guys for the help. I knew I'd find help here.

          Comment

          • cgallery
            Veteran Member
            • Sep 2004
            • 4503
            • Milwaukee, WI
            • BT3K

            #6
            Originally posted by Tom Slick
            I don't know if it will be helpful but there are tools that use frequency for properly lubricating equipment such as electric motors. You may be able to reserch the way they operate to develop your project.
            Sounds helpful. Do you know what the tools are called? Any hints for starting w/ google?

            Comment

            • Tom Slick
              Veteran Member
              • May 2005
              • 2913
              • Paso Robles, Calif, USA.
              • sears BT3 clone

              #7
              googling acoustic motor lubrication should get you started.

              more then likely you'll learn more about reliability centered maintenance than you will the technology but it's worth a shot.
              Opportunity is missed by most people because it is dressed in overalls and looks like work. - Thomas Edison

              Comment

              • Alex Franke
                Veteran Member
                • Feb 2007
                • 2641
                • Chapel Hill, NC
                • Ryobi BT3100

                #8
                Originally posted by cgallery
                I need a compiler for Flash, no? Is Adobe the only player, or are there any open-source products available?
                Check out Flex, Flash SDK here: http://en.wikipedia.org/wiki/Adobe_Flex - it's a free (I think) SDK. I suppose you might also be able to find an open source development enrironment for it somewhere.

                Just about everyone has the Flash player installed, so I wouldn't worry about finding a player alternative. (I think it's still a closed standard, so I don't believe there even is an alternative.)

                UPDATE: Just found this -- a possible open source flash development environment. Can't vouch for it, though. I haven't done flash in a long long time. http://antimatter15.110mb.com/wp/?page_id=57
                Last edited by Alex Franke; 05-24-2009, 02:31 PM. Reason: added update
                online at http://www.theFrankes.com
                while ( !( succeed = try() ) ) ;
                "Life is short, Art long, Occasion sudden and dangerous, Experience deceitful, and Judgment difficult." -Hippocrates

                Comment

                Working...