24
retnikt
5y

When I was about 10 I tried to make a basic midi sequencer/synthesiser using just the python standard library.
The only sound production there was was winsound.beep, which played a sine wave at the frequency given.
I realised that if I put enough really short beeps together I could make some mildly convincing instruments - I remember an electric piano, acoustic guitar, some kind of bass synth, and maybe more?
Then I put them together to make a song. The problem was though that you can't play multiple notes together as winsound.beep was blocking (though I didn't understand that at the time).
I had no knowledge of threading or async so I opened multiple python interpreter instances to play multiple channels. That's how I learnt about command-line arguments!
But I really struggled to get the sounds to be in time because python is not exactly rapid.
I made a kind of note sequencer using a library called easygui, based on tkinter (TCL wrapper), and I remember being told off at school for bringing in a usb stick with the exe of my program that I made with py2exe.
So many old technologies and fond memories...

Comments
  • 3
    Wow, I found that USB stick with the EXEs on it! (I can't find the original code, although you can probably extract it somehow) Here are a few:
    https://mega.nz//...

    "Art": Draws random rectangles on the screen

    "Quiz": Basic randomised addition, subtraction, multiplication, division quiz

    "AverageCalc": Input some numbers and get out the mean, median, mode, and range.

    "Blue Sky Blues": Plays some beeps in the tune of Blue Sky Blues, a jazz piece I was playing on piano at that age. Precursor to the midi sequencer mentioned above.

    Since they're EXEs, they need Winblows and Micro$hit Visual C++ 2010 Redistributable https://microsoft.com/en-us/...
  • 1
    When I was 10 I was busy playing video games πŸ˜‚πŸ˜‚and didn’t know a lot about coding in general
Add Comment