Various conversions to/from strings, files, and memory buffers. 7-Zip commandline version (7za.exe) is requiredĪ set of encoder/decoder/helper functions to improve upon (or replace) PB's Base64 functions.This provides an interface to the basic archive functions of 7-Zip - creation, examination, and extraction - with password support. No credit required.Īll files are "EnableExplicit safe" and "Multiple-include safe" 7Zip.pbi Most of these come from my own projects, others were written for the PB forums, and some were never used at all. One is attached to a true MIDI interface (that's the one that plays) and the other two are USB MIDI devices.A variety of useful Include Files for PureBasic projects One thing I cannot seem to figure out is how to change the MIDI device that this plays out of. I am going to add a selector so I can choose This code plays a piano sound (in the left side only - weird panning), and I figured out how to change the instrument type. The Syntax is very different from what I am used to, but I can learn it. I read the article on MSDN and this really shows me how to adapt c++ to PureBasic. While midiOutClose_(\MidiOUT) = #MIDIERR_STILLPLAYING : Wend While midiInClose_(\MidiIN) = #MIDIERR_STILLPLAYING : Wend If GetAsyncKeyState_(27)&$8000 :_Quit=#True : EndIfĬase TBVol : midiOutSetVolume_(\MidiOUT,GetGadgetState(Tbvol)) MessageRequester("Error","No Midi devices found",0) SetGadgetText(_TG, "MIDI setting ready! Play MIDI Keyboard")Įlse : MessageRequester("Error","Can't connect MIDI",0) If Not midiConnect_(\MidiIN, \MidiOUT, 0) MidiOutShortMsg_(\MidiOUT, 192 | Instrument<<8 ) set instrument MessageRequester("Error","Can't start MIDI IN",0)Įlse : MessageRequester("Error","Can't open MIDI 0, 0, 0, 0) If midiInStart_(\MidiIN) #MMSYSERR_NOERROR If 0, 0, #CALLBACK_FUNCTION) = #MMSYSERR_NOERROR SetGadgetText(_TG,"Note Off "+Str(\Stat)+" Vel "+Str(\Dat1)) If \Dat1 : SetGadgetText(_TG,"Note On "+Str(\Stat)+" Vel "+Str(\Dat1))Įlse : SetGadgetText(_TG,"Note Off "+Str(\Stat)) Here only show NoteOn, NoteOff and Velocity dat2 is unused for Midi in/ Out callback function for handling incoming MIDI messages. Procedure MIDIInProc(hMidiIn, Msg, Instance, Dat1, Dat2) get MIDINotes Windows Only, with a Midi Keyboard attached. Midi_batterie( #Long_Whistle, "blanche", 127, 127,vitesse) Midi_batterie( #Acoustic_Snare, "double_croche", 127, 127,vitesse) Midi_batterie( #Closed_Hi_Hat, "double_croche", 127, 127,vitesse) Midi_batterie( #Side_Stick, "double_croche", 127, 127,vitesse) If Event = #PB_Event_CloseWindow If the user has pressed on the close buttonĮnd All the opened windows are closed automatically by PureBasic If openwindow ( 0, 100, 200, 320, 200, "PureBasic Window", #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget ) Lunch could be used for any sound to Windows events !! For sound to the opening or closing a window This example shows how to use the Midi library le midi pourrai etre employer pour sonoriser tout evenements Windows !! pour sonoriser l'ouverture ou la fermeture d'une fenetre cette exemple montre comment employer la Midi librairie
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |