SynthMaker

MIDI Note|Pitch|CC Extractors, Filters and Creators

Archive · 2005 24 old posts

From the original SynthMaker forum (2004–2014), with its members’ names and dates.

NothanUmber ·

<edit: If you're looking for the midi components go to page 2>

Hi,

I'm not sure if that is really a bug or if I simply don't understand how to use the MIDI Split component. I tried to build a note extractor and a cc filter that should theoretically work in my understanding but do practically nothing. If one looks at the debug outputs that are connected to the split components inside the two modules these don't seem to do anything... (tested with SM 0.9.3w). Would be glad if someone could have a short look at this.

Schematic: http://home.in.tum.de/~strixner/NoteExtractor.osm

Greetings, NothanUmber

unkargherth ·

Replace all strings and text boxes by integers where posible. There's a known bug that precludes automatic conversion sometimes

Also you shouldn't compare wih 8 or 9 for status. The status integer outptus one full byte. So Note On is 114, not 9 and Note Off is 128, not 8. Same for checking for CC, you should compare against 176 (B0), as by now channel is always 0

NothanUmber ·

Thanks for the tip, unfortunately that wasn't (at least the only) reason 🙁 There is still no output measurable from the Split component

Ah, the channel is also part of the status. Will change my numbers! (The initial problem is still there I think...)

NothanUmber ·

Ok, I got it! (Have misinterpreted your advice and replaced all strings with text boxes, don't know what I thought there...) Now everything looks fine

Thanks, NothanUmber

NothanUmber ·

Had a small bug in the note extractor: In order to get the right frequency you'll have to connect the 2 to base and the result from the division as exponent of course...

Greetings, NothanUmber

P.S.: There is also something wrong with the gate. Best thing will be I'll have a look at all these things and post the components here once they're ready.

NothanUmber ·

Ok, bugs removed, everything should be working now as expected. For the case that someone else is also interested in this:

http://home.in.tum.de/~strixner/NoteExtractor2.osm

Greetings, NothanUmber

NothanUmber ·

Now I found that I also need to consider the value of the pitch wheel for the frequency that is calculated by the note extractor:

http://home.in.tum.de/~strixner/NoteExtractor3.osm

skOre: Could you please move this message to a more appropriate forum as all "bugs" (beside the conversion things) inside the initial schematic were my own fault and thus are not Synthmaker bugs?

Greetings, NothanUmber

P.S.: Turn the pitch wheel once in order to initialize the "PBend" component with 8192 (perhaps that should be the standard value in new SM versions...)

unkargherth ·

Nice start !!!!!

Anyway. something to comment

1.- the note gate seems to be a bit unstable in its behaviour 2.- Although nice, at least in theory pitch bend should be treated separatelly from note on/note off messages. In fact, pitch bend sends a pitch change that should affect ALL playing notes 3.- You are asuming that note of is always message 128, while the widely common knowledge ( althou isn't clear to me if it's supported by MIDI spec) says that a message 144 ( note on) with velocity should also be considered as note off 4.-you conversion to frequency is nice if you need it in float form. but if poly form is acceptable. symply connect you midi note id to a pitch 2freq module and that's all 5.- MIDI CC could be simpler if you use the MIDI CC module

PS: not tried but i feel that now we have arrays, should be posible to implement all of this in a much simplier code module

Of course , only opinions....

NothanUmber ·

Hi unkargherth

unk wrote: 1.- the note gate seems to be a bit unstable in its behaviour

Hm, not reproducable here, could you please give me a description how to provoke that behaviour? Is is getting better if you connect the "0" string component to a sample and hold that is triggered by both the "Bool to True" and "Bool to False" trigger outputs? (That was my initial solution but this simpler one seemed to do the same on first glance so perhaps I'll have to revert it back)

unk wrote: 2.- in theory pitch bend should be treated separatelly from note on/note off messages.

I copied the behaviour of the note extractor from bidule (well, it's a combination of "Note Extractor 1" and "Note Extractor 2" and found that it greatly simplified my tasks there - in bidule you simply connect a pre-pitchfilter to the note extractor if you really don't want to have the frequency affected by the pitch bend events. (Such a filter should be easy: Just change the status to 224 (E0) and remove the CC number comparsion part from the CC Filter and a Pitch Bend Filter you have 😉 )

unk wrote: 3.- You are asuming that note of is always message 128, while the widely common knowledge ( althou isn't clear to me if it's supported by MIDI spec) says that a message 144 ( note on) with velocity should also be considered as note off

Good point! My current midi equipment sends "proper" note offs but one should also support the other way, shouldn't be too difficult.

unk wrote: 4.-you conversion to frequency is nice if you need it in float form. but if poly form is acceptable. symply connect you midi note id to a pitch 2freq module and that's all

Nice idea! Is it somehow possible to convert the poly data back to floats? (I need to use the frequency for further calculations so floats are more practical there)

unk wrote: 5.- MIDI CC could be simpler if you use the MIDI CC module

Is it possible to also get the data that doesn't match the criterium? (That's important for me as I manipulate the CC data and mix it back into the main midi stream afterwards so the CCs have to be filtered out, otherwise i'd have both the original and the modified ones what would lead to unexpected behaviour)

unk wrote: not tried but i feel that now we have arrays, should be posible to implement all of this in a much simplier code module

Do you have an idea how to get midi data and float values inside the code component? (One could try to write a new code component with the parser components but that's some effort and I'm a little bit short on time atm. and glad if I manage to get my midi stuff ready...)

Greetings, NothanUmber

unkargherth ·

NothanUmber wrote: Hi unkargherth

unk wrote: 1.- the note gate seems to be a bit unstable in its behaviour

Hm, not reproducable here, could you please give me a description how to provoke that behaviour?

Difficult to say. I only tested for like 5 min. It's more like a feeleing of something wrong on it's timing. Some times get freezed on 1 whent the note off had ocurred. but really needsmore R+D to describe it correctly

NothanUmber wrote: I copied the behaviour of the note extractor from bidule (well, it's a combination of "Note Extractor 1" and "Note Extractor 2" and found that it greatly simplified my tasks there - in bidule you simply connect a pre-pitchfilter to the note extractor if you really don't want to have the frequency affected by the pitch bend events. (Such a filter should be easy: Just change the status to 224 (E0) and remove the CC number comparsion part from the CC Filter and a Pitch Bend Filter you have 😉 )

Well, I'm not sure , what is the point of whole .OSM. Its a Demo of what can be done with MIDI? . It's A basis of something Bigger ?, It's a Final, Self contained MIDI Management Module? Depending on the answer whole things could be done diferently or not. I assumed this will go in some place between MIDI Input and MIDI to poly, or in parallel to MIDI to Poly module. That's where my asveration on pitch bend cames from

NothanUmber wrote: Nice idea! Is it somehow possible to convert the poly data back to floats? (I need to use the frequency for further calculations so floats are more practical there)

Yes, there is. But it seems not parctical to me. Float maths ( in fact all "green" types and conectors) doesn't react well at audio rates. The real question here is: As all Freq inputs through SM come in the form of Poly connectors, what is the need of having it in Floats? IMHO if you need some basic Math on frequency, better build a Code module for it, and forget conversion back into float.

NothanUmber wrote: Is it possible to also get the data that doesn't match the criterium? (That's important for me as I manipulate the CC data and mix it back into the main midi stream afterwards so the CCs have to be filtered out, otherwise i'd have both the original and the modified ones what would lead to unexpected behaviour)

Good point Here. Seems like you're building some kind of midi Filter kernel

No, by now it isn't posible. MIDI to CC it's very simple to use it as a FINAL destination for detecting MIDI CC value changes. Shoudl be easy, for malc and/or jorge. to add a second MIDI out connector fo that. Better Add it to "Ideas and Request" forum

NothanUmber wrote: Do you have an idea how to get midi data and float values inside the code component? (One could try to write a new code component with the parser components but that's some effort and I'm a little bit short on time atm. and glad if I manage to get my midi stuff ready...)

I was thinking basically in note management here. But, unfortunately, we face the problem of array inizializtion, so forget it

Anyway answering your question, same as above. Not practical to convert back White poly values to Green standard ones...

As Requested a couple of times before, We need a GREEN code component to do such kind of things.

Cheers

NothanUmber ·

unk wrote: It's A basis of something Bigger ?

Jupp 🙂 Basically it's yet another try to see whether SM is far enough now to implement an idea I had long before: analyzing midi signals (And this time I have a good feeling that it should be possible now)

Thanks for all your tips, perhaps it's best when I first finish the whole thing then it should be easier to give suggestions where and how to improve things.

Greetings, NothanUmber

unkargherth ·

Mmmh.....very interesting idea.....

Question. You're trying to buil a synth foran stange hardware controller, or you're trying to simulate a hardware controler in a software way ?

Depending on the answer, the whole thing will be totally diferent

NothanUmber ·

unk wrote: Question. You're trying to buil a synth foran stange hardware controller, or you're trying to simulate a hardware controler in a software way ?

Atm. I'm building some midi logics that accomplish the described string tuning algorithm (and some interpolating and quantization parts in order to make things a little bit more easy for beginners). So the goal is a vst module that has two midi ins and two midi outs. I've already built this instrument in hardware and am currently using a bidule version of the midi logics that are connected to a commercial additive synth (Cameleon 5000). Now I want to convert the midi logics to SM in order to be able to use it even without bidule as a vst (and in the hope that the SM version would be a little bit more performant than the current solution - two instances of the synth and the midi logics eat up 60-80% of my cpu time, that's 20% for the midi logics alone... and of course because hacking around in SM is fun 😉 )

Building an optimal synth for the instrument is another interesting step - haven't finally decided how such a synth would have to look like though, perhaps that will come out of itself once I start to feel limited by the boundaries of my current synth. Would also be interesting to have such a freeware synth (and more important few but good and matching presets for it that define a "standard sound" for the instrument) in order to get more people into building such an instrument and join in writing music (or practice material) for it and explore it's possibilities and boundaries. But for that I think it's helpful if I learn the instrument first by myself and provide some music examples (scores and mp3s) once I can halfway play on it so people see that it's worth the effort (or not...) because the learning curve is rather steep but the expressiveness is really cool from what I saw from my first tests 🙂

Greetings, NothanUmber

unkargherth ·

So, if i understood ok. you have some hardware controller that sends midi messages, and you want to manipulate this messages before resending to a "standard architecture synth", true?

Then, my questions:

Which messages sends in your hardware controller?

I supose it sends, quite obviousy, note on/note off, pitchbend, modulation and maybe 2 or 3 midi CC.

Assuming this, IMHO, is better and simpler to build a "dedicated solution". Solve the questions directly Related to THIS project, instead of building a generic midi framework, that could be easily be obsoleted by the upcoming note management system and/or the arrival of more specialized MIDI components.

NothanUmber ·

unk wrote: I supose it sends, quite obviousy, note on/note off, pitchbend, modulation and maybe 2 or 3 midi CC.

Jupp, that's it.

unk wrote: Assuming this, IMHO, is better and simpler to build a "dedicated solution". Solve the questions directly Related to THIS project, instead of building a generic midi framework, that could be easily be obsoleted by the upcoming note management system and/or the arrival of more specialized MIDI components.

That's exactly what I'm doing, the note extractor and the cc filter (as well as the note creator, the note filter etc...) are absolutely essential (at least in my understanding) for that project. It's usefullness beside my own project is only a nice side effect and not initially intended 😉

I'm off for today, will most likely finish that tomorrow...

unkargherth ·

Ok Nothan.

Here come my view of your MIDI control Thingie

Fisrt, i build a Midi cc filter. It receives the raw midi input and if it's a Midi cc Msg and mtaches the specified CC id, it outputs the value. ELSE it leaves message untouched

Then In similar way, I build a MIDI NOTE filter. If it's a noteON /Note off it outputs atrigger. Else it ouputs a second trigger

The rest is self evident. Get the schematic and tell me it it's useful to you

I assumed that ribbon controlers are 12 and 12, but could be anything ( except RPN's/NRPN's). Also, from the description on you other thread, i assumed that velocity for out notes it's set from Breath controller directly (no manipulation of value)

I not tested anithing ( I have no such controller) so ther could be a lot of errors. Anyway. it's only a "proof of concept"

NothanUmber ·

Hi unkargherth,

thanks for your efforts, that's an interesting BSwitchTrig set-up you have there so although the whole schematic does not what I intended (I should have explained myself better...) surely I can use parts of it!

Greetings, NothanUmber

P.S.: If your interested you can have a look at the schematic of my current "original" bidule version: http://home.in.tum.de/~strixner/WindStr ... _04.bidule (the SM version shouldn't need too long though if I didn't introduce too many bugs 😉 )

unkargherth ·

Oh, I'm not trying to build whole thing. I was only trying to give another POV to same thing. I know there's still much things to do in it, but, i thought that a diferent approximation would clarify my point above

NothanUmber ·

thanks for that, much appreciated 🙂

NothanUmber ·

Here's the current state of the project:

crashing recovery

(It's "somewhat" usable (at least if you're willing to adjust your definition of the term "somewhat" to the current level of it's usability... 😉 )

NothanUmber ·

Hi,

took out the midi components from my windstringcontroller so that people don't have to go through half ready code (I'll be away until mid of next week so that state won't change at least util then).

and here's the schematic

Greetings, NothanUmber

skOre ·

wow 🙂

Shifrin ·

Wow indeed, thanks very much for posting these 🙂

Shif.

NothanUmber ·

No problem 🙂

P.S.: There was a "wire-twister" in the note filter of the version I posted before (I already corrected that in the filter that is inside the note extractor but copied one of the bugged exemplars in the other case... that comes from being to lazy to keep attention that everything appropriate is synchronized...)

Wrote something here? To have a post removed or your name hidden, write to [email protected].

Before your first post

A few rules keep this a friendly place. You agree to them once.

Shown next to what you post, here and in the app. It doesn’t have to be your real name: 3–24 lower-case letters, digits or _ (capitals become lower case, spaces become _).

    Then your post goes up straight away.

    Delete this reply?

    Open it in SynthMaker?

    It goes on the track you’re editing there, in place of that track’s sound, and into My sounds. Your other tracks stay as they are.

    Want to keep that track’s sound? Start a new song in SynthMaker first (Song › New song), then open this.

    Report this reply?

    Only the developer reads reports. The person isn’t told who reported them.

    What’s wrong with it?

    Block this person?

    You won’t see their posts and replies here any more. They aren’t told, and you can unblock them at any time.

    People you’ve blocked

    Their posts and replies are hidden from you. Unblock someone to see them again.

    The community rules

    A few rules keep this a friendly place. Everyone agrees to them once, before their first post.