-
Notifications
You must be signed in to change notification settings - Fork 93
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
Ill timber/volume in specific tone range #8
Comments
1.there are about 1000 of instrumets. Not all samples have been tested yet. Choose any other sample. feel free to ask any help |
Thank you very much, but your judgement is not quite correct. I say so because I found a bug. And I mean it: it's a bug, even though it's probably completely hidden by the fact that your pitches are all integer. It's methodically wrong. And I already try different instruments — the problem is different. And it's your claim that "all you need for microtonal music implemented already". (I am very, very glad to hear that.) Than it needs to be fixed. Look, it's not hard to fix. I'll explain: for some pitches, Zone is not found, and further processing goes as it was #0. Why not found? Because zones should be, say A... B, then B to C, but what is see is A... B, then B+1 to C... What I say will be just a bit more complicated, but correct: you need to have zones without those gaps and search by comparison which is strict comparison operator on one side and not on another, for example: Now, the rough work-around works: I simply pass fractional pitch in notes, but round it only inside findZone. It sounds good now, but my Question One for you is: is my assumption correct: the choice of zone slightly outside the zone, close to its boundary is still "good enough". If so, my rounding work-around is also "good enough". More serious change would be fixing the zones, but I do understand how much work it can be. Question Two: why there are zones with the same MIDI note, overlapping, and why some zones have lower limit of the range higher than the upper limit? Does it make any sense? If I'm not much mistaken, such zones cannot be found. It is right? Look, you have done great and big work. It would be pity to block its use (microtonal, in particular) due to small bug. I really would like to get it going. I checked some other libraries, they impose near-prohibitive limitations on microtonal application (MIDI.js is one such example), so it's quite possible that your work is the only reasonable one. Thank you very much. |
p.s. |
No, this is a regular problem. Yes, my guess was that it came from instruments. As I am not quite well understand how you produced the instruments' .js (I see you batch files, etc.), I'm not quite sure. I tried to explain the problem in "Good enough" is the key here. Let's try to understand. Any zone of any pitch? The why having the zones? As I can see, you can use any zone, but quality of sound suffers. I guess, zones make sense. Say, you have range of pitches for zone. Let me look:
This is the root of the problem. This is repeated everywhere. It works for integer pitches, but wrong in principle. It should be, say 0 to 27 and 27 to 31 (not 28 to 31). My guess about "good enough" is: say, pitch is 27.5. My idea was: isn't zone 0..27 good for this pitch, as well as 28..31? I can hear by sound, that far-away zone produce bad sound. After all, you wrote
As you can see, for the same Again, the problem occurs when zone is not found. Then the zone becomes I'm not creating new issue yet, want to get consulted with you first. Thank you. |
This isn't a regular problem
no sound artefacts |
You could not hear sound artifacts maybe because you are using different instrument. Besides, some can hear some defects and some do not. It does not mean that the defect does not exist. Finally, I pointed out wrong behavior in code; if such wrong behavior is found, it does not matter if the software "works" or not; it still needs to be fixed — the problem is way too obvious. Problem is fully analyzed, fixed and solution is tested, presented as a pull request. Any questions, concerns? I found couple more very apparent bugs which need to be fixed and can be fixed simply. I did not present fixed to avoid breaking of separation of concerns. Thank you. |
Thanks you for investigating of problem. Those are bugs of .sf2 converter but not player. |
I'm also looking closely at (my derivative of) the gree sf2 parser to see if I can find any bugs. |
Great. I understand that it's a converter problem. More exactly, it's a problem of the font file I can see, no matter how you obtained it. Of course, my solution is a sheer work-around, which works for me as soon as I have to use the font files with this problems. There is much more serious problem which I don't know how to work around. The instruments with damping does not damp out, they are looped. This is wrong. I modified your code to have "infinite" sound, a must-have thing if you have to create an instrument. If the sound damps, such as in piano or guitar, it should damp out to silence, not loop infinitely at lower volume. Your samples are not long enough, they are cut prematurely... Thank you. |
Looping is handled wrongly in the gree code. At line 141 in sound_font_synth_note.js |
James, Thank you for your message. Sorry, I have no idea of gree operation, perhaps due to lack of documentation in a language I could understand. All I know is that the JavaScript font data provided by the project webaudiofontdata. From that standpoint, the major problem with looping is not incorrect looping, but insufficient data in the sample -- there is not enough data to loop correctly or wait for the completion of damping. Should I understand from your comment that some part of sample was lost in processing? In all cases, I don't know or have original font source and don't know how surikov's JavaScript form of font is created. If I had original sources of fonts of reasonably good quality and completeness, knew all the formats, etc., I would probably think of parsing and processing them by myself. It could be better than looking for some undocumented software being not sure that it does the job properly. I already experimented with alternative ways of sample-based synthesis (Fourier, wavelets) but still don't know good solution. I already created fully-functional [https://github.com/SAKryukov/microtonal-chromatic-lattice-keyboard](microtonal instrument), but its timber repertoire is tiny and could use better quality of sounds. Thank you. |
Now all soundfonts works well. Download and test again. |
Thank you very much. How about the other problem, looping of the sounds which should damp out completely by certain time but instead are cut when they still sound (guitars, pianos, bells)? —SA |
zone with loopStart and loopEnd plays in loop defaultAHDSR array is [{duration : 0,volume : 1}, { There are hundreds of instruments in library. Some instrument has looping. Some instrument has looping and ahdsr. Choose carefully. PS |
Done. Before going to the looping/AHDSR problems... I downloaded new Totally wrong, conceptually. This is not what can work with, say, fractional tone values expressed in 12-TET. Should be, for example, 35-42, 42-48, 48-53. But my pull request fixed it dynamically, anyway. This part of the problem is very simple. And the sound artifact breaks the ear. I explained how to reproduce it. Now, the problem is: "there are hundreds of instruments in library". Let's say, I would ask you: "Do you have just one which sounds correctly with either your `webaudiofont' player or anything else? I need just one, but it should be piano". What would you answer? "Go find one in hundreds of instruments?" But why would I hope for success and decide to spend time on that, if tens of examples failed to sound correctly? The problem is: all samples I saw are just too short; they are cut well before the full damp ("full damp" is a questionable notion, I know, but this is not the point; the point is: too short). So, what do we have here:
Any suggestions? Thank you. |
player works fine with noninteger pitch values. Test again. |
Abstract
Suddenly, at first attempt, I came across weird sound in one specific interval, only within one specific semitone corresponding to MIDI notes 50 to 51. So far, I could not reproduce the problem in any other tonal range.
Steps to Reproduce
Run this and try microtonal sounds between MIDI notes 50 to 51, compare with other sounds:
The Problem Background
I do understand that this work is not intended for microtonal use. But! As I can see, microtonal sound works even without any change in the library. Also, I seriously think that the main value of this library is its microtonal potential.
Presently, there is a great activity in music around microtonal field: development of novel instruments and tone systems, and so on. There is a lot of 12-tone software these days, but the microtonal capabilities present a considerable problem. It's much better to concentrate on support of microtonal systems now.
My Questions
Thank you.
—SA
The text was updated successfully, but these errors were encountered: