Jump to content

Dedicated Force to Scale


mQueue
 Share

Recommended Posts

Sorry I posted this in 2 forums, I didn't realize there was a programming section.

Hello all,

I'm new to this forum and still trying to get my head around the midibox concepts. I would like to build a midi tranposition box and I'm wondering how much programming would be involved to do this. I don't know C but hope to pick it up. I know SQL and am somewhat familiar with computer logic.

Here's what I'd like to do:

Build a box that transposes fixed note values from a pad controller into different scales and modes.

This box would have 16 channels of input/output and be able to select a a root note and scale/mode for each channel.

The box would take the incoming note data (fixed values - pad 1 (first in scale) pad 2 (second in scale)....) and transpose these values into the correct values in scale.

Here's an example of how the mapping would look for a C major scale:

Scale: Major

Root Note: C

Mode: Ionian

Set Note value 1 - 23 (C -1) (ROOT)

Set Note value 2 - (notevalue 1) + 2 = 25 (D-1)

Set Note value 3 - (notevalue 2) + 2 = 27 (E-1)

Set Note value 4 - (notevalue 3) + 1 = 28 (F-1)......

Notes would continue to be calculated up using the steps of the scale. I'm not sure how modes would work, I would have to develop logic to have the mapping assignment start partially up the scale then continue on.

I've been looking at the different midibox products and I'm not sure which would be best for this. Ideally I'd like to have a decent size screen.

Thank all of you in advance for your help.

Link to comment
Share on other sites

  • 1 year later...

Hi folks, first post here so go easy on me :P

Basically my plan is to build a dedicated force to scale hardware box for realtime use. The functionality is designed to be very basic, and take a live MIDI in stream from my keyboard, force it to a set scale, and send it out a midi out port. It would change scale via MIDI CC messages also coming from the MIDI keyboard.

Im comfortable building electronics and have done plenty of DIY synths and circtuit bending, and I know some basic C programming, so there's plenty of research for me ahead. Im just writing to double check this would be possible before I embark, from what I can see with my beginning research this system would only require MBHP_Core unless I want an LCD screen on it.

If someone can confirm this can be done without too much hastle Ill start my full research and build! Thanks in advance!

Kvetch

Edited by Kvetch
Link to comment
Share on other sites

  • 1 month later...

I too am trying to build something very similar. Did anyone message you back about this post? I find the programming sections of the website and ucapps very confusing. And just trying to find an example of the "force to scale" function hasnt been possible. Did you have any luck?

Link to comment
Share on other sites

Hi folks. Still working on creating a dedicated real-time force-to-scale box. I have my scale.c and scale.h files made with the scales I require, but I'm totally new to this and I'm getting stuck at some very basic things. I am trying to build a box with 48 buttons, 48 LED's and no LCD. It only requires 1 MIDI In port and 1 MIDI out port. Would Midibox 64 kit be capable of this?

Basically I want to play my midi keyboard in real-time through the box and have it output my playing forced to certain selected scales. I only need to use major, natural minor, penta minor and penta major scales, with all 12 root notes. I was thinking maybe 12 root notes * 4 scales would mean I could have a button for each with an LED above each button showing which was active.

Perhaps it could be easier to have only 5 buttons, 1 for each of the 4 scales I need, plus a button that when held down would allow me to select the root note of the scale via my midi keyboard.

I have the scale files from the midibox seq V4 source code which accepts perimeter (p) as the note to be forced, but I need help with making this perimeter the currently pressed note on my keyboard. Any help would be much appreciated, and Im not sure whether this could maybe be done with the core module alone?

Link to comment
Share on other sites

Hi folks, I am struggling here with some of the most basic principles of my development project Ive been working on. I have some basic functions working but Im really getting stuck fast with most of the concepts. I don't think App development is for me but I really want the box I was trying to build.

My rather unusual sales request is to pay a community member to develop my simple project and just get me the source files. Ill load and purchase the hardware and everything. If someone could do this and name me a price, I'll go for it :)

So all the box needs to have is one MIDI in port, one MIDI out port. No screen or controls on it. It will accept notes through the midi in from my midi keyboard, force them to scale in real-time and output the forced playing to the midi out.

It will utilise CC messages to change scale and root note, these will also come from the midi keyboard. It will use midi CC #1-48. 12 root notes in 4 different scales (natural minor, major, minor pentatonic, major pentatonic)

If anyone can help me please let me know!

Kvetch

Link to comment
Share on other sites

I'd like to have a box like this for use on semi-random and otherwise weird generative note data- let me know if you get anywhere with it. I'd pay a good price for one. Nowhere near enough to get you close to One Million Dollars, but a decent amount.. :D

I've been thinking about asking Ruin & Wesen if they would write a patch like this for their Minicommand controller box. It seems like the kind of thing they'd do, and I already have the hardware..

http://ruinwesen.com/products

Link to comment
Share on other sites

I don't think we've ever had this kind of offer before... offers to pay someone to solder MIDIbox PCBs (which goes against the "non-commercial" licence) but not "code this for me and I'll pay you".

Perhaps there are some programmers here who would like to help you but don't want accept payment. Instead, perhaps they could make this a project that everyone could use, and then maybe you can just donate to MIDIbox development and/or webhosting as a contriubution/thanks.

This idea could quite easily merge with other live playing "toys" like arpeggiator, delay (see ), transpose/octave shifting, velocity curve tweaking, etc.

Link to comment
Share on other sites

problem is, that you are impatient and spread new postings over the forum so that it's hard for somebody to determine how to answer your post (since it's hard to determine your background resp. already available knowledge)

You tried to use MIOS32 code 1:1 for a MIOS8 project, this won't work without modifications.

Maybe next week I will have the time to convert the example that I gave you to MIOS8.

Thats a no brainer for me, it will take maybe 10 minutes...

I thought that you wanted to do this by yourself, since you haven't mentioned that you never worked with C code before...

But please: be patient and try to keep your postings in a single thread!

Sidenote for others: the MIOS32 tutorials provide much more examples, e.g. also how to realize MIDI clock timed code for an arpeggiator. They are not compatible to MIOS8 as I think that programming on 32 bit is moe fun anyhow.

Best Regards, Thorsten.

Link to comment
Share on other sites

Sure thing TK, sorry about the cross posting Im just getting myself all mixed up here. Id be happy to donate to an open project, no problem at all. Ill donate good money if someone can come up with this, but Ill keep persisting with my own code in the meantime just in case I make a breakthrough.

PS a million dollars might take me a while :ahappy:

Link to comment
Share on other sites

This sounds like a cool application.

Do you already know which notes you want it to change? In another post you mention 4 different scales. So if this box is set to convert your playing to C Major, and you play a C#, what note will come out of it? C? D?

I think a simple approach would be to create a 12-line lookup table for each type of scale. Use math to compare the incoming note based on the specified key, then fix it based on the table.

The table itself is the most important part. If I understand correctly, here are two different examples of how you might approach a C-Major scale. The number in (brackets) would represent the actual table entry for that scale type. "r" = "root note", which is the remainder of ((the incoming note number + the key) / 12).


Note IN  Note OUT-familiar intervals Note OUT-shift-down correction

=======  =========================== ==============================

C  (r)   C (0)                       C (0)

C# (r+1) C (-1)                      C (-1)

D  (r+2) D (0)                       D (0)

D# (r+3) E (+1)                      D (-1)

E  (r+4) E (0)                       E (0)

F  (r+5) F (0)                       F (0)

F# (r+6) G (+1)                      F (-1)

G  (r+7) G (0)                       G (0)

G# (r+8) G (-1)                      G (-1)

A  (r+9) A (0)                       A (0)

A# (r+10)A (-1)                      A (-1)

B  (r+11)B (0)                       B (0)

Using this method you could probably hard-code in dozens of different correction tables, representing major, minor, and any of various "modes". When the incoming note comes in, the number in brackets is added to the note number, and it is immediately sent to MIDI OUT!

Link to comment
Share on other sites

unfortunately Kvetch did a lot of cross-posting, We should merge the articles to avoid that the discussion about the same thing is forked...

I will separate the existing force-to-scale algorithm from MBSEQ V4 and provide it as a dedicated MIOS8 and MIOS32 application.

There is no need for "correction tables", just have a look into seq_scale.c

more than 128 scales are already part of this file, it only has to be adapted to MIOS8 since the C code isn't compatible to the lmited SDCC compiler,

In addition an incoming note tracker will be required to ensure that no Note Off gets lost if keys are still played while the root or scale is changed, or when two keys play the same note (important for live situation)

I expect ca. 30 minutes work on this app, So just wait till I'm back from vacation ;)

Best Reagrds, Thorsten.

Link to comment
Share on other sites

Thanks for the merge, apologies again for cross posting, got myself all mixed up here. Ive got my seq_scale.c and seq_scale.h edited down to include only the specific scales I require, and Im just looking into switching scale and root note via MIDI CC messages.

I'm feeling more optimistic about my project now, looking forward to any further input from you guys :thumbsup:

Link to comment
Share on other sites

  • 2 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...