Support

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

Turn polyphonic MIDI into mono?

For general discussion related FlowStone

Turn polyphonic MIDI into mono?

Postby nix » Sat Oct 24, 2015 1:15 am

Heya,
How's it going?
I am working on my guitar to MIDI converter,
and would now like to turn the polyphonic(max 6 voice) MIDI into monophonic MIDI.
I assume there is a neat way in Ruby, and I am hacking around with MIDI Split, MIDI Event and MIDI Mono.
Split and Mono both give just the last note played, which seems helpful, but how do I trigger just monophonically?
Mono gives number of voices playing.
Cheers and wishing your puzzles solved
User avatar
nix
 
Posts: 817
Joined: Tue Jul 13, 2010 10:51 am

Re: Turn polyphonic MIDI into mono?

Postby tulamide » Tue Oct 27, 2015 8:44 pm

Could you elaborate on this? Turning poly into mono midi would need some rules. What about chords? Which note should get through, what about overlapping notes, etc.?
"There lies the dog buried" (German saying translated literally)
tulamide
 
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: Turn polyphonic MIDI into mono?

Postby nix » Wed Oct 28, 2015 4:25 am

It should be last note on,
and last note off.
No retrigging stolen.

Thanks for musing on this!
User avatar
nix
 
Posts: 817
Joined: Tue Jul 13, 2010 10:51 am

Re: Turn polyphonic MIDI into mono?

Postby tulamide » Wed Oct 28, 2015 10:22 am

Does this work good enough for you? I might not have fully understood the task, but I think I'm close to it?
Attachments
midi_poly_to_mono.fsm
(20.54 KiB) Downloaded 786 times
"There lies the dog buried" (German saying translated literally)
tulamide
 
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: Turn polyphonic MIDI into mono?

Postby nix » Wed Oct 28, 2015 1:53 pm

Perfect mate!
Thanks a bundle
I'll try and comprehend the code further,
although it is a little like mine with pushing and deleting.
User avatar
nix
 
Posts: 817
Joined: Tue Jul 13, 2010 10:51 am

Re: Turn polyphonic MIDI into mono?

Postby tulamide » Wed Oct 28, 2015 4:41 pm

nix wrote:I'll try and comprehend the code further,
although it is a little like mine with pushing and deleting.

I like that you don't just want a solution but actually understand the code, too. It isn't very complicated.

Each Note On event's key is stored in the buffer. As soon as the buffer has 2 entries, the oldest one (stored at index 0) is turned into a Note Off, deleted from the buffer and sent to the output. After that the NoteOn event of the new note is sent to the output as well.

Each Note Off event's key is deleted from the buffer. If the buffer is empty it means there is no older note and the current Note Off is sent to the output.
"There lies the dog buried" (German saying translated literally)
tulamide
 
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany


Return to General

Who is online

Users browsing this forum: No registered users and 74 guests