Shop OBEX P1 Docs P2 Docs Learn Events
Quickstart Midi(out) Keyboard — Parallax Forums

Quickstart Midi(out) Keyboard

laurent974laurent974 Posts: 77
edited 2017-03-20 22:04 in Propeller 1
Hi,

just a little toy to play with the quickstart pads. Connecting the QS with your PC, you can pilot the GM drums with the pad.
It uses the usb to send Midi message to the PC

How to setup:
on windows:
on the right select microsoft GM / on the left select the USB port where QS is connected
hairless.jpg

On linux:
install hairless midi (ubuntu : sudo apt install hairless)
install sound fount : apt://fluid-soundfont-gm
install a virtual synth : sudo apt install fluidsynth it will install a gui synth called qsynth (launch it from a terminal)
qsynth.jpg

How to start:
after downloading to EEPROM, disconnect the QS, then launch your midi software (hairless (with qsynth for linux)) then re-connect your QS.
this is because the midi is sent to port 31,30 the same as the terminal.


to change a bank :
just modify these define
#define BASSDRUM  0x23
#define SNARE     0x26
#define CLAP      0x27
#define TOM1      0x29
#define CLOSEDHH  0x2A
#define TOM2      0x2D
#define OPENHH    0x2E
#define CYMBAL    0x34

you can find the hexa code here :
jchr.be/linux/midi.htm#batterie


Debug:
at compilation you can put a -D__DEBUG to GCC and see whats going wrong on parallax terminal


Next evolution i suppose that could be fine
propose a bunch of drums set that could be selected at the beginning.


For C coders guru:
i'm sure that code could be optimzed a lot since this is my first time in bits manipulation. If you find better way to do it i would be glad to read your improvments.


620 x 316 - 62K

Comments

  • Very cool. Thanks for sharing.

  • That's pretty neat. Thanks!
  • +1 :)
  • Awsome, works great, thanks...
  • laurent974laurent974 Posts: 77
    edited 2017-03-20 22:30
    New version !!

    Let me introduce to you the smallest midi keyboard ever : the QSKeyboard.

    Now it's possible to select a bank of sound at initialisation. The QS will start blinking red until you touch a pad (one or several). it will then select a bank of sound from midi and you 'll have a tiny midi keyboard at your hand.

    For drums => touch the pad P0.


    you can modify the scale with theses define
    // Notes
    #define C4_Note   0x3C
    #define D_Note    0x3E
    #define E_Note    0x40
    #define F_Note    0x41
    #define G_Note    0x43
    #define A_Note    0x45
    #define B_Note    0x47
    #define C5_Note   0x48
    
    
    int chromatic_scale[8] = {C4_Note,D_Note,E_Note,F_Note,
                              G_Note,A_Note,B_Note,C5_Note};
    
Sign In or Register to comment.