AnsweredMapping MIDI input to scale

Author
wolfdancer
Max Output Level: -90 dBFS
  • Total Posts : 20
  • Joined: 2003/12/16 09:57:26
  • Status: offline
2017/02/18 08:35:08 (permalink)

Mapping MIDI input to scale

Hi-
 
I want to convert MIDI notes to a special scale. (For those who are interested: I want to automatically create Tintinnabuli voices a la Arvo Pärt.)
 
This means for example to map every note of a scale to the lower next chord note. Example A minor:
 
a --> e
b --> a
c --> a
d --> c
e --> c
f --> e
g --> e
 
In Sonar I've found two tools:
 
1. MIDI effect "Transpose". I can create a custom scale that does the trick when I play a midi track. It does not affect the MIDI Input though, that means if I play on a keyboard and route the MIDI track output to a software instrument, the effect doesn't get applied. Also, it's pretty tedious to change each and every entry across seven octaves instead of just defining the map for one octave. And, is there a way to import / export maps? I finally overwrote one of the existing presets just to save the map.
 
2. Snap to Scale (track inspector). Looks very good but it seems it only affects what you draw into the piano roll view. It doesn't affect playback and of course not the MIDI Input.
 
So, any ideas? The biggest improvement for me would be if it worked in real time on the MIDI input.
 
wolf
 
 
 
 
 
 
 
 
 
#1
brundlefly
Max Output Level: 0 dBFS
  • Total Posts : 14250
  • Joined: 2007/09/14 14:57:59
  • Location: Manitou Spgs, Colorado
  • Status: offline
Re: Mapping MIDI input to scale 2017/02/18 11:12:02 (permalink) ☼ Best Answerby wolfdancer 2017/02/25 06:45:13
Set the output of the MIDI track to New Drum Map, and choose 'Pass Thru Map'. Then choose Drum Map Manager from the same output pick list, use Ctrl+Shift+click to change the Out Port of all notes to the desired port, and edit the 'Out Note' column to re-map notes.

SONAR Platinum x64, 2x MOTU 2408/PCIe-424  (24-bit, 48kHz)
Win10, I7-6700K @ 4.0GHz, 24GB DDR4, 2TB HDD, 32GB SSD Cache, GeForce GTX 750Ti, 2x 24" 16:10 IPS Monitors
#2
scook
Forum Host
  • Total Posts : 24146
  • Joined: 2005/07/27 13:43:57
  • Location: TX
  • Status: offline
Re: Mapping MIDI input to scale 2017/02/18 11:15:50 (permalink)
A drum map may be used to transpose note data too. Drum maps are not just for drums. While it is necessary to define each note relation in the map it may be faster than the transpose tool.
#3
azslow3
Max Output Level: -42.5 dBFS
  • Total Posts : 3297
  • Joined: 2012/06/22 19:27:51
  • Location: Germany
  • Status: offline
Re: Mapping MIDI input to scale 2017/02/18 11:33:45 (permalink) ☄ Helpfulby wolfdancer 2017/03/04 13:49:11
For static mapping the way described by brundlefly is better.
 
But if you ever written simple programs, there is "Drum map for programmers", see the last example in http://www.azslow.com/index.php/topic,286.0.html
Advantages:
+ if you know the "algorithm" of note conversion you can just write it explicitly.
+ works as MFX and as "offline processor". You can easily switch it on/off or apply to the clip/track permanently.
+ "key switching" can be added (note that you will need to add MfxOffNotes technique from previous examples to avoid "stuck" when switching while some note is still played)
Disadvantage:
- third party software (free, but still)
- to be fair, there was no volunteers to test it (not even the person who has asked to make it...) So please do not try to use it on stage today evening
- basic programming skills required

Sonar 8LE -> Platinum infinity, REAPER, Windows 10 pro
GA-EP35-DS3L, E7500, 4GB, GTX 1050 Ti, 2x500GB
RME Babyface Pro (M-Audio Audiophile Firewire/410, VS-20), Kawai CN43, TD-11, Roland A500S, Akai MPK Mini, Keystation Pro, etc.
www.azslow.com - Control Surface Integration Platform for SONAR, ReaCWP, AOSC and other accessibility tools
#4
wolfdancer
Max Output Level: -90 dBFS
  • Total Posts : 20
  • Joined: 2003/12/16 09:57:26
  • Status: offline
Re: Mapping MIDI input to scale 2017/02/25 06:47:52 (permalink)
Thanks a lot, I tried the drum map idea and it works great.
Is there an easy way to copy the mapping definitions from one octave to another? It's a little tedious to do click together the same stuff across the keyboard range.
#5
brundlefly
Max Output Level: 0 dBFS
  • Total Posts : 14250
  • Joined: 2007/09/14 14:57:59
  • Location: Manitou Spgs, Colorado
  • Status: offline
Re: Mapping MIDI input to scale 2017/02/25 12:24:01 (permalink)
No, unfortunately, the Drum Map interface is pretty rudimentary and restrictive. Other than the Ctrl+Shift method of changing a range of output channels or ports, there really aren't any editing shortcuts.

SONAR Platinum x64, 2x MOTU 2408/PCIe-424  (24-bit, 48kHz)
Win10, I7-6700K @ 4.0GHz, 24GB DDR4, 2TB HDD, 32GB SSD Cache, GeForce GTX 750Ti, 2x 24" 16:10 IPS Monitors
#6
wolfdancer
Max Output Level: -90 dBFS
  • Total Posts : 20
  • Joined: 2003/12/16 09:57:26
  • Status: offline
Re: Mapping MIDI input to scale 2017/03/04 14:10:39 (permalink)
azslow3
For static mapping the way described by brundlefly is better.
 But if you ever written simple programs, there is "Drum map for programmers", see the last example in http://www.azslow.com/index.php/topic,286.0.html

 
I tried it out and got it to work with Sonar X1. This looks more comfortable than the other solutions. Yet, I was wondering whether you need to spell out the mapping across all octaves?
I have no programming skills (save for the programmable pocket calculator I had as a youth) so it would take me a while to do more than just copying code here. But in general, I guess it is possible to add switches to transpose up / down 1 octave and also to define certain scales (by activating one of several Definition blocks). Is there an easy way to get this functionality, that is without really understanding what I do? I mean modifying your example so it does what I need was very easy.
#7
azslow3
Max Output Level: -42.5 dBFS
  • Total Posts : 3297
  • Joined: 2012/06/22 19:27:51
  • Location: Germany
  • Status: offline
Re: Mapping MIDI input to scale 2017/03/04 15:15:27 (permalink)
Without programming skills it is easy to introduce some "bugs". So I propose I write initial version. You can modify/add scales then (I will add comments so you know what should be modified to achieve that)
 
But I have to understand what you need. So far my interpretation is the following:
* one octave mapping, f.e. c4-b4 defines the scale. And you want it works for all octaves the same way (so you do not have to define it separately for each octave).
* you want several such scales and a possibility to switch between them during playing.
Is that right?
 
If so, which method you prefer to switch scales?
1) you have some CC knob which should select one from let say 5 different scales
2) you want some predefined keys switch to particular scale, f.e. c1 -> scale1, d1->scale2, etc
3) the same as 2, but you have separate buttons/pads on your controller (which send some CC or PC) and want use them as switches
4) you want just 2 keys/buttons for "next" and "previous" scale
 
 
 

Sonar 8LE -> Platinum infinity, REAPER, Windows 10 pro
GA-EP35-DS3L, E7500, 4GB, GTX 1050 Ti, 2x500GB
RME Babyface Pro (M-Audio Audiophile Firewire/410, VS-20), Kawai CN43, TD-11, Roland A500S, Akai MPK Mini, Keystation Pro, etc.
www.azslow.com - Control Surface Integration Platform for SONAR, ReaCWP, AOSC and other accessibility tools
#8
wolfdancer
Max Output Level: -90 dBFS
  • Total Posts : 20
  • Joined: 2003/12/16 09:57:26
  • Status: offline
Re: Mapping MIDI input to scale 2017/03/05 14:22:17 (permalink)
Thanks a lot for your offer.
 
The System behind this is very easy. For each of the 7 note of a scale (melody voice: M), the harmony (Tintinnabuli: T) voice consists of one of the three notes of the respective chord. There are four different Tintinnabuli voices: the upper next chord note (T+1), the 2nd chord note up from the melody note (T+2), the lower next chord note (T-1), and the 2nd lower note (T-2).
 
For the notes of the A minor scale, the T voices are:
 
M    T-2  T-1  T+1  T+2
------------------------------
a4   c3   e3   c4   e4
b4   e3   a4   c4   e4
c4   e3   a4   e4   a5
d4   a4   c4   e4   a5
e4   a4   c4   a5   c5
f4   c4   e4   a5   c5
g4   c4   e4   a5   c5
a5   c4   e4   c5   e6
 
Well I HOPE I there's no mistake in the table.
So, the ideal MIDI effect would look like this: one switch to select the scale (if you want to have it complete, that would be 1 switch or selector for the 11 different root notes, c, c#, d, d#, and so on that define the root of the scale, another switch for Major or minor, and a 3rd Switch to shift the T voice one octave up or down. The latter can be had with the already existing transpose effect in Sonar though. Also, 7 (c, d, e, f, g a b) instead of 11 root notes would be sufficient too. Or, to be even simpler for the start, just use A minor and C major.
 
All right, summary: the simplest version would comprise switching between A minor and C Major and a switch to select one of the 4 T voices, T-2, T-1, T+1, and T+2.
 
With switch I mean you can make the selections in the GUI of the effect, no need to switch while playing.
 
What I want is to get a feeling for the melodic colors  the different T voices add. For real compositions, which is the next step, I guess such a restricted pattern would get boring in no time.  Therefore, it doesn't make sense to put very much work and time in such a tool.
For Arvo Pärt, it was the starting point. "Für Alina" is a composition that is really made up of nothing more than one M and one T voice:
https://www.youtube.com/watch?v=TzIZPZN5K60
 
Also, forgot to ask that yesterday, can you save Lua programs in a file outside of Sonar?
 
 
 
#9
azslow3
Max Output Level: -42.5 dBFS
  • Total Posts : 3297
  • Joined: 2012/06/22 19:27:51
  • Location: Germany
  • Status: offline
Re: Mapping MIDI input to scale 2017/03/06 15:13:41 (permalink)
Not exactly according to your table, but I think that is what you have asked for:
http://www.azslow.com/index.php/topic,286.msg1479.html#msg1479
 
The preset is attached as SPP, but you can also copy/paste it.
I have added "Keep melody", I have found it useful during testing (by the way I had fun playing some melodies throw it )
 
Note that if you change parameters during playing, there is significant delay before new parameters apply. That comes from general Sonar MFX design. Live input should have no such problem.

Sonar 8LE -> Platinum infinity, REAPER, Windows 10 pro
GA-EP35-DS3L, E7500, 4GB, GTX 1050 Ti, 2x500GB
RME Babyface Pro (M-Audio Audiophile Firewire/410, VS-20), Kawai CN43, TD-11, Roland A500S, Akai MPK Mini, Keystation Pro, etc.
www.azslow.com - Control Surface Integration Platform for SONAR, ReaCWP, AOSC and other accessibility tools
#10
wolfdancer
Max Output Level: -90 dBFS
  • Total Posts : 20
  • Joined: 2003/12/16 09:57:26
  • Status: offline
Re: Mapping MIDI input to scale 2017/03/07 16:52:34 (permalink)
Thanks a lot and again, I'll check it out soon and let you know how it works.
 
Again, how do I load SPP files and how do I save them to disk?
#11
azslow3
Max Output Level: -42.5 dBFS
  • Total Posts : 3297
  • Joined: 2012/06/22 19:27:51
  • Location: Germany
  • Status: offline
Re: Mapping MIDI input to scale 2017/03/07 17:29:36 (permalink)
wolfdancer
Again, how do I load SPP files and how do I save them to disk?

There is very powerful build-in tool, which is there since long time but still periodically overseen: "Utilities / Cakewalk Plug-in Manager". It can save(backup)/restore presets for all kind of plug-ins (VST, DX, MFX, Control Surfaces), in addition to organizing plug-ins and changing options.

Sonar 8LE -> Platinum infinity, REAPER, Windows 10 pro
GA-EP35-DS3L, E7500, 4GB, GTX 1050 Ti, 2x500GB
RME Babyface Pro (M-Audio Audiophile Firewire/410, VS-20), Kawai CN43, TD-11, Roland A500S, Akai MPK Mini, Keystation Pro, etc.
www.azslow.com - Control Surface Integration Platform for SONAR, ReaCWP, AOSC and other accessibility tools
#12
wolfdancer
Max Output Level: -90 dBFS
  • Total Posts : 20
  • Joined: 2003/12/16 09:57:26
  • Status: offline
Re: Mapping MIDI input to scale 2017/04/01 14:22:53 (permalink)
azslow3
Not exactly according to your table, but I think that is what you have asked for:
http://www.azslow.com/index.php/topic,286.msg1479.html#msg1479



The audio card of my music PC had been acting up so I was a little late checking it out. It works great. I need to check out some particular notes that sound a little odd but in general it's a very big help.
#13
Jump to:
© 2024 APG vNext Commercial Version 5.1