Audio to midi plugin won't play same note twice in a row. Help to edit with M4L?
A complete M4L blockhead here, hi. I have this audio to midi in realtime -plugin, which works almost perfectly, but it won't play two times the same note without my playing another note in between. So my guess is that I'd need to insert some sort of note-off behavior / note repeat rule / re-triggering box somewhere in MaxForLive editing tree. I have Ableton 9 / Max 7. This is the only plugin that I have been able to (almost) use. I'm an acoustic musician and need this for live performances.
I've tried contacting the developer, but since it's a free plugin, seems like he doesn't (understandably) wish to waste his time on it. Looks like I'm on my own. As far as I can understand, it's a very cleverly made plugin, except for this bug. So I thought maybe it's ok to ask here?
Like I said, I know nnnothing. Yet I feel that a more experienced brain would solve this in a minute. Anyone feeling like helping me out?
Thanks for the very clear instructions and all the help! I tried first with the blues, then yellows, then a version with both lines of boxes, just to see if it improves the result (pic from version both, looks correct to me). All versions seemed to improve the situation slightly, giving me a second note at least sometimes, but way more often not. I tried changing note lengths, note attack settings, swapping midi instruments, etc. - no change. But, when literally hammering my mallets in despair I noticed that perhaps it's more a sensitivity issue: with VERY loud instrument-destroying hits I do get repeated notes most of the time. The first-hit notes are very sensitive: it's enough just to place the mallet gently on the key, but to get that same note to repeat I have to become Thor.
Could there be a way to add a command to lower the repeated-note threshold / increase sensitivity to the first-note level? I'm sorry if I'm asking dumb questions - this is all new to me. Your help is much appreciated!

..and yes, you're right: this may not be the most advanced plugin out there. But with my outdated system (can't afford to buy a new computer that'd allow me to update the programs) this is the only one I have been able to get at least some sort of sound from - most plugins today seem to require Live 10-11. I'd pay for a more advanced plugin but have yet to find a compatible one.
I'm on Mac, OS X El Capitan. version 10.11.6. I play a few instuments, but the one I'm expanding into live audio effects resembles a marimba or a wooden xylofon, if that helps to imagine it. A diatonic balafon with rich under- and overtones, so the ability to choose my output notes/scales is a must. All the keys have separate contact mics, so the incoming signal is strong and even.
Wow! That's *way* better than what I've been able to do. Accurate and clean already! I hear that dropped down a coupla octaves and completed with juicy instrument+effect settings... yes yes :) So far I've been able to reliably reproduce a much slower bass line consisting of singular hits with ample time in between - any faster playing causes too much false or unplaying notes, snarls, impurities, you name it. I'm impressed.
Yea, newer Live versions may have all kinds of delicacies, I wouldn't know. My mid 2009 Mac doesn't eat modern.
Just give me some time to make few tests.
I might take few days, it is a bit bussy time for me at the moment.
In the mean time, I would propose another thing to you:
if your pickups were piezos, I would immediately suggest
plugging them into little arduino processor and make all digital
balafon to midi super fast & reliable device.
But that might also be possible with your mics.
The thing is - you allready invested something in connecting that 22 mics
into some sort of preamps, in best case 22 single ones,
mixed together at the end.
One could connect that with 22 wires to arduino, and send
midi notes with velocity out without restrictions in playing
polyphone, fast etc.
If you send me some details about electronics involved,
I could tell you what would be needed.
Hmm. I see what you mean. I wasn't dreaming of polyfony, but planned to adjust my midi playing according to whatever the setup can relatively flawlessly output. Still, piezos are not too expensive. Constructing - that's a sizeable hmm-mm. I should open the box and see what's happening inside. The piezos should be detachable: at times I've flown to gigs carrying only the microfon boxes, attaching the system into a borrowed instrument. Double-sided tape could maybe do the trick, dunno. I'm not sure if this project is too much for me to handle, but if it can improve the results, I'd be silly not to give it a good thought.
Next few infos
you balafon is tuned rather low and few keys are on the border between midi pitches.
that means that it is on edge to be recognised 1/2 tone higher
or lower, which also depends how hard or where you hit.
that is the reason why none of the pitch trackers you tried functioned.
Test with 01-balafon scales.aif showed - to be able to capture high notes
in first place if played soft, one has to set recognition too sensitive,
which ends in wrong an too many notes in lower range.To shorten the report, even single played notes on full scale are troublesome to recognise, no matter which pitch detector is used.
If it would allways be the same balafon, one could compensate a bit.
here is list with mesured frequencies, using needed sensivity for high notes:
you see measured freq and calculated raw note, quantised note
and actual tempered freqency :
freq 192.707 note 54.707 55 G3 195.998
When notes overlap, problem gets worse.
Best result I got so far is working well enough because I blocked all
but notes that your balafon is meant to produce, and compensated
pitches of notes that are too much out of tune.
Proposed plugin will have sensitivity for detection as only prameter.
Receiver side that produces midi will have options for velocity scaling,
note length, transpose ...
One could create so many toys, like
reserve ony few keys and play 2 oct lower sustaining notes,ignoring others.
Assign ostinato to a single key, and cycle through notes with each hit.
If no input for set time, pattern resets to beginning...
Or assign a chord to few keys
And many other ideas, more if you could use some sort of pedal
to hold notes, switch between presets etc ....
Quit some years ago I made malets with sensors and switches to trigger stuff and also turn functions on/off for marimba player
But not everyone is used to get wired ....
Fantastic. Can't wait to try it out! This week is hectic: traveling out of town and several deadlines, so it may take a while - if I were at home town, I'd dive into it right now - but I'll report all the details once I've had a chance to give it a go.
Thanks a - no: two millions!
take your time.
I forgot to mention that as long your balafon is not retuned,
adjust Shift freq to 0.20

Yes! Finally back. It is giving a signal - yay! Clean, no false notes. None. Wow. What a huge improvement to what I had!
Toggling with different settings, I notice that the threshold is best kept at its lowest value. Note length is a wonderful option to have. I especially enjoy sustained notes a lot, as those bring a change to the balafon sound, and produce a great contrast as a looped background for short and sharp "normal" notes.
The plugin doesn't mistake any notes. But, as expected, if I play fast, decorative melodies, it will leave some short notes out. You learn quickly to adapt your playing style. How I hit the key matters, also the weight and hardness of the mallets, to some extent.
I'm still experimenting, having fun with different sounds, learning what sounds, effects and settings work the best. Mixing audio and midi output in solo sequences gives interesting results. There's so much to experiment with. Many open doors.
Simply put: it's awesome. The clean notes, no rumbles, no weird glitches here and there... Just a lovely, clean signal. I don't know how to thank you enough!
EDIT: A question: Is there a way to lower the sensitivity threshold even more, or will it produce unwanted disturbance? I sometimes have to play really, really softly, when I wish to eliminate the acoustic sound as much as possible, in a small space in front of an audience. I tried to take a look at what's happening inside, to see if I can learn to understand anything, but couldn't open the in-part of the plugin. My M4L is version 7, may be because of that.
I am glad you finally have something to play with.
I can upload plugins again with whatever changes you wish.
Don't know if you can edit max patches without live ?
I will post max patches and 2 needed 3rd party externals as separate folder.
pitch detector is my favorite: vb.pitch made by Volker Böhm,
and retrigger onset detction is smc-ines.
I had to freeze the plugin in order to bundle extrnals.
Maybe that is why you could not edit it.
Is there anything else beside lower threshold ?
To explain it better, I have set low limit based on your recorded files
so that it never triggered false, giving priority to last solid hit note.
Lower you set it will let rests of allready sustaining notes cause
problems to pitch detector, and so output wrong notes.
----
Please give me some time to edit this, I am not
using live at all, and have to run this old version
on old macbook which I have at remote place...
in the meantime, if there are any other small changes you wish,
let me know.
-------
Now that you hopefully have some time, look inside that terribly big box for what it does, to see if this mics have individual pramps, which one could use to go a step further, and make balafon Pad - without pitch detection,
same as one would do with Piezos.
Which could give you speed and polyphonic freedom.
Sounds fan-tastic! And yes, I understood these settings and range to be optimal for the most flawless results in normal style playing. Still, occasionally, for a specific scene or track, you may benefit from being able to set the values even lower or higher. A lot depends on the instrument and effects you're using, piece in question (lullaby or mazurka), and performing space. So yes, it'd be excellent to sometimes be able to set the sensitivity threshold even lower. The risk of false notes can be avoided by testing enough the melody you intend to play. Secondly, for certain slow accompaniments/sounds, possibility to input even larger note length values could prove handy. If possible. Other than those tweaks I can't think of anything, it's beautiful work.
And yes. I will take a peek inside the box next week. I will detach the microfons for tuning. At the same time I can open the mystery chest - hoping to find a row of preamps inside :)
here are new files.
threshold can be set as low as 0.005
midi note length 10000 ms
-----
Patches and externals in separate folder.
-----
You have to test if so low threshold makes sense.
I addition, we have onset detector that resets change
in detected frequency path to allow retriggering of same note.
That one remained at it's threshold as in initial plugin version.
It could be that it is not passing repeated notes
played very soft.
Maybe we could adjust that also a bit to follow general threshold level.
please test and report.
I have expected this topic to play a role, because at beginning you mentioned to want to use
live sounding instrument and transpose it's midi notes,
which now forces you to play it as soft to hide original pitch.
That is not really good option.
I would rather build all electric instrument with silent pads,
piezo pickups and usb interface.
just as a drumpad.
but thin, very light and maybe even in form of a rollable carpet ...
electronics cost (material ) would not exceed 50 euros including piezos.
After some testing! Oh yes, it's definitely cool to be able to adjust the threshold. It helps a LOT. I do play more softly when the audio effects are in use, and especially quietly when the overall volume of the piece descends. But it is not because of the difference in pitches, it's because we're dealing with an acoustic instrument with, inevitably, a loud-ish acoustic sound. If I wish to apply effects so much that the original sound nearly or completely disappears, I have to play softly, the smaller the space the more so. On large outdoor stages and with a noisy band the problem disappears, but in an indoor space the acoustic sound may disturb the illusion you're trying to create.
As mentioned, I'm preparing for an audition. I added this plugin into one scene, to produce a live bass line on top of a live loop and singing. It's a thoughtful, melancholy song, so I will need to play the part softly. Value 0.05 feels good, as the line is simple and quite slow. lengthen
The really low thresholds do start producing repeated hits, as the plugin mistakes the ongoing sound as a second hit. Then you just rise the threshold until the non-intended repeated hits disappear. And yes, inevitably, too low thresholds start producing rumbles and snarls, if there's too many hits in too short a time. Then you just adjust the settings to suit whatever you're aiming for.
The possibility to lengthen notes is excellent as well: it comes handy in sequences, where you need sustained melodies, like a violin melody or smtng. Some midi instrument sounds also allow you to lengthen and shorten single note durations, so adjusting both the plugin and instrument note lengths gives you more possibilities.
I'm interested in the piezo option, at least to see what, and IF, something can be done. But maybe not so much as a separate instrument: the idea of the balo project is to see how far one can go with this kind of ancient, traditional acoustic instrument, with all its quirks and limitations. Compromises are inevitable, for sure - but the point is namely to observe what can and what cannot be done. Run until you hit the wall, so to say :)
If you want to stick with acoustic instruments only,
then benefit from adding piezos will not be 100 %.
there would still be some crosstalk, depending on how isolated
the plates are from each other.
Gluing piezos and cables could affect the sound.
One still hears original sound - no benefit for transposing.
Move from pitch detection to only attack detection, with
assigned pitches would be a benefit in terms of speed,
polyphony etc, but if you could get that 22 mics separated into a little processor, it might also work for that purpose to some extent.
But needed electronic will be more complicated compared to piezos.
I know nothing about that mics, but think that they can not be very sensitive, otherwise they would distort when placed so close
and have crosstalk.
Maybe small dynamic mics, who knows.
I also used little earplug headphones as trigger pickups for drums,
in first place toms and percussion with heads because one could not
stick piezo on without affecting sound.
even as mics for amplification they sounded quite acceptable.
but the cost was less than 5 € per mic including preamp...
Anyway, if you are willing to get into any of that, let me know what...
Rrrrright - have to say I didn't understand all the technical details there, and what they would mean in practice, in terms of sound and complexity of construction.
But what I can do is take a look inside the mic box next week. At least to see what there is. I tried to find info about these mics, but the manufacturer's website only says "contact mics". My belief is that they are small dynamic mics. The putty, that is used to attach them to each key, helps to isolate them from neighboring mics. The volume for each mic can be adjusted separately, and then the mics are all connected to get a single output line.
Hi again! It has taken me a while, but I am finally able to begin dismantling the keys - and the mics. I took a couple of photos. I'm not sure if they show enough - the box is sealed, you can only open it at the ends, and I hesitate to start pulling everything out. Let's see first.
This is the 1st box, where all the mics are attached, with both ends opened. This box must be connected to another box, where you have the audio out + power supply (12v) plugs, and volume knob. If needed, I can open that one as well.
So: I would be interested to know if one can somehow connect/construct a, I guess, piezo(?) based sensor system here. Meaning I/0, signal/no-signal detection, and then connect each key to a specified note. That would send a clear midi signal, and allow polyphony - if I got the basic idea right? Do I make any sense?
Anyway, in the meantime I published two of my audition songs on FB and YT. One of them, the short one, has a simple midi baseline in the end, executed with this plugin. That's the second song in this list, Kuikka: https://www.youtube.com/watch?v=cLTQRbdkaVI&list=PLE3HrQZA86uQI6X4bbTzjtQ8iUo-aL4b7



Ok! I will send them an email and ask. Let's see what they say!
This is the answer I received:
"You're not going to be able to trigger midi sounds with the system. The sound is too acoustic and the output is global for all keys. You can do that with drum triggers for example. There are systems with piezo sensors that you stick on the key and trigger midi sounds with a specific converter. Then you can trigger a sound with a single key."
Would this refer to the arduino system that you mentioned earlier?
I sort of expected such answer > typical french,
you ask one thing - they answer the other, because
they don't want to answer the question.
Question was about mics - if they have individual premps,
from which one could feed 22 wires to microcontroller,
taking care that amplification remains intact.
And if they are condenser - means need to be powered or
or dynmic, or anything else.
You can forward my comment to them if you want,
and ask again.
-------
I don't know what to suggest ....
that 22 mics would have been ideal because they are allredy there,
there is plenty of space in that too big enclosure.
Sure you could stick 22 piezos, wire them and so on,
but why double pickup system ?
-------
Do you have anyone that can do some soldering or electronic work
for you ?
If you don't get proper answer about the mics and premps etc,
someone would have to take a look, measure the voltages, see what kind of electronic is inside etc.
Then I could tell you what is possible.
-----
I can provide all needed for a piezo system, including schematics, code for arduino , max etc.
if you decide to go that way.
In fact , I have all material at hand to build such system....
--------
Another thing - the way that mics are mounted - and isolated :
I am sure that acoustic sound of balafon is quite close to piezo sound,
ambient sound, buzz from calabashe etc - must be minimal.
Ok: I will ask them about the individual preamps & condenser/dynamic for a second time. The system does need a power supply (12v), but I guess that alone doesn't answer the condenser/dynamic question.
And yes, it'd make much more sense, if one could construct a system that took advantage of this existing one. Building a double system sounds way more complicated, so before starting to hunt for electricians and soldering gear, I'll double check the existing technique once more. Hoping for a more detailed answer!
Btw I have once tried piezo sound with a single key. The sound was clear but very harsh, "in your face". These have at least some "air in between". Not much, though, you're right there: they don't capture a lot of buzz, very little, but still give a more pleasant sound for an acoustic instrument than pure piezos.
And thanks :)
here is recorded xylo bar with a piezo, hit by pencil with some rubber
arround it.
had nothing better at hand.
piezo element is 20 cents worth 27 mm type
Sounds pretty decent, actually! When I got these mics 3 years ago, I was after the best and most acoustic-like sound possible, so that I would be better heard in loud band setups and still sound 'natural'. There the mics serve their purpose beautifully. I started learning about live audio effects afterwards. Before I had no idea that something like that could ever be possible with an instrument like this.
Sent the question about the mics, now waiting to see what they say!
...and the answer is: "Microphones are condenser and need power to operate. Each mic has an individual preamp, but you won't be able to pick up those signals easily, you'd have to go into the system electronics to adapt it..." Hmm. Dunno exactly what that means in practice.
I am sure decent piezo per plate and few small mics to mix in
a bit of ambient sound would beat that monster box.
The trouble for many musicians is lack of knowledge in electronics,
which opens the door for too expencive and more or less working solutions, no matter if it comes to amplification,
control of audio equipment etc
piezo system with 32 elements, incuding inividual preamps, few condenser mics and usb midi output , would cost about 100 EUR in material.
Same would apply to small dynamic mics extracted from headphones ...
or small condenser mics, there are unidirectional types arround,
which can be easily modified to handle even more air pressure
than close miking on balafone.
but back to your problem...
in best case you have 22 preamps inside from which one could simply wire into few components, in minimum 1 diode, resistor and small cap, to create primitive envelope follower.
If on the other hand that mics pass through individual trim pot
(to adjust level a bit)
and then get joined in 8 mics per wire, and then amplified, it would mean
one would have to insert 1 fet or npn transistor before they get sub mixed.
same would apply if mics have individual pramps, but level is not enough
(maybe amplification to line level is common in that 2nd box)
At the end one arduino and few analog multiplexers will read the mic levels, detect transients and produce note-velocities.
Just saw your post ...
in practise that means that mics are probably cheap unidirectional
condenser mics that need few volts to operate, and if they have individual preamps
it only depends how high the level is to either grab preamp outputs
or if one needs to add another booster in between.
In best case you woud need to wire preamp outputs before they get mixed
and connect them to simple envelope follower.
here you can see it, one per mic needed

If level is not enough, then

In any case, either you make close and clear photos of electronics inside,
so that I can recognise it,
or you get someone else to look at it and measure levels and voltages
P.S.
I am pretty sure that "special" contact mic is nothing else but similar to
https://www.aliexpress.com/item/4000390259471.html
packed into plastic-rubber housing
I was taking apart many pickups like Schertler "super contact Mic pickup"
and similar over last decades, only to find cheapest material inside.
Yea, that's how it goes: the ones who know sell their knowledge to those who don't.
I'm including a few photos well aware that they don't show enough, mainly to enlighten my problem: the container tube is sealed, no way to open it on the long side, only in the ends. It is very narrow and very long (100cm). I have no idea how they have stuffed everything inside. I'm afraid to pull all the guts out, as I'm not sure if I can re-organize them back in correctly. Things don't seem to slide out too easily - I didn't dare try too well, though. But - there is a way to adjust every microphone's volume with a small screwdriver, see the little holes in series of 7 + 7 + 8 in one of the pics, So there is something corresponding inside: I see the beginning of a green connector board, I don't know if there is more of those inside.
I unscrewed all the screws, and despite being careful, I'm a bit worried that something may have moved. If I don't screw them back right, maybe the volume adjusting or smtng starts to malfunction. It's just impossible to see what the tiny screws need to be screwed back into, I mean, what's the corresponding bit inside. I do wish I had someone with more tech experience by my side here, sorry for the incomplete pic info!





Right. Found a way to see the corresponding screw holes inside, so I believe I know now how to screw them back in correctly,. I dared to detach a few more mic lids and rummage around a bit more: all the volume adjustment screws seem to be located in the same green controller board, guessing it must be about 30cm long, or maybe even the length of the entire tube. After the beginning, the board seems to be covered with a protective slice of white paper (?).
I know, I should unclip all the mics and try to negotiate the green board out, but the output plug (the one having green, pink, yellow and black wires going to it) is blocking the way and attached (soldered?) so tightly that I can't see how to detach it without damage.
Anyway, all this is scary stuff for a tech noob. Need to collect some more courage.

I would say it would be better not to force anyhing, becuse they coud have
applied some glue at that board - enclosure joint, and if you don't know
where to force it out, something could get damaged.
I am geting more and more angry at that guys ...
-----
But even so, if you wanted that mics post preamp, the whole green board
would have to be taken out.
Another option would be to grab mic wires at the connector.
from what I can see, this connector could be used

can you unplug one and see if it has 2 pins / wires.
One could insert a wire there and feed it into extra preamps
for midi conversion.
For any further work, you need someone with electronic skills
to look at it and see if that preamp board and wires to the mic
can get out of the box without damage .
That multipin plug is Vcc and ground + premixed
mic sections.
--------
I am afraid I cant tell you more about it at this point.
Do you have some university or high school with electronic studio
close ?
Usually one finds there one or the other electronic
enthusiast with enough knowledge and skills.
I count two pins inside, see pic.
Yeah, I've been thinking of music technology students as well. I don't know anyone from that department. But if things get too complicated, I will have to find someone. So far, I don't think I have dismantled anything that I can't re-attach correctly. Btw the green board is not glued, it is attached with four tiny screws - but I'd have to detach all the mics, and there's the output socket blocking the way.

here is what I would suggest in case it is difficult to grab preamp outputs

Maybe the drawing can help you explain the situation to possible helper.
In any case, you need to take everything out of the box,
and I would suggest that you insert a plug between that 6 pin xlr and the board,
so that it is easy to mount - unmount everything
even small pin headers would do

P.S. forgot to say that probably only 1 preamp per 8 mic multiplexer would be enough, one would cycle through mics and amplify / env follow at multiplexer output. Would reduce part list a lot, but it would have to be tested first, to make sure original preamps keep operating noise free.
Super - these will help immensely! Already yesterday I contacted the music uni's technology department via a teacher I know, but didn't receive an answer yet. Music technology student would be preferable, because I might be able to necotiate an ECTS point payment for them - that'd be awesome - and they'd probably be able to give me some audio effect tips as well. But as the summer holidays are close, I may have to wait until fall before I know if getting help this way is possible.
Anyway, huge thanks for all the help! It's been fantastic- I'm now aware of possibilities I never knew were within my reach. That's truly valuable. Eye-opening. Can't thank you enough. If - or when! - there are interesting developments or updates, I'll drop a msg here. For now: bestest of summer :)
You a welcome, I am allways glad to help performing artists.
I anyway have a similar project coming soon for someone with a vibraphone which will give me a chance to do some tests that could be
valuable for you too.
I will post some infos here.
All the best ....
And - I would clean a bit this long conversation, remove
my non important replies etc, if you don't mind
Vibraphone! Oh yes! Lots of similar challenges, and also different ones: the buzz gets replaced by a vibrato, note values may be less "bouncy" but then there's the sustain to deal with. Super interesting :)
And yea, clean away. I'll check and do the same!
well this one will be a bit different, I don't have to do anything with amplifiction, but midification.
this is the idea:
malets will have knock sensors and a strong alnico magnet installed,
hall sensors will be placed under the plates, close to the surface,
but not touching, to avoid any dumping of the sound.
so whenever a malet is close to any plate,
hall senors will react to magntic field, and so it is known which plates will get hit in advance, knock sensor will only report strength of hit - velocity.
difficulty here are not the bars and sensors, but mallets, they have to get handle that ensures proper direction of built - in magnet,
or i have to place several magnets in the ball...
we'll see how it goes.
Never thought of sensors in the mallets. Wow. Fascinating idea!
Btw, talking about dumping: you actually can , if you wish, attach some light stuff to the keys without it affecting the sound, as long as the thing doesn't prevent the key from vibrating, but rather vibrates along with it. Like tape markings, which is what some of my students do. Or, even better: the microphones in my balafon. They are attached with an adhesive putty on the ends of the keys, where the key does vibrate just like in the middle section. If you touch and keep your finger there, you will dump the note. But as the microphones are attached tightly to the key and not to the frame, and as they move unhindered with the key, they have no effect on the acoustic sound.
a bit of tape might be ok, but here it is a sensor
with a cable, even that all is small and light, there is
no benefit of gluing that to bars.
In addition, vibraphone bars are pretty preciselly leveled,
which allows for a single aluminium profile to get placed under
the keys and host sensors and cables.
but we talk here about 10 mm max square profile,
not that monster you have under the balafone...