Shop OBEX P1 Docs P2 Docs Learn Events
MIDI Examples — Parallax Forums

MIDI Examples

Bob Lawrence (VE1RLL)Bob Lawrence (VE1RLL) Posts: 1,720
edited 2025-01-20 09:55 in Propeller 1
Midi Input:
https://forums.parallax.com/discussion/125994

Overview:
http://nagasm.suac.net/ASL/Propeller/20080312/MIDIinPropeller.htm
==========================================================================

MIDI out Schematic:
https://forums.parallax.com/discussion/118144

MIDI Input and Output Schematics:

https://forums.parallax.com/discussion/98059/propeller-midi-circuit-plz
=========================================================================================================


Synthesizer object with General MIDI sound

https://forums.parallax.com/discussion/111867

MIDI Expander:
http://forums.parallax.com/attachment.php?attachmentid=60054&d=1239629974

MIDI Expander Lightshow (zip)
http://forums.parallax.com/attachment.php?attachmentid=60228&d=1240218022

========================================================================================================
Sythesizer:
https://forums.parallax.com/discussion/126780

Sick Day Synthesizer:
https://forums.parallax.com/discussion/109220

Rainbow synthesizer: polyphonic, multitimbral wavetable synthesis:
https://forums.parallax.com/discussion/109498
===========================================================================
Propeller Multimedia Board(MIDI Interface):
http://syso.name/wiki/index.php/Propeller_Multimedia_Board#The_MIDI-Interface
============================================================================
MIDI to LED:

https://forums.parallax.com/discussion/124019
==============================================================================
Completed Propeller based MIDI projects

Computerized Pyrotechnic Firing System:
http://www.parallax.com/tabid/716/Default.aspx
https://web.archive.org/web/20130528053707/http://www.parallax.com/tabid/716/default.aspx

MIDIomatic:
http://www.parallax.com/tabid/711/Default.aspx
https://web.archive.org/web/20130208101131/http://www.parallax.com/tabid/711/Default.aspx
======================================================================
A few Objects to get started with:

MIDI in:
https://obex.parallax.com/obex/midi_in/

Full Duplex Serial
https://obex.parallax.com/obex/full-duplex-serial/
======================================================================
Example Code:

' Transmit MIDI. Sends two notes to an external sound module.

CON

_clkmode = xtal1 + pll16x
_xinfreq = 6_000_000 ' Set it for whatever Xtal you have. I used a 6Mhz Xtal for the test.


midi_tx_pin = 16 'use any pin number you have available)
midi_rx_pin = 17 ' Not required to transmit. Use any pin you have available

OBJ

midi: "FullDuplexSerial"

PUB sendNote
midi.start(midi_rx_pin, midi_tx_pin, %0000, 31250) '%0000 = mode, Baud Rate = 31250
Repeat


midi.tx($90) ' Note On , (also %10010000)
Midi.tx(60) ' Note = C
Midi.tx(55) ' Velocity = 55

Waitcnt(clkfreq + cnt ) 'Delay

midi.tx($90) ' Note On , (Also %10010000)
Midi.tx(66) ' Note = C
Midi.tx(0) ' Velocity = 0


midi.tx($90) 'Note On
Midi.tx(79) 'Note = G
Midi.tx(55) 'Velocity = 0

Waitcnt(clkfreq + cnt )

midi.tx($90) 'Note On
Midi.tx(79) 'Note = G
Midi.tx(0) 'Velocity = 0

'I copied the pasted the code into the Prop IDE and except for aligning everything, it worked fine.

===========================================================================
MIDI Coming To 12Blocks:
https://forums.parallax.com/discussion/118236
===========================================================================

Prop MIDI on YouTube:
http://www.youtube.com/watch?v=OyBgHSvVgUY

Comments

  • garylakegarylake Posts: 41
    edited 2010-12-04 12:23
    None of these examples gave me any insight on sending Midi (not midi files but the notes I tell it to send) out to a synth. I just want to know what data is sent and how it is sent. Say I want channel=1, note=c, velocity=64 to be sent out of P17 to the midi out Din 5.

    SER.start(0, 17, 0, 31250)
    SER.tx(144)
    SER.tx(60)
    SER.tx(64)

    That doesn't do anything.

    Anyone know how to do this?
  • Bob Lawrence (VE1RLL)Bob Lawrence (VE1RLL) Posts: 1,720
    edited 2010-12-04 18:21
    I tested and posted the code required to do a simple 2 note send.
    garylake wrote: »
    None of these examples gave me any insight on sending Midi (not midi files but the notes I tell it to send) out to a synth. I just want to know what data is sent and how it is sent. Say I want channel=1, note=c, velocity=64 to be sent out of P17 to the midi out Din 5.

    SER.start(0, 17, 0, 31250)
    SER.tx(144)
    SER.tx(60)
    SER.tx(64)

    That doesn't do anything.

    Anyone know how to do this?
Sign In or Register to comment.