-
Notifications
You must be signed in to change notification settings - Fork 642
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Notes only play a maximum of 2 seconds or so #73
Comments
You're right it's definitely an issue w/ Violin, Organ and similar instruments. If we want to handle this properly, the repeat should be setup to be able to take a portion of the audio and repeat from there (not necessarily the entire thing). Here's an example, this one has the attack (at the beginning) then the later half repeats over and over until the noteOff happens: |
I’ve come to the same conclusion. In fact that could be the solution to getting attack/decay with normal note playback. I know it can be done with web audio api, and with audio we can jump the current position as needed. From: Michael Deal [mailto:notifications@github.com] You're right it's definitely an issue w/ Violin, Organ and similar instruments. If we want to handle this properly, the repeat should be setup to be able to take a portion of the audio and repeat from there (not necessarily the entire thing). Here's an example, this one has the attack (at the beginning) then the later half repeats over and over until the noteOff happens: https://f.cloud.github.com/assets/101564/2507920/06503990-b3c9-11e3-8428-b6e83e42b035.png screen shot 2014-03-24 at 7 56 05 pm — |
Wow, in WebAudioAPI it actually looks really easy: // here are our starting and stopping points // let's play a sound via http://www.html5audio.org/2013/03/new-looping-functionality-in-web-audio-api.html |
I have experimented with the loop start/end on the source node and it works, but there is still a very obvious sound when it loops around which I do not think is simply a part of the audio file. It is something like a click. Perhaps it is due to the instrument file having a variance in the sound due to vibrato, but it sounds to be more than that, similar to the sound you can hear on http://kusogmusic.com/violin/drones From: Michael Deal [mailto:notifications@github.com] Wow, in WebAudioAPI it actually looks really easy: // here are our starting and stopping points // let's play a sound via http://www.html5audio.org/2013/03/new-looping-functionality-in-web-audio-api.html — |
I noticed the machine gun demo site, and it is very convenient that they use a sound that naturally has a burst rather than continuous sound like the instrument sounds. So I am curious to know if a pure tone sound file would work to where the user cannot tell there is a loop and it just sounds like one continuous long sound, like a violin note that never ends. From: Michael Deal [mailto:notifications@github.com] Wow, in WebAudioAPI it actually looks really easy: // here are our starting and stopping points // let's play a sound via http://www.html5audio.org/2013/03/new-looping-functionality-in-web-audio-api.html — |
With soundfont files, the repeat is programmed at a specific time so the loop feels continuous even with violins. There's an app called Polyphone on OSX where you can analyze the soundfont and see these repeat patterns (which makes soundfonts make a lot more sense). |
@kusog Hey, I lost your email, could you send me a message? I have another job that might be worthwhile looking into. |
Did you really mean to talk to me? I sent a message through http://mudcu.be/contact/ From: Michael Deal [mailto:notifications@github.com] @kusog https://github.com/kusog Hey, I lost your email, could you send me a message? I have another job that might be worthwhile looking into. — |
@kusog Yup, sorry, just stepped out for a few hours. I'm going to forward you a job that might be fun in a bit here. |
Hello, Just curious if anymore work had been done along these lines. Thanks! - Charlie |
I have code in place in my version that does the looping, but it still doesn’t sound right because you have to know exactly what points to loop with to sound like a continuous sound. I don’t have that info and thus the solution doesn’t help. From: charlie roberts [mailto:notifications@github.com] Hello, Just curious if anymore work had been done along these lines. Thanks! - Charlie — |
Well, we need more information from the soundfont converter. The spec says that loop points can be provided (section 6.3): http://www.synthfont.com/sfspec24.pdf So I guess the next step will be working on that. I might take that on if I find the time, as I like the idea of being able to use soundfonts, but require the looping. |
Prevents the development of a reliance on silence to identify the tone. The piano voice in MIDI.js plays an ogg, therefore the note cannot be sustained indefinitely. This problem is discussed at mudcube/MIDI.js#73 . Consider switching to different voice or different MIDI library.
The way audio and audiocontext are setup, they only play through the given mp3/ogg note once. If the music has a note that lasts longer than that it wont play. I have fixed this in my branch by adding loop=true to both the audio tag and web audio api plugins.
I use this for violin drone practices: http://kusogmusic.com/violin/drones
I have fixed a bunch of similar types of issues that have kept tools like that from working.
The text was updated successfully, but these errors were encountered: