Start/Stop with midinote?

Hello,

I’m trying to start and stop a filestream, using the midinote module, but I can’t find how to do it functionnal.

I’ve connected the OnData pin of Midinote on S+H(Animation) Set and Input, so I can Start the Filestream, but I don’t know how to Stop the filestream using the same Keyboard key, How can I do to reset the value ?

As well, is there any method with midinote to keep a positive value when continuous pressing and a negative one when releasing the key ?

Thx for your help

guillaume

the value of MidiNote (Devices) gives you the keyVelocity. so a MIDInoteOff is in fact a MIDInoteOn with value =0 .

try attached patch, should work.
i cannot test it because i don’t have a MIDIkeyboard right now.

MIDInoteOnOff (Tutorial).v4p (3.7 kB)

thx Kalle for your help,
I’ve tried your patch with a keyboard and it’s working for a positive value when I press the key, and zero when I release, so thanks very much for guiding me.

But I can’t find how to proceed with a Start/stop with the same key, giving 1 with a first press, and keeping it, and zero for a second. I’m just looking at this function as the sound software like Audition or Nuendo with transport midi control. Any S+H issue that I don’t understand ?

guillaume

TogEdge (Animation) and Toggle (Animation) .

see this one

MIDInoteOnToggle (Tutorial).v4p (3.1 kB)

Thanks very much Kalle, that’s exactly what I need, I’ve tried with Toggle, but not with TogEdge, and now I can go ahead with my project, great !!! :)

guillaume

This is a very old question, but I was wondering if there is a way to differentiate between NoteOn and NoteOff events.

NoteOff MIDI messages start with a different byte than NoteOn messages, allthough for convenience NoteOn events with velocity 0 are treated as NoteOff also.

(In theory, if an instrument would support it, with MIDI it is possible to send a NoteOff event with a certain velocity, which could be used to let the instrument know if the key was released slowly or quickly.)

note off can be detected, when a slice changes from the velocity value to 0. the velocity value of a NoteOff event could be detected with the new MidiShort node of the next release… so be patient for a few days…