Page 1 of 1

Posted: 29 Sep 2011, 20:02
by dentaku
If I connect the mouse dwn of a Button to the create of a Create midi I can plug it into the midi in of a VST and a note plays.
The problem is that the note turns OFF when I press the button and ON when I let go.

How do I get it it do the opposite?

Posted: 29 Sep 2011, 20:50
by nay-seven
welcome dentaku,
you can insert a not(a) module ( in module/math/logical) to inverse the value
or a 1-x module too...

Posted: 29 Sep 2011, 21:26
by dw
Aha, that works. I press the button and it creates a MIDI note that stops when I let go.
I just found that I can set the ON value to a number and send it to the code 1 of the Create midi to control which note it plays.

Hmm... I guess I could create a Janko keyboard interface http://www.pianoworld.com/fun/janko.htm
It would be even better if I had a touchscreen. I'd love to have one of the Win8 tablets Microsoft gave to all the people who attended the Build conference.

Posted: 30 Sep 2011, 04:20
by dentaku
Hmmm... If I make a second button it doesn't so anything and I have it setup exactly the same way.
I'm guessing there's a better way of making buttons that send MIDI notes but I just haven't figured it out yet.

LATER... I just checked and it looks like these buttons just keep endlessly sending out midi data so I'm guessing they should send Midi OFF messages somehow when the mouse button is released. I know that's how it works in PureData.

I'm gonna go find an example of how to use buttons to send midi notes correctly I guess. I'm guessing it has something to do with sending a message of 128 or 144.

Posted: 30 Sep 2011, 05:00
by CleverConQueso
Can you upload an image of your patch?

You can create 'all MIDI notes off' or you can route your original MIDI message into the 'MIDI unpack' and then do a 'create MIDI message' with the note off message for that note or if you just want to turn one note off to allow another to play, you can use 'MIDI make monophonic' which sends a note off for the last note before sending the new note on.

Also, there's the 'from 1 to 0' which sends a button signal when something turns off - like a 'mouse down'. So when mouse down goes from true to false, a 1 is sent which can be connected to the 'create' input of 'make MIDI message'.

Posted: 30 Sep 2011, 14:27
by dentaku
After posting my last message I tried some more and I did end up using "from 1 to 0" and "from 0 to 1".
Image
This seems to work fine as long as both "create midi" connected to a button are set to the same note.

It still seems to me that I should be able to get away with using just ONE Cerate midi and change it to Note On and note Off through the "msg" input somehow.

Posted: 30 Sep 2011, 15:13
by nay-seven
yes you can :

Image

Posted: 30 Sep 2011, 15:21
by dentaku
Aha! That's even better :)