Welcome to %s forums

BrainModular Users Forum

Login Register

MX Midi Scale (user module)

Discussions about add-ons, announcements
Post Reply
23fx23
Member
Posts: 2545
Contact:

Unread post by 23fx23 » 04 May 2015, 18:22

yop

Ive uploded a little user module that allows to make custom scales and save/recall them via Pm for midi flows.
basically user set up a transpose grid matrix and the input midi will be transposed according the matrix on output.
ie: if linear = no change, if note 2 is 3 instead of 2 on receive it will play 3 on output.
also possibility to mute a note via toggeling cell off.
a little border flash indicate wich note is received.
hope can be useful, let me know if bugz.

Image

( compiled for x32 X64 only for now, but if it goes well for others ill upload the code if someone want to compile for osx.)

/add-ons/midi tools

wiki
http://www.sensomusic.org/wiki3/doku.ph ... s:mx_scale

gurulogic
Member
Posts: 1019
Contact:

Unread post by gurulogic » 04 May 2015, 22:24

This looks great! Thanks!

ceasless
Member
Posts: 330
Contact:

Unread post by ceasless » 05 May 2015, 10:11

Hey 23fx23, I plan to compile the Grove today, so feel free to upload the source and I will get the OS X binary compiled and uploaded.

23fx23
Member
Posts: 2545
Contact:

Unread post by 23fx23 » 05 May 2015, 11:55

hi ceasless. ok cool. here is a link to the source codes.

https://drive.google.com/file/d/0B0VUyz ... sp=sharing

23fx23
Member
Posts: 2545
Contact:

Unread post by 23fx23 » 05 May 2015, 12:42

oops i ve just seen that i made a mistake and the visual background displaying notes is wrong. the result is ok however but ill try to fix soon

23fx23
Member
Posts: 2545
Contact:

Unread post by 23fx23 » 05 May 2015, 13:06

sorry for the mess. so ive reuploaded the fixed version it this folder with x32-64 binaries and src code. gonna replace the addon now
https://drive.google.com/folderview?id= ... sp=sharing

User avatar
nay-seven
Site Admin
Posts: 5684
Location: rennes France
Contact:

Unread post by nay-seven » 05 May 2015, 13:39

great one, it 's monophonic ?

23fx23
Member
Posts: 2545
Contact:

Unread post by 23fx23 » 05 May 2015, 14:18

it's supposed to be polyphonic to i reckon i haven't deeply tested in poly.

edit: check back right, re oops display works fine in poly but out is mono. damned i need to check better^^ will correct this..

..but i can't understand what is wrong with the code, should work poly to me :/
anybody knows if this can work with callback, no need to use process right?

Code: Select all

if (sizeMidiIn > 0)
			{
				sdkCopyEvt(midiIn, midiOut);


				for &#40;int i = 0; i < sizeMidiIn; i++&#41;
				&#123;
					UsineMidiCode code = sdkGetEvtArrayMidi&#40;midiOut, i&#41;;

					if &#40;code.Msg == MIDI_NOTEON || code.Msg == MIDI_NOTEOFF&#41;
					&#123;
						int actualnote = code.Data1;
						int idnote12 = floor&#40;fmodf&#40;actualnote, 12&#41;&#41;;
						int transpose = sdkGetEvtArrayData&#40;pTranspose, idnote12&#41;;
						bool play_note = sdkGetEvtArrayData&#40;pONOFFs, idnote12&#41; == 1;


						if &#40;code.Msg == MIDI_NOTEON&#41;
						&#123;	FLASH&#91;idnote12 + &#40;&#40;12 - idnote12&#41; * 12&#41;&#93; = 1;
						&#125;
						else
						&#123;	FLASH&#91;idnote12 + &#40;&#40;12 - idnote12&#41; * 12&#41;&#93; = 0;
						&#125;


						if &#40;play_note&#41;
						&#123;	code.Data1 = std&#58;&#58;min&#40;127, std&#58;&#58;max&#40;0, &#40;int&#41;code.Data1 + transpose&#41;&#41;;
						&#125;
						else
						&#123;	code.Msg = MIDI_NOTEOFF;
						&#125;

						sdkSetEvtArrayMidi&#40;midiOut, i, code&#41;;
Re edit. Im really stupid, i was testing with a monophonic vst :rolleyes: , tested to rec in pianoroll i do see chords on output everuthing is fine in fact :P

Post Reply

Who is online

Users browsing this forum: No registered users and 44 guests