## MIDI CC to MIDI note converter

Device/Module Wishlist

Original topic on PlanetZ: https://forums.scopeusers.com/viewtopic.php?t=28471

#### MIDI CC to MIDI note converter

Posted: Thu Dec 10, 2009 12:14 pm
by Immanuel
Hi
I have a request for a Scope device, which can convert MIDI CC messages to MIDI note messages. (The device is intended to process incoming CC messages from a hardware sensor, which measures i.e. the distance to a child's arm for use in music therapy with i.e. severely or profoundly retarded people). The "rules" are:
The user can set either CC 0 or CC 127 to be the 'silence value'.
The rest of the range (1-127 or 0-126) can be divided into 1 to 16 notes.
The CC range for each note can be set by the user.
Each note can be set by the user - rather as note names than as note numbers.
The device is monophonic, so when a new is played, a note off message is sent for the previous note.
When the silence value is received, the device also sends a note off message.
I guess, these functions can somehow all be considered logistic.
A bonus would be, if the device can have a build in buffer, which calculates the average CC value within the previous up to 200 ms. This will stabilize things, if the child has involuntary tremor. But maybe this could also be a separate device from someone else.
A suggestion for the functions are as follows:

Code: Select all

    Silent value 0/127 (button, so the choice can be MIDI controlled)
    Sequence       1     2     3     4     5     6     7     8     9    10    11    12    13    14    15    16
    Note              x     x     x     x      x     x     x     x     x     x      x      x      x      x      x      x
    CC            *     xx   xx    xx    xx    xx    xx    xx    xx    xx    xx    xx    xx     xx    xx     xx      **
    Buffer

X is entered by the user i.e. A4 or C#3
* is set automatic by the device to 0 or 1
xx is entered by the user
** is set automatic by the device to 126 or 127
So if the user writes 20 in the first field, the first note of the scale will be played as long as the incoming CC message is between 0/1 and 20.
Anyone up for the task?

#### Re: MIDI CC to MIDI note converter

Posted: Fri Dec 11, 2009 3:03 am
by tgstgs
---------------
dont know if i got you right!!!!
what about this:
left fader sets the velocity;
right fader sets the midinote;
left rangetextvalues are 'to' values;
on the rigjht the notenumbers ben sent;
NO presets No screensets so far!!
assign a controller to the fader on the right for notenumber;
if a second movement is possible assign a controller to the fader on the left for velocity controll;
you can load 3 or more instances of the device assigned to different notenumbers to play chords;
or you assign different midichannels to different instances to play 2 or more synth to get a FAT sound for the kids up there in denmark;
good vibes from vienna
edit:
the dev is made on the fly just a prototype!!!!
if its basically what you need i optimize + presets and so . .
edit 2:
sorry and thanks for the hint;
added parameters;
sorry for make you download again;

Attachments
  Therapine.zip
    (45.18 KiB) Downloaded 192 times

#### Re: MIDI CC to MIDI note converter

Posted: Fri Dec 11, 2009 4:35 am
by dawman
Both of you chaps have my respect.
I am sure the parents of these children are eternally grateful.

#### Re: MIDI CC to MIDI note converter

Posted: Fri Dec 11, 2009 8:04 am
by Neil B
+1

#### Re: MIDI CC to MIDI note converter

Posted: Fri Dec 11, 2009 8:22 am
by Immanuel
Hi tgs
Wow! This looks great already!! I found a few bugs.
The device plays notes one octave too low compared to the note names entered.
The fourth filed always play MIDI note 39.
The device reverses the CC range and understands 0 as 127 and 127 as 0.
Also, the device appears to be measuring at regular time intervals. In most situations, this is too slow (maybe you set it to the 200 ms I asked for as a maximum?). A user setting for this interval would make my bonus wish come true.
Luxury question: Can i.e the space bar be used instead of # when entering note names? So C#3 becomes C 3?
Really nice work there. Thank you!!
Immanuel

#### Re: MIDI CC to MIDI note converter

Posted: Fri Dec 11, 2009 11:53 am
by tgstgs
off daw till next week;
no probl. to fix bugs;
as said i put together very fast;
right now you have 200ms from note on to next noteon;
but variable should be no probl. too;
only thing is faster is not possible over fader;
had to include the cc direct in the c++ code to be faster;
ill be back_
have a nice weekend vibes

#### Re: MIDI CC to MIDI note converter

Posted: Fri Dec 11, 2009 4:03 pm
by Immanuel
Wonderful. No hurry. I am just happy to get such a useful tool. It will open a lot of new opportunities
Immanuel

#### Re: MIDI CC to MIDI note converter

Posted: Tue Dec 15, 2009 3:52 am
by tgstgs
here we go_
prototype Nr2:.
there is no standard in octaves and midinotes;
did a -12 notes to play higher;
--
midinoteFader out of function -> disapeared as well as its bugs;
instead you have to assign a value for the controllernumber to be scanned for;
-----
there are new min and max timervalues;
min is the minumum delay between to noteon messages;
max is the maximum delay to send a noteoff for the last midinoteon;
both are in [ms] inside the device additional delays are setupdependant;
----------
added some color to have a optical feedback what is played actual;
and an ONOFF button to set voices of device to zero-> creates a reset;
--
presets should work;
------
would help to get a midifile with a record of controllerdata been created;
just 1 controller in action nothing else_
overwrite both files from zip!!
tell me what you think vibes

Attachments
  Therapine.zip
    (50.49 KiB) Downloaded 166 times

#### Re: MIDI CC to MIDI note converter

Posted: Tue Dec 15, 2009 1:57 pm
by JLS
This is great device - many thanks
is possible make one cc input - note lenght param. ?
THANKS

#### Re: MIDI CC to MIDI note converter

Posted: Wed Dec 16, 2009 3:24 am
by Immanuel
Hi again
I have a couple of new issues: I can not edit the min and max values. Also, if there is (1000 ms?) of lag between controller input, the device defaults to a semi-random note not played. Then, if this note stays on for (1000 ms?) the device gets stuck holding this note endlessly, and it no longer puts out new notes, before it is turned off and back on again.
Immanuel

#### Re: MIDI CC to MIDI note converter

Posted: Wed Dec 16, 2009 4:36 am
by tgstgs
you cannot edit timervalues while device is outputting midinotesON;
(while timer is running);
only if the last output was a midinoteOFF;
i thought this to be the simplest error correction to disable the textfileds while noteON;
it takes about 100ms to take effect;
seams youre faster;
---
usage would be
make settings;
send controller data;
make settings;
send controllerdata;
. . .
not both at same time so far;
-------
im sure there is more happening in your midistream then just controllerdata!?
there should be an errorcorrection inside in the end of course;
the simplest errorcorrection for prototyping is
a resetbutton if undefined condition ocourse;
if once the mainfunctions are fixed we do optimize, stabilize space instead of # . . .
if it puts a smile in the face of a child we could add cc2notelenght too;
---------
do you want to make timerchanging while controllerdata streams in?
i still dont know if these are the timers you want to set?
so would be good if you could check the function at all;
im on sdk where do you run it?
---
could your record the midistream feeded to the devcie while error happens;
this would simplify things;
good vibes

#### Re: MIDI CC to MIDI note converter

Posted: Wed Dec 16, 2009 7:55 am
by tgstgs
maybe a bit of filtering the midistream helps?

Attachments
  Therapine.zip
    (6.84 KiB) Downloaded 169 times

#### Re: MIDI CC to MIDI note converter

Posted: Sat Dec 19, 2009 11:03 am
by Immanuel
Hi again
Sorry for being so slow with responding at the moment. I have only gotten to test the newest version with CC inputs from my little B-ringer Nano. The only issue I have seen is, that sometimes the device gives an echo of the last note of a sequence. I will try to hook it up with my gear tomorrow and see how it works there and send you a recording of the MIDI stream.
This is going to be a very powerful tool for my work. I am very thankful.
Immanuel

#### Re: MIDI CC to MIDI note converter

Posted: Sat Dec 19, 2009 11:08 am
by Immanuel
I am running the latest v5 by the way.

#### Re: MIDI CC to MIDI note converter

Posted: Mon Mar 08, 2010 2:54 pm
by David
Thanks guys, great stuff