MIDI Note|Pitch|CC Extractors, Filters and Creators

Until our dedicated user library is in place you can post examples and modules here

Moderators: electrogear, exonerate

MIDI Note|Pitch|CC Extractors, Filters and Creators

Postby NothanUmber on Thu Jun 09, 2005 7:08 pm

<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
Last edited by NothanUmber on Sun Jun 12, 2005 10:05 am, edited 2 times in total.
NothanUmber
essemilian
 
Posts: 383
Joined: Mon Jan 03, 2005 4:53 pm

Postby unkargherth on Thu Jun 09, 2005 8:50 pm

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
User avatar
unkargherth
smanatic
 
Posts: 605
Joined: Fri Apr 08, 2005 8:46 pm

Postby NothanUmber on Thu Jun 09, 2005 9:01 pm

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...)
Last edited by NothanUmber on Thu Jun 09, 2005 9:03 pm, edited 1 time in total.
NothanUmber
essemilian
 
Posts: 383
Joined: Mon Jan 03, 2005 4:53 pm

Postby NothanUmber on Thu Jun 09, 2005 9:08 pm

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
essemilian
 
Posts: 383
Joined: Mon Jan 03, 2005 4:53 pm

Postby NothanUmber on Thu Jun 09, 2005 9:16 pm

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
essemilian
 
Posts: 383
Joined: Mon Jan 03, 2005 4:53 pm

Postby NothanUmber on Thu Jun 09, 2005 9:35 pm

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
essemilian
 
Posts: 383
Joined: Mon Jan 03, 2005 4:53 pm

Postby NothanUmber on Thu Jun 09, 2005 10:41 pm

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...)
NothanUmber
essemilian
 
Posts: 383
Joined: Mon Jan 03, 2005 4:53 pm

Postby unkargherth on Fri Jun 10, 2005 12:03 am

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....
User avatar
unkargherth
smanatic
 
Posts: 605
Joined: Fri Apr 08, 2005 8:46 pm

Postby NothanUmber on Fri Jun 10, 2005 9:49 am

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
NothanUmber
essemilian
 
Posts: 383
Joined: Mon Jan 03, 2005 4:53 pm

Postby unkargherth on Fri Jun 10, 2005 11:21 am

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
User avatar
unkargherth
smanatic
 
Posts: 605
Joined: Fri Apr 08, 2005 8:46 pm

Postby NothanUmber on Fri Jun 10, 2005 11:30 am

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:
http://www.synthmaker.com/forum/viewtopic.php?t=362 (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
NothanUmber
essemilian
 
Posts: 383
Joined: Mon Jan 03, 2005 4:53 pm

Postby unkargherth on Fri Jun 10, 2005 12:12 pm

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
User avatar
unkargherth
smanatic
 
Posts: 605
Joined: Fri Apr 08, 2005 8:46 pm

Postby NothanUmber on Fri Jun 10, 2005 1:48 pm

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
NothanUmber
essemilian
 
Posts: 383
Joined: Mon Jan 03, 2005 4:53 pm

Postby unkargherth on Fri Jun 10, 2005 2:59 pm

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.
User avatar
unkargherth
smanatic
 
Posts: 605
Joined: Fri Apr 08, 2005 8:46 pm

Postby NothanUmber on Fri Jun 10, 2005 3:11 pm

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...
NothanUmber
essemilian
 
Posts: 383
Joined: Mon Jan 03, 2005 4:53 pm

Next

Return to Examples

Who is online

Users browsing this forum: No registered users and 0 guests