If you have a problem or need to report a bug please email : support@dsprobotics.com
There are 3 sections to this support area:
DOWNLOADS: access to product manuals, support files and drivers
HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects
USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here
NEW REGISTRATIONS - please contact us if you wish to register on the forum
Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright
MIDI Helper Modules
14 posts
• Page 1 of 2 • 1, 2
MIDI Helper Modules
Hi All,
In the process of getting started in my latest project, I had need of a few tools to help me with debugging a lot of MIDI processing. I thought I'd share a few here that folks might find handy. Inside each module is a comment containing instruction for how to use it. Only the MIDI monitor has a module GUI; the others only have properties pages (locked open as saved.)
Note: FlowStone 3.0.6 is required for some of these modules to function. Others may work with earlier versions, but I can't guarantee it!
MIDI Monitor
This is just a (very slightly) updated version of my old MIDI Monitor. Not much has changed, but a few Ruby bugs here and there have been fixed, and the code has been made a little more efficient.
- Running display of incoming MIDI messages and a count of them.
- Closer inspection of MIDI events to show their byte values, including full SysEx dumps.
- Real-time display of what notes are currently playing.
- Four 'sequence' memories for storing and replaying any selection of received messages.
Next up are a couple of tools for when you need a handy source of MIDI messages, but don't have a hand free, or if (like me) you get very confused when the PC keyboard is selected as the MIDI input and think you've forgotten the keyboard shortcuts again!
MIDI Test Message
A quick way to generate any kind of 3-byte MIDI message on any channel. The message can be sent either from a button press, movement of a knob, or only when the knob is released. The knob value is assigned to whichever of data1 or data2 is most appropriate to the message type, and a value for data1 can be set when data2 is the knob value..
Random MIDI Generator
Exactly as it says - it generates a stream of random MIDI messages, with full control over what messages the stream is allowed to include, and how they should be timed. The stream can also be set to stop after a pre-determined period. Notes are given a random length upon creation to make sure that every note-on gets a matching note-off.
Simple MIDI Recorder
Record a short snippet of MIDI from the input, then play it back either one-shot or in a repeating loop. The MIDI sequence is remembered when the schematic is saved or when the module gets put into the toolbox - so you can keep a selection of them handy with different "test signals". Notes are adjusted to ensure note-ons always get a note-off even if you start/stop recording mid-note.
Note that there's no attempt to synchronise playback with VST etc. - the timing is tight enough for testing purposes, but loops would drift out of time very quickly, I think!
MIDI Note Hold
A module for holding/sustaining MIDI notes, with three different modes...
- Sustain: Typical sustain pedal action; new notes are held until sustain is turned off.
- Chord Hold: Overlapping notes create a chord which is held after key release until a new chord is started.
- Mono Hold: Holds the most recently played note.
Note hold can be turned on/off either by a 'green' input or by choosing a MIDI CC to use (e.g. 64 = sustain pedal.) The mode can be changed at any time, even while notes are currently being played or held.
SysEx Builder
And, since my big project is all to do with MIDI SysEx, a little module to allow SysEx test strings to be built a little more easily. You can type a SysEx message into this in a format like the one shown below, making it much easier to apply small edits...
In the process of getting started in my latest project, I had need of a few tools to help me with debugging a lot of MIDI processing. I thought I'd share a few here that folks might find handy. Inside each module is a comment containing instruction for how to use it. Only the MIDI monitor has a module GUI; the others only have properties pages (locked open as saved.)
Note: FlowStone 3.0.6 is required for some of these modules to function. Others may work with earlier versions, but I can't guarantee it!
MIDI Monitor
This is just a (very slightly) updated version of my old MIDI Monitor. Not much has changed, but a few Ruby bugs here and there have been fixed, and the code has been made a little more efficient.
- Running display of incoming MIDI messages and a count of them.
- Closer inspection of MIDI events to show their byte values, including full SysEx dumps.
- Real-time display of what notes are currently playing.
- Four 'sequence' memories for storing and replaying any selection of received messages.
Next up are a couple of tools for when you need a handy source of MIDI messages, but don't have a hand free, or if (like me) you get very confused when the PC keyboard is selected as the MIDI input and think you've forgotten the keyboard shortcuts again!
MIDI Test Message
A quick way to generate any kind of 3-byte MIDI message on any channel. The message can be sent either from a button press, movement of a knob, or only when the knob is released. The knob value is assigned to whichever of data1 or data2 is most appropriate to the message type, and a value for data1 can be set when data2 is the knob value..
Random MIDI Generator
Exactly as it says - it generates a stream of random MIDI messages, with full control over what messages the stream is allowed to include, and how they should be timed. The stream can also be set to stop after a pre-determined period. Notes are given a random length upon creation to make sure that every note-on gets a matching note-off.
Simple MIDI Recorder
Record a short snippet of MIDI from the input, then play it back either one-shot or in a repeating loop. The MIDI sequence is remembered when the schematic is saved or when the module gets put into the toolbox - so you can keep a selection of them handy with different "test signals". Notes are adjusted to ensure note-ons always get a note-off even if you start/stop recording mid-note.
Note that there's no attempt to synchronise playback with VST etc. - the timing is tight enough for testing purposes, but loops would drift out of time very quickly, I think!
MIDI Note Hold
A module for holding/sustaining MIDI notes, with three different modes...
- Sustain: Typical sustain pedal action; new notes are held until sustain is turned off.
- Chord Hold: Overlapping notes create a chord which is held after key release until a new chord is started.
- Mono Hold: Holds the most recently played note.
Note hold can be turned on/off either by a 'green' input or by choosing a MIDI CC to use (e.g. 64 = sustain pedal.) The mode can be changed at any time, even while notes are currently being played or held.
SysEx Builder
And, since my big project is all to do with MIDI SysEx, a little module to allow SysEx test strings to be built a little more easily. You can type a SysEx message into this in a format like the one shown below, making it much easier to apply small edits...
- Code: Select all
# A helpful comment to say what this SysEx does.
# Blank lines can be used to split things up.
F0 # An in-line comment.
0A 0B # Hex bytes.
"Hello" # ASCII Bytes quoted.
[10 11 12] # Decimal bytes inside [].
3A3B3C # Adjacent Hex OK.
3A,3B,3C # Or with just about any separator.
[61, 62] # Likewise for decimals.
# Blank lines and line comments can go anywhere!
"Goodbye"
3D,3E
F7 # THE END!
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
Don't stagnate, mutate to create!
-
trogluddite - Posts: 1730
- Joined: Fri Oct 22, 2010 12:46 am
- Location: Yorkshire, UK
Re: MIDI Debugging Helpers
Oh that looks nice !
Thanks TROG
Thanks TROG
- RJHollins
- Posts: 1571
- Joined: Thu Mar 08, 2012 7:58 pm
Re: MIDI Debugging Helpers
Really good and useful stuff there Trog.
Many thanks for sharing.
Spogg
Many thanks for sharing.
Spogg
-
Spogg - Posts: 3358
- Joined: Thu Nov 20, 2014 4:24 pm
- Location: Birmingham, England
Re: MIDI Debugging Helpers
Brilliant stuff, Thanks Trog
-
DaveyBoy - Posts: 131
- Joined: Wed May 11, 2016 9:18 pm
- Location: Leeds UK
Re: MIDI Debugging Helpers
Hi Trog,
a late welcome back from me 2
Really good to see u here!
I use ur old MIDI Monitor as default in my projects...
Nice to have an updated one.
=> Ooops: "Double L-click a SysEx message to show a complete dump." only shows blank - tested with sysex in FS 3.06
also "Double L-click a regular 3-byte message in the main display to open a text box showing its bytes in hex." shows nothing here...
Could you make the Midi recorder more stable than the original one?
Cheers,
Walter
a late welcome back from me 2
Really good to see u here!
I use ur old MIDI Monitor as default in my projects...
Nice to have an updated one.
=> Ooops: "Double L-click a SysEx message to show a complete dump." only shows blank - tested with sysex in FS 3.06
also "Double L-click a regular 3-byte message in the main display to open a text box showing its bytes in hex." shows nothing here...
Could you make the Midi recorder more stable than the original one?
Cheers,
Walter
-
Walter Sommerfeld - Posts: 249
- Joined: Wed Jul 14, 2010 6:00 pm
- Location: HH - Made in Germany
Re: MIDI Debugging Helpers
Walter Sommerfield wrote:a late welcome back from me 2
Really good to see u here!
Hi there! It's good to see that you're still around, too!
Walter Sommerfield wrote:=> Ooops: "Double L-click a SysEx message to show a complete dump." only shows blank - tested with sysex in FS 3.06
also "Double L-click a regular 3-byte message in the main display to open a text box showing its bytes in hex." shows nothing here...
Hmm, that's strange. I can't reproduce that here at all (I tried from the link above to make sure that the download isn't corrupted.) I'm also using 3.0.6, though the schematic has been tinkered with in later versions, and I might have some 3.0.8 files in my install paths somewhere. If I get time, I'll do a proper clean install, just to make sure.
Is anyone else able to reproduce this problem? On what versions of FS? (NB: the three smaller modules require 3.0.6, as they use 'scheduleMethod' - I'll note that in the download post too.)
Walter Sommerfield wrote:Could you make the Midi recorder more stable than the original one?
I've been thinking about that, as a VST synchronised MIDI looper is something I'd love to have. The relative timing of events in a sequence is actually pretty tight, as the timestamps are Ruby double-precision floats. If the sequence were fired from a MIDI message (placed once per bar in a sequencer, say), the tests I've done in the past suggest that the timing would be pretty good (though maybe not sample accurate.)
The tricky bit would be to fire the sequence internally at exactly the right time for the loop point, without needing an external trigger. Without trying it, I'm not sure how much "free-running" the loop (i.e. calculating the loop point from the tempo) would drift - it would depend partly on what maths the VST host is using for the same thing, and wouldn't account for tempo changes at all well.
The most obvious way to do it would be to read the VST PPQ stream as a Ruby Frame, but real-time Ruby processing is very inefficient. I have a vague idea in the back of my mind that there might be a much faster way to calculate a 'time correction' value on demand, but I haven't got as far as trying to sketch anything out yet.
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
Don't stagnate, mutate to create!
-
trogluddite - Posts: 1730
- Joined: Fri Oct 22, 2010 12:46 am
- Location: Yorkshire, UK
Re: MIDI Debugging Helpers
Aah!
I've just had a thought what might be the problem with the invisible SysEx dumps in the MIDI Monitor. The hex display uses a different font than the one selected for the main window, because it needs to be a fixed width font. I may have chosen something which not everyone has installed.
I've uploaded a new version to the top-post which has properties added for the hex view font and font size. Even if it doesn't fix the problem, they really ought to have been there anyway!
I've just had a thought what might be the problem with the invisible SysEx dumps in the MIDI Monitor. The hex display uses a different font than the one selected for the main window, because it needs to be a fixed width font. I may have chosen something which not everyone has installed.
I've uploaded a new version to the top-post which has properties added for the hex view font and font size. Even if it doesn't fix the problem, they really ought to have been there anyway!
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
Don't stagnate, mutate to create!
-
trogluddite - Posts: 1730
- Joined: Fri Oct 22, 2010 12:46 am
- Location: Yorkshire, UK
Re: MIDI Debugging Helpers
Well - i thougth about wrong font too...
But had less time to look into ur schematic further.
Now we are closer - see pic...
Changed Marlett font to my now favorite Calibri - et voila: works fine
Thanks again for this!
Good 2 hear that you continue ur work on the midi player timing.
Looking forward...
Keep on doing!
But had less time to look into ur schematic further.
Now we are closer - see pic...
Changed Marlett font to my now favorite Calibri - et voila: works fine
Thanks again for this!
Good 2 hear that you continue ur work on the midi player timing.
Looking forward...
Keep on doing!
- Attachments
-
- Midi Monitor OK 3s.png (94.77 KiB) Viewed 20164 times
-
- Midi Monitor scribble 2s.png (16.45 KiB) Viewed 20164 times
-
Walter Sommerfeld - Posts: 249
- Joined: Wed Jul 14, 2010 6:00 pm
- Location: HH - Made in Germany
Re: MIDI Debugging Helpers
Thanks, Walter - it's good to know that the simple fix worked. After all these years coding, I really should know better than to use "magic strings" buried in the code instead of easily-discovered config constants or properties!
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
Don't stagnate, mutate to create!
-
trogluddite - Posts: 1730
- Joined: Fri Oct 22, 2010 12:46 am
- Location: Yorkshire, UK
14 posts
• Page 1 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 115 guests