Using MAX/MSP for a digital instrument

    Mar 28 2010 | 10:15 am
    Hi, 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?
    Thanks, Ozzie

    • Mar 28 2010 | 11:45 am
      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.
    • Mar 28 2010 | 6:39 pm
      Without seeing your patch, it's impossible to say for sure.
    • Mar 28 2010 | 6:59 pm
      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?
    • Mar 28 2010 | 7:20 pm
      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?
    • Mar 28 2010 | 11:34 pm
      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
      You should read the tutorials before going further.