Hi.
I am working on the project where I need to transpose a sound file to MIDI and adc~ input(piezo) to detect a hit and from that play the currently active note. Like you have a MIDI track running silently and you make the note sound when you hit a trigger.
I have been successful with the transposing part using fiddle~ and could make a trigger with bonk~ but I am not able to find a way to switch the notes on/off. So far the notes are played as soon they are arriving from makenote~.
So how to put a switch between makenote~ and noteout~?
If I could get an advise for detecting piezo peacks as well. Piezo is a bit tricky device. It rings like a bell when hit and some kind of accumulative value to make a trigger would be ideal.
-
How to control when MIDI notes are sent?
-
@vanakaru Hello, you can hold (the last note, it will be being updated all the time from your track) and play it with a bang like this....... although you might need to work around the velocity (or abandon it depending on the synth sound)........
What sort of data values are you getting from the piezzo into Pd, and for what time period, and is it just a bang that you are looking for or some number as well?
switch_note.pd
David. -
Thanks. I am learning by doing.
However this method tends to send vel 0 most of the times - noteOFF(test works OK though). I think it receives notes from fiddle~ with velocity 0-127 and at the time of bang it may be at 0 more often than not.
I tried [makenote 127 500] as well hoping that the note number would change only and will be sent at vel127 duration 500ms, but it seems that vel/time from fiddle~ can not be ignored.As for piezo trigger I need just a single bang. The difficulty is that after a hit piezo will ring some time(about 1 sec) and rather wildly at first and slowly fades out. However the ringing is very jumpy that makes gating difficult. The only solution I can think of to accumulate the peaks at interval of lets say 100ms and ignore the rest.
-
@vanakaru If you don't need a note off (piano sound for example) you could ignore it....... or........
switch_note3.pd
will set a length for the notes you are playing........ fixed......... or controlled by some other means......
David.
-
OK, first part is working.
Now for the bonk~BTW I find sometimes easier to send AllNotesOff CC message 120 or 123 than noteon with vel 0. Specially when you are triggering notes in rapid order(the way I like to with my interactive installations). Even if I use noteOff I put this AllNotesOff in 1sec interval in case some notes get hung.
-
Here, I got it.
You can run an audio track and play MIDI synth along with it by tapping a mic(or drum trigger in my case).
It will be used in dance performance where flamenco dancer plays music by clogging the floor.
It needs some tweaking of sensing parameters though
I am pretty happy with my first real PD project. Thanks, David!