Mozzi midi input issue

344 views
Skip to first unread message

Felipe Fernández Sobarzo

unread,
Feb 2, 2016, 6:50:34 PM2/2/16
to Mozzi-users
Hi,
I'm testing the Mozzi midi input sketch and it looks like the envelope.noteOff() instruction is not doing anything, the sinewave sound keeps playing continuously without stopping the sound.
Any suggestions? 

Thanks,

Tim Barrass

unread,
Feb 2, 2016, 7:09:27 PM2/2/16
to mozzi...@googlegroups.com
Hi Felipe,
is the Arduino LED showing that the noteOff message is being caught by HandleNoteOff()?

Tim

--
You received this message because you are subscribed to the Google Groups "Mozzi-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mozzi-users...@googlegroups.com.
To post to this group, send email to mozzi...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/mozzi-users/1b5c1f07-d2aa-417c-ae14-54cb7aed2d85%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Felipe Fernández Sobarzo

unread,
Feb 2, 2016, 10:15:17 PM2/2/16
to Mozzi-users
Tim,
Thanks for your prompt response. The light turns off after i release the key, i even commented this part in HandleNoteOff: digitalWrite(LED,LOW);
And it's going into that part of the code, what is not executing is the : envelope.noteOff(); , or at least that's what i think. 
I even tried this:

  if(velocity == 0){
    // some midi controllers send velocity 0 instead of note-off
    envelope.noteOff();
    digitalWrite(LED,LOW);
  }  

and nothing, dunno what could be the problem, i switched to Arduino IDE ver 1.0.5 and only the sound was a bit different.

Tim Barrass

unread,
Feb 4, 2016, 6:26:10 AM2/4/16
to mozzi...@googlegroups.com
Hi Felipe,

I tested the example sketch here with a midi keyboard and it works for me.  I wonder what could be different at your end?

Tim

Felipe Fernández Sobarzo

unread,
Feb 4, 2016, 7:20:20 AM2/4/16
to Mozzi-users
Tim,
I'm thinking that the 6n137 might be broken or something, i'll test today with another one. I read somewhere that if you connect the wrong pins it can stop working properly, i'm kinda starting with electronics so i'm not sure about this.
Thanks!

Felipe Fernández Sobarzo

unread,
Feb 4, 2016, 8:44:00 AM2/4/16
to Mozzi-users
Tim, 
Do you have the schematics of the Midi IN circuit your are using?
Thanks
Message has been deleted

Felipe Fernández Sobarzo

unread,
Apr 5, 2016, 4:42:17 PM4/5/16
to Mozzi-users
Tim,
We tested our midi circuit with another synth(Midi simple synth) from the midi lib examples and it worked perfectly. 
I don't know what could be wrong because we are using the same sketches from the Mozzi examples.
Any suggestions ?

Mr Sensorium

unread,
Apr 6, 2016, 12:57:32 AM4/6/16
to Mozzi-users
Hi Felipe,
the midi circuits I've used include a generic one for Arduino, like many that come up in google, and the usb midi input on a Teensy.

Are you getting any error messages or sounds at all?

Tim

Felipe Fernández Sobarzo

unread,
Apr 6, 2016, 8:13:43 AM4/6/16
to Mozzi-users
Tim,
We are not getting any error msg's when we compile, after that we can play a basic oscillator  but when you play a note and then switch to another, it keeps playing a sound, so after playing one note is always playing something. I don't know if it's a sustain/release issue or a problem with noteOff msgs.
We haven't modified the sketch from mozzi so it should work.

Tim Barrass

unread,
Apr 6, 2016, 10:59:01 PM4/6/16
to mozzi...@googlegroups.com
Hi Felipe,
does the arduino led show that midi note on and note offs are being received as you'd expect?

--
You received this message because you are subscribed to the Google Groups "Mozzi-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mozzi-users...@googlegroups.com.
To post to this group, send email to mozzi...@googlegroups.com.

Felipe Fernández Sobarzo

unread,
Apr 7, 2016, 9:09:12 AM4/7/16
to Mozzi-users
Tim,
It blinks just normally, is the sound that "hangs"  somehow.

Tim Barrass

unread,
Apr 7, 2016, 9:32:37 AM4/7/16
to mozzi...@googlegroups.com
Mmm... it sounds like the release phase of the adsr envelope isn't working correctly, if the note-offs are being registered but the sound won't fade out.
Does it work if you alter the sustain parameter from 10000 to 200?

Felipe Fernández Sobarzo

unread,
Apr 7, 2016, 11:17:52 AM4/7/16
to Mozzi-users
Tim,
We also changed those values because 10000 looked like a lot, and the sound is still there, we even tried with values that are less than 200.

Tim Barrass

unread,
Apr 9, 2016, 12:31:53 AM4/9/16
to mozzi...@googlegroups.com
Hi Felipe,
I think I found the sound you're talking about - it's a hangover from the adsr not quite reaching 0 at the end.  I've attached a modified ADSR.h - let me know if this works for you.

Tim

ADSR.h

Felipe Fernández Sobarzo

unread,
Apr 10, 2016, 8:54:55 AM4/10/16
to Mozzi-users
Tim,
It works now!, what did you change in ADSR.h and why does this happens?
Thanks a lot!
Reply all
Reply to author
Forward
0 new messages