Results 1 to 3 of 3

Thread: How to play simple Midi melodies with ThinBasic using Sleep command or timers

  1. #1
    Junior Member
    Join Date
    Feb 2013
    Induno Olona (VA) Italy
    Rep Power

    How to play simple Midi melodies with ThinBasic using Sleep command or timers

    Hi to all,

    with ThinBasic is now possible to play simple melodies with the sounds midi of Windows (Synth SW Microsoft GS Wavetable), or the sound of your sound card, or even the sounds of a hardware MIDI device connected to the MIDI port of the PC.

    This can be done using timer controls or Sleep command and reading the notes stored in two string variables, one variable for notes and one for the timing of the notes.

    I have attached two examples of how this can be done, one in CONSOLE mode and one in UI mode.

    For now we need to use various API commands or include in project my MidiOut module, but later just use the command:
    Uses "MIDI"
    Eros has confirmed that has started writing the midi library and will be soon in the next versions of ThinBasic.

    Attached Files Attached Files

  2. #2
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Brno - Czech Republic
    Rep Power
    Thank you Max,

    this is great, worked perfectly on my PC

    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  3. #3

    Smile It works very well for me too.

    It worked straight away for me also, using Windows7 32 bit,i3 and ThinBasic

    Thankyou very much.

Similar Threads

  1. Replies: 6
    Last Post: 10-03-2013, 11:04
  2. swarm, a simple fun project to play with tbgl
    By kryton9 in forum TBGL Scripts and Projects
    Replies: 19
    Last Post: 30-05-2008, 15:23
  3. Execute simple OS command
    By rtconstant in forum thinBasic General
    Replies: 10
    Last Post: 28-05-2008, 21:00

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts