Added: 3 months ago
From: Bisqwit
Views: 1,088
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (22)

Sign In or Sign Up now to post a comment!
  • 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.

  • 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 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.

  • I somehow knew you're Finnish before checking from your channel.

    And isn't "Outside" actually named "Moonsong"?

  • @ZLau13 Maybe, but in the game's EXE it is just "oside".

  • I'd add captions, but not sure how that can be done.

  • @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.

  • Would you mind giving a link to the funcparser program from around 10:00? It looks quite useful.

  • @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 Thanks; I appreciate it!

  • Japanese Input in DOS? Woha!

    And what is "llinux.exe"?

  • @LunaVorax It's my best terminal emulator. Written in Borland C++ 3.1 and assembler.

  • 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 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).

  • How do you alter the frequency, doing the FM, mid-stream as you're submitting the samples to the output device?

  • @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).

  • @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 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.

  • you are amazing!

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more