#include <stdio.h>
#include "raylib.h"
#define RAYGUI_IMPLEMENTATION 
#include "raygui.h"


int main(void)
{
    InitWindow(1920, 1080, "raylib [core] example - basic window");
    InitAudioDevice();
    float volume = 10.0f;
    float detune = 0.0f;
    while (!WindowShouldClose())
    {
        BeginDrawing();
        
        float current_volume = volume;
        float current_detune = detune;
            
        ClearBackground(BLACK);

        DrawText("Simple Synth V1", 10, 10, 24, RAYWHITE);
        GuiSlider((Rectangle){100, 100, 200, 30}, "Volume", NULL, &volume, 0, 100);
        GuiSlider((Rectangle){100, 150, 200, 30}, "Detune", NULL, &detune, -10, 10);
        EndDrawing();
        if (current_volume != volume) {
            printf("the value of the volume is: %f\n", volume);
        }

        if (current_detune != detune) {
            printf("the value of the detune is: %f\n", detune);
        }
    }

    CloseWindow();

    return 0;
}

