< Back to IRCAM Forum

SDIF to MIDI notes+pitchbend

Hi -

Does anyone know if it’s possible to extract the partials data from an SDIF file and end up with discrete MIDI notes each one with a pitchbend for the varying frequency of the partial? (one note per channel I guess). CHORDSEQ seems to drop that data and ‘quantize’ the pitch.


Hi gph

I don’t know how you are getting to that. One thing sure, is that using as->om starting from a sdif partials file will give you microtones at 1 midicents discrete value.
You should be aware, that when you open your chord-seq, it is by default (see preferences score tab) approximating pitch to 1/2 tone.
You can of course choose in the chord-seq editor the resolution you need.

Please verify the second output of your chord-seq. If all midicents are approximated to 100 ms, this means, it is your analysis file that is already approximated.


Many thanks for the reply, Karim!

I’m ok with the as->om into a chord-seq and getting it to ‘quantize’ to microtones, and to control the level of granularity or ‘snap’ to grid with the approximation settings.

Maybe this is not possible because everything is chopped into discrete frames but I’m keen to try to take partial line from SPEAR/Audiosculpt that visually indicates a pitch that fluctuates up and down and translate those to single notes with their pitch on that line continuously varied with pitch bend.

So let’s say I highlight just 3 ‘wiggling’ partial lines in SPEAR, and delete everything else. I export the SDIF and would like to split that to 3 MIDI notes (on 3 channels) and the ‘wiggling’ up and down in pitch of the partial line for that note gets translated to a continuously changing pitch bend (or changing at the frame rate).

Maybe I’ve misunderstood the mechanism and the framed/sliced approach doesn’t invite this kind of thing(?).

Thanks again Karim.


Sorry Graham,

It’s me that misunderstood. You want a continuous of discrete bend (glissandi like) on each pitch ?? Is this what you want ?
If yes, well since midi is really limited, and this will be on;y possible with a continuous controller to bend each note, i suggest to achieve this with synthesis , like csound for example.


Thanks Karim!

Yes - continuously glissandoing around each pitch.

Excited to try with synthesis also… but how I get the continuous pitch data out of the SDIF rather than sliced discrete frames I’m still not sure. Maybe I need some kind of concatenate+interpolate function. I’ll keep researching - I’m pretty new to OM.

Thanks Karim!


In csound, you have a lot of manners to interpolate between to pitches, instructions.
The trouble with midi/continous data, are:

  1. very complicated.
  2. You will have certainly troubles with note offs/note on, if pitches crosses each others.

When i will have some time will send you an example starting from a multi-seq and csound and put it here in this thread.
[soon!] :slight_smile:

Amazing! Thank you so much Karim

All the best,


Dear Graham,

As promised here is a MWE example for continuous glissandi. I used the excellent OmChroma library which uses Csound synthesis. The principle is to cut down each voice in a chord-seq. You can buil a multi-seq with them. Then use the additive synth ( i know it is really basic, but you can refine it if you need so, timbral and space wise.)
I join here the very basic example as a patch.

add-a1 3.omp (23.2 KB)

Thanks so much Karim!

I’ve hit eval and can have an output and can see what your patch has done. Clever!

Now I need to go through the nested functions and make sure I understand it… :slight_smile:

Thank you.


Thanks for that example, Karim, as usual it’s a very educational one.

GPH: I also had some trouble getting OM to read sdifs accurately. (It might work better if you’re using audiosculpt and the PM engine.) Basically in a series of connected *frames (not sure if that’s the right word, I mean ‘time points represented by a dot’), both as->om and sdif->chordseq would only read the first one.

I rigged up a way to manually get all of the *frames into a seq. It’s a bit complicated, if the diagram isn’t clear I can send you the omp. Read the boxes in the order 1.textfile 2. sdiftext->multiseq 3. mypatch 4. omloop.

For clarity’s sake, you have to edit the textfile a bit first, from SPEAR’s default output, and remove some extra characters.

Hope this helps.

Thanks michalszostalo! I’ll look at how you’ve achieved that. Cheers!