PD Users - Help Build a Free X-Platform Pitch to Midi Tool?

Discuss music production with Ableton Live.
Post Reply
Kodama
Posts: 1949
Joined: Mon Jun 28, 2004 3:07 am
Location: PDX

PD Users - Help Build a Free X-Platform Pitch to Midi Tool?

Post by Kodama » Mon Oct 22, 2007 12:57 am

(For those who don't know, PD (puredata.info) is the free graphical musical development program created by the guy who made Max)

I've been toying with pitch to midi stuff to be able to simply sing some monophonic tones to compose with in Live.

Widi just seems all over the place, no matter how much I pretreat it with compressors, gates, EQ, etc... and the demo is very restrictive, so hard to test with.

I tried Conny's set up in Bidule, but had little success before the Bidule demo died and I don't know how long it will be until it is brought back. Also - it seems like Plogue will be removing many of the features from Bidule in future versions unless you pay for a "Pro" version.

So, I researched PD and Fiddle~ , which is a component that tracks pitch.

There was very little info I could find on the interwebs about Fiddle~ and most people seemed to just be using it as a gimmick, to kind of make weird notes around whatever they were playing.

You have to set up PD with a virtual midi connection to a Live midi track/instrument (IAC on the Mac, Midi Yoke on PC).

You can then either directly input your audio into PD, or use Live's effects to gate, compress and set the audio to the preferred level so that your audio is easiest to analyze and convert by Fiddle~.

If you use the second method, you will have to route audio from Live via a virtual audio connection (Sound Flower on Mac, Jack on Mac or Win, Virtual Audio Cable on Win).

The easiest way to play with Fiddle~ is to download the Extended version of PD (includes most of the add ons) and go to the help menu > Browser > Reference > help-fiddle~.pd.

This opens a help file that explains (a little) about fiddle~ and has an example using a generated tone (test input pitch).

You have to go to PD's prefs to setup the Audio and midi settings and then make some changes to the help file to get some results...

If you enter edit mode (command or control e), disconnect the test tone and make and adc~ 3 object, (which is an audio input, 3 being the output channel I am using from an Audio track in Live that is going directly to an eternal output, since Live's mains are 1 and 2) and connect it to the top left connection on Fiddle~, you should see some numbers on some of the output objects in the file changing to respond to any input audio.

To get notes out of Fiddle~, you have to connect a makenote object, that has an input for pitch/velocity/pitchbend (I think), then connect a noteout to the makenote to tell PD to send out the midi notes to the virtual midi connection.

This is where things get interesting, but way over my head.

Fiddle~ seems to actually do a good and quick job of tracking notes, but....

There is one output type (3rd from the left bottom) that constantly outputs at least 43 notes a second in whatever pitch you put in.

The other output (1st on bottom left) puts out one short 'blip' at the attack of each new note.

If there was a way to make the 2nd output type send a constant note as long as an audio gate was active for the "gate" time of the current note and send the first output type to optionally constantly adjust pitchbend, I think we would be getting somewhere.

I think if this was implemented, that PD with Fiddle~ could make a useful crossplatform tool for free with no overhead.

I've tried to research this and I'm a novice at PD at best. It's surprising how little information there is about these tools on the internet.

Is anyone interested in looking into this as a free/cross platform audio to midi solution?

I could send you my PD file and help you get as far as I have at least.
GO VEGAN!!! - Macbook Air, Bass Station II, Some Korg shit, Live Suite, U-He, Audio Damage, Microtonic, Ohmicide, more soft stuffs, awesome controllers, euro rack modular synth,an awesome cat.

bgc
Posts: 191
Joined: Tue Sep 05, 2006 5:05 am
Location: Pittsburgh, PA

Post by bgc » Mon Oct 22, 2007 2:51 am

I don't know much but am interested in checking this out. I'm just kind of getting into Pd and the Cycling 74' stuff. PM me with some information if you want.

bgc
Posts: 191
Joined: Tue Sep 05, 2006 5:05 am
Location: Pittsburgh, PA

Post by bgc » Mon Oct 22, 2007 2:53 am

And yes, Pd is hard, or at least I think so. I think just getting into the Cycling stuff is worth it for the documentation alone, which is pretty applicable to Pd.

ryansupak
Posts: 429
Joined: Wed Aug 18, 2004 7:23 pm

Post by ryansupak » Mon Oct 22, 2007 4:24 am

documentation for PD is much better than it used to be -- especially where PD-Extended is concerned. Might be able to save a couple bucks...

$0.02
rs

Kodama
Posts: 1949
Joined: Mon Jun 28, 2004 3:07 am
Location: PDX

Post by Kodama » Mon Oct 22, 2007 4:55 am

And Max/Msp is still major bucks. Although many of us may purchase it soon (based on whatever happens w/Ableton), it's yet another major expense and one that's out of reach for many.

The only thing with PD is that I would expect a more vibrant community and more info out there.
GO VEGAN!!! - Macbook Air, Bass Station II, Some Korg shit, Live Suite, U-He, Audio Damage, Microtonic, Ohmicide, more soft stuffs, awesome controllers, euro rack modular synth,an awesome cat.

Kodama
Posts: 1949
Joined: Mon Jun 28, 2004 3:07 am
Location: PDX

Post by Kodama » Mon Oct 22, 2007 5:01 am

I'm guessing that if you took the first left output and connected it to some continous pitch thing and so that you get new tones on each "bang", then gate that signal with the output an audio gate connected to the original signal, then sent that to the makenote>noteout thing, you would be close? Then connect the third output to the pitchbend of the makenote...

I just don't know the actual objects & connections to make this happen...
GO VEGAN!!! - Macbook Air, Bass Station II, Some Korg shit, Live Suite, U-He, Audio Damage, Microtonic, Ohmicide, more soft stuffs, awesome controllers, euro rack modular synth,an awesome cat.

Clearscreen
Posts: 1743
Joined: Sun Jul 11, 2004 5:07 am
Location: Melbourne AU
Contact:

Post by Clearscreen » Wed Oct 24, 2007 1:35 am

just found this : http://crca.ucsd.edu/~jsarlo/pdvst/
it lets you run PD as a vst apparently. haven't tried it out yet but it *sounds* promising... may be able to do away with running jack etc to get the joys of PD with live. i think it's PC only though....
Hp Elitebook 2.8Ghz. Live 7.0.14 & Live 8.1.5, XP Pro. and stuff...

rbmonosylabik
Posts: 2659
Joined: Thu Mar 09, 2006 7:27 am

Post by rbmonosylabik » Wed Oct 24, 2007 2:36 am

I'm not sure where I got this, but it's the documentation for fiddle~ and bonk~:

http://download.yousendit.com/62C9D9876EBE0206

Seems like fiddle~ doesn't output note duration, and I haven't really dug into bonk~, but maybe a combination of both should do the trick, or fiddle~ along with some kind of gate/envelope follower.
Image

MBP 2.3 GHz i5, Live 9.6.1, Push, MPD32, Rane SL2

Kodama
Posts: 1949
Joined: Mon Jun 28, 2004 3:07 am
Location: PDX

Post by Kodama » Wed Oct 24, 2007 7:14 am

Ya I was thinking of using moses (which can act as a gate) with an envgen to get an envelope signal off of the input signal and then use that to attenuate whatever signal I could get out of fiddle.

The only thing is that envelopes can only carve away at signals, so we need some way for the first output of fiddle to just change the frequency of a constant signal, which can then be attenuated by our moses>envgen devices?

It seems like there should be a fairly simple fix, but I'm so new to PD and I'm sure we all can't spend months learning every obscure, barely documented object type.
GO VEGAN!!! - Macbook Air, Bass Station II, Some Korg shit, Live Suite, U-He, Audio Damage, Microtonic, Ohmicide, more soft stuffs, awesome controllers, euro rack modular synth,an awesome cat.

Kodama
Posts: 1949
Joined: Mon Jun 28, 2004 3:07 am
Location: PDX

Post by Kodama » Wed Oct 24, 2007 8:46 pm

Btw - I just saw this link to the PD wiki:

http://wiki.puredata.info

I've been toying a little more, and even when you give makenote a duration, it seems to send funky notes to Live, like they always begin on 1 no matter when they are recorded?

I'm guessing we need to play with the note on and note off messages created.
GO VEGAN!!! - Macbook Air, Bass Station II, Some Korg shit, Live Suite, U-He, Audio Damage, Microtonic, Ohmicide, more soft stuffs, awesome controllers, euro rack modular synth,an awesome cat.

chapelier fou
Posts: 6029
Joined: Mon May 15, 2006 12:15 pm

Post by chapelier fou » Thu Oct 25, 2007 7:15 am

MacBook Pro 13" Retina i7 2.8 GHz OS 10.13, L10.0.1, M4L.
MacStudio M1Max 32Go OS 12.3.1

rbmonosylabik
Posts: 2659
Joined: Thu Mar 09, 2006 7:27 am

Post by rbmonosylabik » Thu Oct 25, 2007 1:52 pm

Fiddle in the middle is a simple patch that sends a fixed length note (250 ms long as shown in the makenote object). What the OP needs is a more complicated patch that detects when the note stops so fiddle can have variable length notes.

Here's the modded fiddle in the middle I made. It still sends fixed note length, but when sending it to a mono synth with glide on and a 1s release or so, it works alright.

Image
Image

MBP 2.3 GHz i5, Live 9.6.1, Push, MPD32, Rane SL2

Kodama
Posts: 1949
Joined: Mon Jun 28, 2004 3:07 am
Location: PDX

Post by Kodama » Thu Oct 25, 2007 5:01 pm

Yeah, we need to find a way to make noteon then noteoff from audio levels....
GO VEGAN!!! - Macbook Air, Bass Station II, Some Korg shit, Live Suite, U-He, Audio Damage, Microtonic, Ohmicide, more soft stuffs, awesome controllers, euro rack modular synth,an awesome cat.

Clearscreen
Posts: 1743
Joined: Sun Jul 11, 2004 5:07 am
Location: Melbourne AU
Contact:

Post by Clearscreen » Thu Oct 25, 2007 11:50 pm

came across this thread at the reaktor forum:
http://www.native-instruments.com/forum ... hlight=fft
which basically says if you're using fft watch out for the introduced latency. apparently the latency equates to the resoultion divided by the sampling rate, meaning a 512 fft resolution at 44.1khz sampling rate results in 512/44.1 = 11.61ms of latency - which probably would be noticeable....

it's possible that due to nyquist stuff the formula may actually be 2*resolution/sampling rate, which would make our 512 res fft would give 1,024/44.1 = 23.22ms!!!!! definietly noticeable!!!!

so it seems smaller fft res. and higher sampling rates are your friends here :D

i'm not 100% sure about this stuff so if anyone has any further info on this i'd be happy to be corrected :D
Hp Elitebook 2.8Ghz. Live 7.0.14 & Live 8.1.5, XP Pro. and stuff...

Kodama
Posts: 1949
Joined: Mon Jun 28, 2004 3:07 am
Location: PDX

Post by Kodama » Fri Oct 26, 2007 3:59 am

Interesting!

Still having issues determining note on and off messages at the moment....
GO VEGAN!!! - Macbook Air, Bass Station II, Some Korg shit, Live Suite, U-He, Audio Damage, Microtonic, Ohmicide, more soft stuffs, awesome controllers, euro rack modular synth,an awesome cat.

Post Reply