Take the 2-minute tour ×
Musical Practice & Performance Stack Exchange is a question and answer site for musicians, students, and enthusiasts. It's 100% free, no registration required.

I am currently writing a haskell program that imitates the play of a human Guitar player and spits out Midi events. As a Guitar I am using a sampled Telecaster on Fluidsynth/Qsynth.

To mimick a slide-up I use pitch-bend, but I also wanted to add a little "pluck" as the finger moves across a fret. To my surprise I had to realize, that when I play two consecutive notes of the same pitch over the same channel, the second note silences the first.

Is this the expected behavior? Is this what you would expect from the Midi standard? Or is it Fluidsynth misbehaving?

Should it be Fluidsynth, does anybody know what I could possibly do to convice it that NOTE_ON means NOTE_ON and not NOTE_OFF followed by NOTE_ON?

share|improve this question
    
Your virtual instrument might be trying to simulating a real guitar. Although this is piano behaviour primarily. –  Lee Kowalkowski Apr 10 at 9:16
add comment

3 Answers 3

up vote 7 down vote accepted

That's pretty common. My synth does that, too.

Overlapping notes is a grey area in midi.

But most synths do perform an implicit noteoff when a noteon comes along on that channel.

If you want it to stay on, put them on seperate channels. That'll usually do the trick.

Midi is primarily meant for piano. And you find lots of notation that shows a chord for the whole bar with overlapping melody notes.

So as soon as you play a melody note on the same note as the chord... Well the piano has one key to play that note so it needs to be damped before you can hear the overlapping one.

Usually the way guitar is done over midi is you have a channel per guitar string.

share|improve this answer
    
Yes, I am using one channel per string, but that didn't save me for this particular problem. In case you have any other (i.e. non-midi) ideas about how to produce guitar sounds, I'd be happy to hear about them –  Martin Drautzburg Apr 9 at 19:33
    
oh yeah. hmmm. so the situation is you have a chord, say C,E,G playing for a bar with an arpeggio across at say the 2nd quarter note on each qnote for the same C,E,G, right? If you think about how you'ld play that live, the arpeggio notes would need to pick up the remaining duration of the overlapped chord. So I guess if you want short overlapped notes, you'll need 2 channels for each guitar string if you don't want to bother with how it'd be played live. One channel for the string and another channel for overlaps on the same string. –  Stephen Hazel Apr 9 at 19:49
    
I don't think overlapping notes are a particularly gray area. The combination (channel number + note number) is the only means of designating particular notes to be cancelled; thus, if it will be necessary to cancel one note at a given pitch while sustaining another, the two notes must be on separate channels. –  supercat Apr 18 at 17:40
add comment

I'm not completely sure I understand what is happening but I have experienced similar things before. If you are trying to slide into a note, you could use an adjacent note bending into it. So if you are sliding up to a G, instead of using the pitch bend to have the G start flat and bend up, you could use an F# starting sharp and bend that up toward G, then attack the G.

Stephen's answer is very good and provides a much broader resolution to the issue of MIDI guitar issues but may require a little extra work and more in depth understanding. I'm a little unsure of how this would be programmed and whether or not you would be able to effectively capture the performance with a controller, ie there may be a lot more programming.

share|improve this answer
add comment

What do you mean by "pluck"? Why does it need to trigger the note again?

I'm assuming you mean the change in sound the slide through a fret induces. I'm thinking about the dynamics of the slide, and it doesn't really make much sense to simulate it as a new note on. I think it makes more sense to think about it as a change in the current sound, and not as a new sound.

What the slide through a fret is doing is a little amount of exciting to the string, but added to the current envelope state of the sound. That's why it makes sense to think of it as a change in amplitude, fast on its way up, slower on its way down.

You can modulate the sound so it changes when it reaches the "pluck" state. Maybe what you really want is a higher amplitude during the "pluck" state, and lower the amplitude when the sound is past the "pluck" state.

During the slide state, each change in semitone (each time the slide passes through a fret) should trigger a modulation, maybe an envelope or maybe a single cycle reverted sawtooth LFO, that shapes the amplitude (and perhaps the timbre?) dynamics as a slide through a fret would.

share|improve this answer
    
Valid point. Do you know how I could achive this through midi? Volume and timbre could be done via controllers. But how about the envelope? And what if the string isn't currently sounding? I would still hear the fret noise ("pluck"). –  Martin Drautzburg Apr 10 at 5:45
    
@MartinDrautzburg The envelope (or other modulation of your choice) can be applied by multiplication. If the string isn't currently sounding, the amplitude will be 0, therefore any modulation would result in a change in amplitude of 0. The fret noise would not be heard if the string is not currently sounding. –  JCPedroza Apr 10 at 16:22
    
@MartinDrautzburg I don't know the specifics of the tools you are using (the haskell program or the synth), so I'm not aware of the communication mechanics you have available. What you need is MIDI messages that trigger events in the synth, that triggers changes in the amplitude and/or timbre. Maybe the tools you have don't provide these options. –  JCPedroza Apr 10 at 16:29
    
@MartinDrautzburg You could also go with new sounds being created, but the new envelope being a fraction of the original envelope during the slide state. That way each semitone change during the slide state would generate a sudden raise in the amplitude, but a little lower each time a new fret is reached, simulating the lost energy of the string, different from when you excite the string by plucking it. –  JCPedroza Apr 10 at 16:32
    
I would expect any reasonable translation of guitar to MIDI should use one channel per string. If one does that, hammer ons, pull-offs, etc. could be accomplished either with various combinations of portamento and pitch-bend controls, or by designating certain velocity values as having "special" meanings (so that e.g. a "note on" velocity of 2 would represent a fretted finger which was not accompanied by a pluck). –  supercat Apr 18 at 17:45
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.