Interesting, although I have to admit mostly over my head. I can do programming, but only with great difficulty, and I don't know much about audio encoding so I couldn't really follow what you were doing very well. But it looks most impressive. I wish I had the mental tenacity to do stuff like this.
By the way, don't worry about your English pronunciation, it was perfectly understandable :)
@JimPlaysGames Thanks Jim! I wish to instigate inspiration and insights. A lesson is at its best when it provides both something familiar and something alien to audience of all skill levels, clearly identifying possible next steps. I don't know how well I did in that regard, but at least I did lay out some concepts. I have been planning to make a lesson on how PCM audio works in general, but I can't figure out how to make that kind of a presentation. So I covered some of it in narration instead.
@ZLau13 Do not forget the -std=c++0x flag, I said in the video at 3:41. Without that flag, it fails to compile, because for now GCC defaults to pre-C++0x.
@Xkeeper0 By creating a subtitle file and sending it to me so I can add it to the video after reviewing it. Google "sbv youtube" for example on the format of the file.
@suomiopreknaks Not a problem, except YouTube inhibits the posting of URLs in comments. But just do a Google search on "warp functionparser" or "warp function parser" (without quotes), it should be the first hit. IBe sure to get the "devel" package rather than the vanilla version in order to get the "functioninfo" program. Extract, and run "make". The functioninfo program will be in the "util" directory.
@oEQjet The 6 basic waveforms (which are selected as such because it is what Cave Story does) are used as source signal types that are then combined with AM/FM modulation, producing an arbitrary number of new waveforms. Four of these arbitrary new waves (each scaled by an envelope generator) are mixed together to produce the sample that is one of the 12 "drum" instruments available to the song. The input waves are pre-rendered into 256-element arrays for efficiency reasons (they are constant).
@kiyotewolf The drum samples are pre-rendered into PCM samples and then used as such. The modulation happens during the pre-rendering (Channel::Synth()). Normally, the carrier signal is scanned by an even interval ("phaseinc" or "maindelta"), which defines the frequency. FM modulation alters this frequency by adding a factor calculated from another signal's value to the "maindelta" that gets added to "mainpos".
I added sample code in the video description (YouTube's comment form is really nasty and picky with what it accepts, and it did not allow me posting the code).
@oeQjet Lanczos resampling of audio is akin to image antialiasing: It does not alter the pitch or anything; it just makes the sound less coarse and more natural.
The oscilloscope forces a near-constant amplitude to display the waveform in full size. Upscaling a very quiet integer-based signal (here, the drum samples) makes it appear jagged. I forced the amplitude because otherwise most waves would have been rendered nearly invisibly thin. It was a workaround, and did not work as well as I hoped.
@oEQjet To clarify, yes, it is a manner of interpolation. I first tried linear interpolation (i.e. triangle filtering), which converts e.g. sample position 5.7 into s[5] * 0.3 + s[6] * 0.7 (rather than simply either s[5] or s[6]), but I tested and found that I get considerably better sound quality with lanczos and that I could fit lanczos without problem in either the program's performance or the video's length.
Interesting, although I have to admit mostly over my head. I can do programming, but only with great difficulty, and I don't know much about audio encoding so I couldn't really follow what you were doing very well. But it looks most impressive. I wish I had the mental tenacity to do stuff like this.
By the way, don't worry about your English pronunciation, it was perfectly understandable :)
JimPlaysGames 2 weeks ago
@JimPlaysGames Thanks Jim! I wish to instigate inspiration and insights. A lesson is at its best when it provides both something familiar and something alien to audience of all skill levels, clearly identifying possible next steps. I don't know how well I did in that regard, but at least I did lay out some concepts. I have been planning to make a lesson on how PCM audio works in general, but I can't figure out how to make that kind of a presentation. So I covered some of it in narration instead.
Bisqwit 2 weeks ago
Lolwut!? I get 50 errors and 10 warnings when trying to compile!
I just wanted an Organya player for Linux because I can't find one anywhere, and I don't have enough skills.
What is that thing you write it with?
ZLau13 3 weeks ago
@ZLau13 Do not forget the -std=c++0x flag, I said in the video at 3:41. Without that flag, it fails to compile, because for now GCC defaults to pre-C++0x.
Bisqwit 3 weeks ago
I somehow knew you're Finnish before checking from your channel.
And isn't "Outside" actually named "Moonsong"?
ZLau13 2 months ago
@ZLau13 Maybe, but in the game's EXE it is just "oside".
Bisqwit 2 months ago
I'd add captions, but not sure how that can be done.
Xkeeper0 3 months ago
@Xkeeper0 By creating a subtitle file and sending it to me so I can add it to the video after reviewing it. Google "sbv youtube" for example on the format of the file.
Bisqwit 3 months ago
Would you mind giving a link to the funcparser program from around 10:00? It looks quite useful.
suomiopreknaks 3 months ago
@suomiopreknaks Not a problem, except YouTube inhibits the posting of URLs in comments. But just do a Google search on "warp functionparser" or "warp function parser" (without quotes), it should be the first hit. IBe sure to get the "devel" package rather than the vanilla version in order to get the "functioninfo" program. Extract, and run "make". The functioninfo program will be in the "util" directory.
Bisqwit 3 months ago
@Bisqwit Thanks; I appreciate it!
suomiopreknaks 3 months ago
Japanese Input in DOS? Woha!
And what is "llinux.exe"?
LunaVorax 3 months ago
@LunaVorax It's my best terminal emulator. Written in Borland C++ 3.1 and assembler.
Bisqwit 3 months ago
Why don't you generate more complicated waveforms then the basic square, sawtooth, sine, and triangle?
I might of misunderstood, but arn't these waveforms getting baked into an array?
oEQjet 3 months ago
@oEQjet The 6 basic waveforms (which are selected as such because it is what Cave Story does) are used as source signal types that are then combined with AM/FM modulation, producing an arbitrary number of new waveforms. Four of these arbitrary new waves (each scaled by an envelope generator) are mixed together to produce the sample that is one of the 12 "drum" instruments available to the song. The input waves are pre-rendered into 256-element arrays for efficiency reasons (they are constant).
Bisqwit 3 months ago
How do you alter the frequency, doing the FM, mid-stream as you're submitting the samples to the output device?
kiyotewolf 3 months ago
@kiyotewolf The drum samples are pre-rendered into PCM samples and then used as such. The modulation happens during the pre-rendering (Channel::Synth()). Normally, the carrier signal is scanned by an even interval ("phaseinc" or "maindelta"), which defines the frequency. FM modulation alters this frequency by adding a factor calculated from another signal's value to the "maindelta" that gets added to "mainpos".
Bisqwit 3 months ago
I added sample code in the video description (YouTube's comment form is really nasty and picky with what it accepts, and it did not allow me posting the code).
Bisqwit 3 months ago
@Bisqwit Oh was that what the Lanczos resampling was about? you interpolate between the points in the sample?
though... It looked like the output in some of the oscilloscopes became jagged as notes faded out. Was this rounding?
oEQjet 3 months ago
@oeQjet Lanczos resampling of audio is akin to image antialiasing: It does not alter the pitch or anything; it just makes the sound less coarse and more natural.
The oscilloscope forces a near-constant amplitude to display the waveform in full size. Upscaling a very quiet integer-based signal (here, the drum samples) makes it appear jagged. I forced the amplitude because otherwise most waves would have been rendered nearly invisibly thin. It was a workaround, and did not work as well as I hoped.
Bisqwit 3 months ago
@oEQjet To clarify, yes, it is a manner of interpolation. I first tried linear interpolation (i.e. triangle filtering), which converts e.g. sample position 5.7 into s[5] * 0.3 + s[6] * 0.7 (rather than simply either s[5] or s[6]), but I tested and found that I get considerably better sound quality with lanczos and that I could fit lanczos without problem in either the program's performance or the video's length.
Bisqwit 3 months ago
you are amazing!
Peacemaker994 3 months ago