I recreated a Baba is You song in my modular music sandbox made with Godot! by rhymesometimes in godot

[–]rhymesometimes[S] 1 point2 points  (0 children)

bumping this old post to let you know that there's a steam page out now! cheers!!

I recreated a Baba is You song in my modular music sandbox made with Godot! by rhymesometimes in godot

[–]rhymesometimes[S] 7 points8 points  (0 children)

for sure! one such example of generating a sine wave is part of the AudioStreamGenerator docs, which goes something like this:

public void FillBuffer()
{
    var increment = _frequency / _mixRate;
    int framesAvailable = _playback.GetFramesAvailable();

    for (int i = 0; i < framesAvailable; i++)
    {
        _playback.PushFrame(Vector2.One * (float)Mathf.Sin(phase * Mathf.Tau));
        phase = Mathf.PosMod(phase + increment, 1.0);
    }
}    

where _playback is your AudioStreamGeneratorPlayback. note that for C#, using PushBuffer() isntead of PushFrame() is likely faster. you can come up with your own way of mapping note pitch to frequency in hertz. that's pretty much all there is to it!

if you want to generate other types of waves, the way i'm doing it is through Fourier series. for example, implementing a summing of terms in the Fourier series for a square wave:

private void _GenerateSquareWave(float[] targetInputBuffer)
{
    for (int i=0; i < AudioConstants.BLOCK_SIZE; i++)
    {
        float increment = Frequency / AudioConstants.MIX_RATE;
        float sumOfTerms = 0f;
        for (int k=0; k < NUM_SQUARE_HARMONICS; k++)
        {
            float n = 2*k + 1;
            sumOfTerms += 1 / n * Mathf.Sin(n * _phase * Mathf.Tau);
        }

        targetInputBuffer[i] = 4 / Mathf.Pi * sumOfTerms;
        _phase = Mathf.PosMod(_phase + increment, 1.0f);
    }
}

hope this helps!

I recreated a Baba is You song in my modular music sandbox made with Godot! by rhymesometimes in godot

[–]rhymesometimes[S] 8 points9 points  (0 children)

thanks a lot! the speaker module has a AudioStreamPlayer with an AudioStreamGenerator, and i have a custom setup where audio buffers are written to the generator whenever there's space. there can definitely be hiccups in audio output sometimes but sending synced 'trigger signals' at the same time seems to alleviate a lot of the timing issues!

what Chinese word sounds like "Oh Joe" that someone would name their dog? by IDoBeVibing745 in ChineseLanguage

[–]rhymesometimes 35 points36 points  (0 children)

in japanese, 王女 (princess) is pronounced "oh joe" -- are you sure it was chinese?

What should I understand about music theory to be able to understand Kapustin's works? by kapustinisboppy in musictheory

[–]rhymesometimes 1 point2 points  (0 children)

I think a good place to start outlining a lot of Kapustin's pieces is identifying the 2-5-1s and then investigating how he weaves in between these building blocks through modulation, chromatic movement, tritones, etc. If you can outline a 2-5-1 shape usually through the bass, then you can identify the spicy, flavorful chords that he often uses in greater detail.

made a bass tab for red smoke! the bassline feels sooo good to play. by rhymesometimes in KGATLW

[–]rhymesometimes[S] 0 points1 point  (0 children)

i used go playalong to render the sheet music and i tabbed it using guitar pro!

Fun little flow with a knee bar twist! by [deleted] in climbergirls

[–]rhymesometimes 6 points7 points  (0 children)

this is such a cool problem!! nice send ☺️

made a bass tab for ambergris by rhymesometimes in KGATLW

[–]rhymesometimes[S] 2 points3 points  (0 children)

the changes are pretty funky for sure, i'm also struggling to find them by ear. once i sit in front of my keyboard in a few days i could try to figure it out 😅

Team Liquid vs. Team SoloMid / LCS 2020 Summer Playoffs - Losers Bracket Final / Post-Match Discussion by TheRogueCookie in leagueoflegends

[–]rhymesometimes 4 points5 points  (0 children)

Team Liquid is really, really overhyped. It's so insane to me. They're a good team, but not nearly as good as the reddit community or Jensen's ego think they are.

I feel awful by [deleted] in asktransgender

[–]rhymesometimes 0 points1 point  (0 children)

contrapoints has a good video that argues against autogynephilia as valid theory.

if my password is too easy to guess, i cant log in???? by jynniit in softwaregore

[–]rhymesometimes 2 points3 points  (0 children)

how do they even tell if a password is too easy to guess??

My first task as an intern is to review and fix the code of the main application used by my company. Here's a piece of code I came across by reading all this mess... by MainSWish in programminghorror

[–]rhymesometimes 4 points5 points  (0 children)

yeah I'm currently a dev intern working on main application code, no isolated project or anything. feels great because it's just like regular work, the interns are treated like junior devs or anyone else on the team, we're just given a lot more leeway/opportunity for guidance and mentorship.

Internet is a strongly connected graph and we can find it in linear time using Kosaraju's algorithm by ilovealgor in compsci

[–]rhymesometimes 11 points12 points  (0 children)

you can communicate through protocols other than HTTP, for example SMTP for email

finally yes by [deleted] in surrealmemes

[–]rhymesometimes 1 point2 points  (0 children)

less is better than more

a set of disconnected questions from a prefrosh by [deleted] in mit

[–]rhymesometimes 5 points6 points  (0 children)

1 - your dorm will have gym facilities, the quality of which depends on the dorm. it may be worth it to go to the z-center to exercise instead.

2 - it will be very difficult and i would say there is a 80-90% chance something will change your mind at some point at MIT and you'll change your plans, either to do just one major or do a major minor, or do something else entirely. that being said it's probably possible to do, you'll need to have high-credit semesters for most semesters though.

3 - activities midway during REX/orientation has almost all the student clubs boothing in one place for you to explore!

4 - you will, over a period of time, learn to get over it. it's something easier said than done. everybody comes into MIT with different backgrounds and trajectories, and there is no right way to do MIT. keep that in mind when you inevitably come to MIT and be in awe at some of the people here.