Does Bah.PortMidi support sending messages as well?

Started by Mongoose, April 18, 2023, 06:53:54

Previous topic - Next topic

Mongoose

Hello,

Working on some MIDI Hackery and have been using stuff such as PureData / GlovePIE to do screwy stuff with synthesizers, but wanted to break out and interface with some things using Blitzmax. I've been screwing with Bah.Portmidi and saw that it can read incoming events just fine-- seems to catch any CCs I throw at it. 

However- Can't really wrap my head around if it can actually SEND messages out-- I'll outline what I plan to do. 

I mapped out all of the parameter controls on a Roland Boutique JU-06A and JX-03, and also built a loader that will detect when the racks are connected via USB and opened at a drive for patch transfers. I'd like to have a Patch database program that'll automatically save my patches, and then stream in all of the CC data associated with setting up these patches (Since Roland was nice enough to fully expose all control surfaces via MIDI, AND make their patch files human-readable!) - That way, I can just set MANUAL mode and quickly bypass / fast-load different patches without menu diving on the unit. Heck- may even go a step further and just have a full PC control surface where I can tweak parameters.

...but this requires the ability to SEND MIDI messages, not just read them. So! Can Portmidi do it? I saw the sendReceiveSysexMessage, but I'm not screwing with any System exclusives- just sending normal CC stuff to specific channels.

Midimaster

Yes BlitzMax can send and receive via MIDI

I have some skills in MIDI and work since years with the Bah.RtMidi.mod. I can tell you that it works without problems in both directions. As RtMidi open the port for any number of bytes, you can do Sys-Ex as well as regular MIDI commands Everything is possible.

Here in the forum a 4 or 5 people, that code intensive with MIDI, so you have good chances for getting answers to your questions. and we had some discussions in the past, so you will find several topics related to MIDI.

Good news: With the very new release of BlitzMax NG (published this week) the MIDI becomes part of the build-in modules. The name is now audio.midi.mod and it is the same wrapper for RtMidi-SDK as before. This audio.midi.mod already uses the last Rt-Midi-SDK 5.0. But BaH.RtMidi.mod is based on 4.0 and is now out-of-date.

About me:
In the late 80's I wrote a Software Programmer too. It was for the legendary ROLAND SUPER JUPITER and this was the start of my company. Because of that I had nice contacts with famous keyboarders. (Some day Tina Turner called me directly out of the studio to get a quick support for the  Editor.) Now 35 years later I'm about to finish work and like to share my skills.

So feel free to ask me. Welcome to the Syntaxbomb forum.
...back from Egypt

Mongoose

I had written out a very long and thoughtful post but the forums ate it :( Bit flustered, but wanted to respond. Heck!

I do appreciate the warm welcome, MIDIMaster, and hope to contribute more! I discovered RTMidi last night and got a few sends working in my network, but really need to move to NG from my -ancient- install that's precariously glued together. Luckily BLIDE supports it.

If you're curious about my projects, drop me a PM :) I had outlined them, but all that work... gone! Ah well, it happens!




wadmixfm

Hi midimaster , long time no speak :)

i just noticed that you mentioned this

Good news: With the very new release of BlitzMax NG (published this week) the MIDI becomes part of the build-in modules. The name is now audio.midi.mod and it is the same wrapper for RtMidi-SDK as before. This audio.midi.mod already uses the last Rt-Midi-SDK 5.0. But BaH.RtMidi.mod is based on 4.0 and is now out-of-date.

is there another module to download or is it just built in to the audio.mod folder ??

before i was importing

BaH.RTMidi

so what is it now then ??

cheers

Lee

Midimaster

I did not use it the new way, but I would guess that this in enough:

Code (vb) Select
Import audio.midi
Global MyMidiOut:TMidiIn = New TMidiOut.Create()
' now continue like in former times

From this moment the variable MyMidiOut works like before, when we defined it via RTMidi:

' old approach:
Import BaH.RtMidi
MyMidiOut:TRtMidiOut = New TRtMidiOut.Create()
...back from Egypt

wadmixfm

when i try the above it says it cant find the module audio.mod

i have just recently downloaded the latest version for the mac and there is a folder in the Mod Folder called Audio.mod

but no Audio.Midi.mod in that folder

thanks for replying

lee

wadmixfm

i could not find the mod folder anywhere in the installation of the new version of blitzmax NG for the mac

so i went here

https://github.com/bmx-ng/audio.mod/tree/d78a86dc06ffbfdc0183392b360baaa7f8c4208b

downloaded the audio.mod

and copied it to the mod folder and rebuilt the modules in blitzmax and now its working again :)

lee