Using MAX/MSP for a digital instrument
I’m working on a project using a glove device to make digital music.
Recently I was persuaded to try MAX MSP as a medium to convert an Arduino Output into musical notes. While so far it’s been simple to get musical outputs, the sound doesn’t end. Each pin is connected to a message so that when it is pressed, a note is played. The problem is that when the pin is stopped, the note doesn’t end.
I’ve spent hours trying to get this to work, because this is a pretty critical feature. The only things I’ve found that seem to be for this (sustain, for example), are made for MIDI which we aren’t using. What can I do?
You need to ensure that it is Max, and not the Arduino code that’s causing this. You should have a continuous flow of data from the Arduino program, and somehow ensure that when the sensor(s) acheive a certain threshold, then Max is translating that into either a ‘note-start’ or ‘note-stop’ event. I can’t be more specific than this until you post your Max patch here, and describe your sensor data-mapping in more detail.
Without seeing your patch, it’s impossible to say for sure.
send a message in max to stop playing the sound when the pin is up? should be an easy thing to do, are you sending information from arduino about releases as well as pushes?
Here is the file.
I’m using Maxuino, so it’s able to tell when a note/LED is being "held down".
I think I just solved the holding problem (by switching from dac~ to ezdac~ , and also adding a logic mechanism (in this sketch both are there, even though only one has to be).
However, I’ve then run into two other problems.
1) Bad sound quality upon beginning/ending. There’s a scratch sound you’ll notice when turning on/off sounds quickly.
2) A very difficult time playing multiple notes at once. This is because while I’m finding it very easy to keep a note pressed, it is more difficult to turn off that note when it’s eventually released (even though other notes may be pressed).
I’ve been trying to find examples of similar things online, but have had little luck doing so. Do you think that MAX is really the right program for this?
The ezdac~ object is meant to start and stop the sound processing in a global way,
it is definitively not a good way to do what you want.
Also, if you want to play several notes simultaneously, you have to have several cycles running simultaneously
see example below
----------begin_max5_patcher---------- 722.3oc2X9saaBCEF+ZxSABsqpxh7+wr61ywT0DAboLQLQAGszV07rOv.YIa MjyxRMndiQXab97OeNmOBuLyKXY4NUUf+W7+lum2Ky77rc0zgW28dAqh2kTD WYmVfV8yxk+HXd6PF0Nis667QKH79tWGaRdLWm88MpDS6pyjzEn49XDu4Biz zRPKP9228L4o1Epdw+LlzuPOTpM53UJ6PecSdbQ+H5sqx0EJiUUjildU9y1o ia9INL2xsl9Ii6E4FUkRahM4k5iDJOjY0FwpWTWyAY1tPlmVqZmdvCEkw0O5 8MC+5rYMMyAxxUppp3L0eAyOgq4zfrzJQLKzxRr8F4YXIaTYo8zlH3vX40gw yDRVjqU6GjhsfKTzbgJFLhj+dRQxknXa1RDCFEqxyzMxxOXYrN6lxzjmRJT6 8oQjA.KUF0nQQaqbPtJbQz44HzUQFSYVVg5xYmzCk3FX6G9laR7+QtFlifEk jqM2zPi61eQK.Va0.jsxJKZPxHGyxVsECnD7+TB2MklWBlTbHX+TwHxRFRN0 sSoXIX6zvQEkQSW2TJlC1MUNhloLjXpYlVWIjPG.sc4Ns9oR9PjM5imcZW1I H6TzsyNsKYaBamRBifamhGw5VzPzj2NEyYfsS4iRR1HXLh4bvFirQAJN0hCy Iv+Citvh6cwrR8bZbxPXfzZD08BnsuSeS6agAJcvc6oaKzM2ZkHvKDCYsJPP cVojOdVqc42PrVIxqvZcBXRhwB3ljzIyQrUd1BR+wGm0tEa5+TXUUtcSR+B1 +gU7+8tLUUYx0Vi4imj7jI8XdZpxNd+NXUd55x5CsNQbliNvZRBPSMUL7wtS SgP3Dwsbh.QSL2pINz3IGd1wfnIta4Dd5EiGAASXmhIHYcts3jDJjb24FjR3 gtM5FAPRBmJIBjCN2VC.RoR2V8lBxQg51XInRxcIbf7SbKjnPsStVMUeyqy9 ELRsW8K -----------end_max5_patcher-----------
You should read the tutorials before going further.
Forums > MaxMSP