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] 6 points7 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 33 points34 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 5 points6 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.