Welcome to %s forums

BrainModular Users Forum

Login Register

mouse dwn turns OFF a note instead of ON? How do I do the opposite?

I need help on a Patch
Post Reply
dentaku
Member
Posts: 10
Contact:

Unread post by dentaku » 29 Sep 2011, 20:02

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?

User avatar
nay-seven
Site Admin
Posts: 5684
Location: rennes France
Contact:

Unread post by nay-seven » 29 Sep 2011, 20:50

welcome dentaku,
you can insert a not(a) module ( in module/math/logical) to inverse the value
or a 1-x module too...

dw
New member
Posts: 1
Contact:

Unread post by dw » 29 Sep 2011, 21:26

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.

dentaku
Member
Posts: 10
Contact:

Unread post by dentaku » 30 Sep 2011, 04:20

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.

CleverConQueso
Member
Posts: 190
Contact:

Unread post by CleverConQueso » 30 Sep 2011, 05:00

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'.

dentaku
Member
Posts: 10
Contact:

Unread post by dentaku » 30 Sep 2011, 14:27

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.

User avatar
nay-seven
Site Admin
Posts: 5684
Location: rennes France
Contact:

Unread post by nay-seven » 30 Sep 2011, 15:13

yes you can :

Image

dentaku
Member
Posts: 10
Contact:

Unread post by dentaku » 30 Sep 2011, 15:21

Aha! That's even better :)

Post Reply

Who is online

Users browsing this forum: No registered users and 9 guests