[Csnd] Get the note-off message (velocity = 0)
Date | 2018-04-06 13:05 |
From | Hanstein Rommerud |
Subject | [Csnd] Get the note-off message (velocity = 0) |
Hello, Sorry for potentially bad explained problem... I'm periodically an active CSound-user, but it's quite a while since I've been working on this - it has been more work done in Pure Data. Anyhow. I couldn’t so far find the correct solution for this, so I hope this is something someone could give a quick answer to. When pressing down a MIDI key (or controlling CSound from another platform), CSound receive note number and velocity, and at note off note number and 0. This is a bit hard to explain, but I need to «get hold of that 0» when it’s note of. I am using an arduino with CSound, therefore is this necessary (so that I can send a 0 to the arduino to tell it that it is to stop the note). In other cases, it is possible to use a madsr-opcode, but that is not relevant here… I mean, when an instrument is stopped being played, it should tell the arduino to stop by sending a signal (0) to the serial port. Best regards, Hanstein Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here |
Date | 2018-04-06 15:03 |
From | Dave Seidel |
Subject | Re: [Csnd] Get the note-off message (velocity = 0) |
You can use the release opcode to detect if the instrument is being called on release, this is what I use to know when to turn off instruments that I kicked off on the initial note press. On Fri, Apr 6, 2018, 8:15 AM Hanstein Rommerud <hanstein@alumni.ntnu.no> wrote: Hello, |
Date | 2018-04-06 15:31 |
From | Tarmo Johannes |
Subject | Re: [Csnd] Get the note-off message (velocity = 0) |
Not sure If I got what you need but perhaps you could think of starting and stopping instrument from MIDI note (events from channels 1 start instrument 1, channel 2 instr 2, or use massign) and you can use a i-time operation to send something to arduino and release opcode to detect the end: ;setupd arduino instr 1 ; started from midi serialWrite_i iPort, iByte if (release()==1) then serialWrite <something else> end endin Hope it helps you further, see also greetings, tarmo 2018-04-06 17:03 GMT+03:00 Dave Seidel <dave.seidel@gmail.com>:
|
Date | 2018-04-07 08:54 |
From | Hanstein Rommerud |
Subject | Re: [Csnd] Get the note-off message (velocity = 0) |
Thanks Tarmo and Dave, I'll see if I can get this working! Best regards, Hanstein
On 2018-04-06 16:31, Tarmo Johannes wrote:
|